R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
MilleEntry.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3 * Copyright (C) 2019-2023 Members of R3B Collaboration *
4 * *
5 * This software is distributed under the terms of the *
6 * GNU General Public Licence (GPL) version 3, *
7 * copied verbatim in the file "LICENSE". *
8 * *
9 * In applying this license GSI does not waive the privileges and immunities *
10 * granted to it by virtue of its status as an Intergovernmental Organization *
11 * or submit itself to any jurisdiction. *
12 ******************************************************************************/
13
14#pragma once
15
16#include <fmt/core.h>
17#include <fmt/format.h>
18#include <utility>
19#include <vector>
20namespace R3B
21{
23 {
24 std::vector<float> locals; // local derivatives
25 std::vector<std::pair<int, float>> globals; // global label and derivatives pair
26 float measurement = 0.; // measurement corresponding to the error value
27 float sigma = 1.; // error value
28 };
29} // namespace R3B
30
31template <>
32class fmt::formatter<R3B::MilleDataPoint>
33{
34 public:
35 static constexpr auto parse(format_parse_context& ctx) { return ctx.end(); }
36 template <typename FmtContent>
37 constexpr auto format(const R3B::MilleDataPoint& point, FmtContent& ctn) const
38 {
39 return format_to(ctn.out(),
40 "measurement: {}, sigma: {}, locals: {}, globals: {}",
41 point.measurement,
42 point.sigma,
43 point.locals,
44 point.globals);
45 }
46};
static constexpr auto parse(format_parse_context &ctx)
Definition MilleEntry.h:35
constexpr auto format(const R3B::MilleDataPoint &point, FmtContent &ctn) const
Definition MilleEntry.h:37
std::vector< std::pair< int, float > > globals
Definition MilleEntry.h:25
std::vector< float > locals
Definition MilleEntry.h:24