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>
20
namespace
R3B
21
{
22
struct
MilleDataPoint
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
31
template
<>
32
class
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
fmt::format_to(ctn.out(),
40
"measurement: {}, sigma: {}, locals: {}, globals: {}"
,
41
point.
measurement
,
42
point.
sigma
,
43
point.
locals
,
44
point.
globals
);
45
}
46
};
fmt::formatter< R3B::MilleDataPoint >::parse
static constexpr auto parse(format_parse_context &ctx)
Definition
MilleEntry.h:35
fmt::formatter< R3B::MilleDataPoint >::format
constexpr auto format(const R3B::MilleDataPoint &point, FmtContent &ctn) const
Definition
MilleEntry.h:37
R3B
Definition
GeneratorFactoryJson.h:12
R3B::MilleDataPoint
Definition
MilleEntry.h:23
R3B::MilleDataPoint::globals
std::vector< std::pair< int, float > > globals
Definition
MilleEntry.h:25
R3B::MilleDataPoint::sigma
float sigma
Definition
MilleEntry.h:27
R3B::MilleDataPoint::measurement
float measurement
Definition
MilleEntry.h:26
R3B::MilleDataPoint::locals
std::vector< float > locals
Definition
MilleEntry.h:24
neuland
calibration
mille
MilleEntry.h
Generated by
1.14.0