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/format.h>
17#include <fmt/ranges.h>
18#include <vector>
19namespace R3B
20{
22 {
23 std::vector<float> locals; // local derivatives
24 std::vector<std::pair<int, float>> globals; // global label and derivatives pair
25 float measurement = 0.; // measurement corresponding to the error value
26 float sigma = 1.; // error value
27 };
28} // namespace R3B
29
30template <>
31class fmt::formatter<R3B::MilleDataPoint>
32{
33 public:
34 static constexpr auto parse(format_parse_context& ctx) { return ctx.end(); }
35 template <typename FmtContent>
36 constexpr auto format(const R3B::MilleDataPoint& point, FmtContent& ctn) const
37 {
38 return format_to(ctn.out(),
39 "measurement: {}, sigma: {}, locals: {}, globals: {}",
40 point.measurement,
41 point.sigma,
42 point.locals,
43 point.globals);
44 }
45};
static constexpr auto parse(format_parse_context &ctx)
Definition MilleEntry.h:34
constexpr auto format(const R3B::MilleDataPoint &point, FmtContent &ctn) const
Definition MilleEntry.h:36
std::vector< std::pair< int, float > > globals
Definition MilleEntry.h:24
std::vector< float > locals
Definition MilleEntry.h:23