R3BROOT
R3B analysis software
Toggle main menu visibility
Loading...
Searching...
No Matches
R3BNeulandCalData2.h
Go to the documentation of this file.
1
#pragma once
2
3
/******************************************************************************
4
* Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
5
* Copyright (C) 2019-2023 Members of R3B Collaboration *
6
* *
7
* This software is distributed under the terms of the *
8
* GNU General Public Licence (GPL) version 3, *
9
* copied verbatim in the file "LICENSE". *
10
* *
11
* In applying this license GSI does not waive the privileges and immunities *
12
* granted to it by virtue of its status as an Intergovernmental Organization *
13
* or submit itself to any jurisdiction. *
14
******************************************************************************/
15
16
#include "
R3BValueError.h
"
17
#include <Rtypes.h>
18
#include <vector>
19
20
#ifndef __CLING__
21
#include "
R3BFormatters.h
"
// IWYU pragma: keep
22
#include <fmt/base.h>
23
#include <fmt/core.h>
24
#include <fmt/format.h>
25
#include <fmt/ranges.h>
26
#endif
27
28
namespace
R3B::Neuland
29
{
30
struct
CalDataSignal
31
{
32
ValueError<double>
leading_time
;
// ns
33
ValueError<double>
time_over_threshold
;
// ns
34
ValueError<double>
trigger_time
;
// ns
35
ClassDefNV(
CalDataSignal
, 1)
36
};
37
38
struct
BarCalData
39
{
40
public
:
41
BarCalData
() =
default
;
42
explicit
BarCalData
(
int
mod_num)
43
:
module_num
{ mod_num }
44
{
45
}
46
int
module_num
= 0;
// 1 based bar num
47
std::vector<CalDataSignal>
left
;
48
std::vector<CalDataSignal>
right
;
49
ClassDefNV(
BarCalData
, 1)
50
};
51
}
// namespace R3B::Neuland
52
//
53
using
R3BNeulandCalDataContainer
= std::vector<R3B::Neuland::BarCalData>;
54
55
#ifndef __CLING__
56
template
<>
57
class
fmt::formatter<
R3B
::
Neuland::CalDataSignal
>
58
{
59
public
:
60
static
constexpr
auto
parse
(format_parse_context& ctx) {
return
ctx.end(); }
61
template
<
typename
FmtContent>
62
constexpr
auto
format
(
const
R3B::Neuland::CalDataSignal
& signal, FmtContent& ctn)
const
63
{
64
return
fmt::format_to(ctn.out(),
65
"{{leadT: {}, tot: {}, trigT: {} }}"
,
66
signal.
leading_time
,
67
signal.
time_over_threshold
,
68
signal.
trigger_time
);
69
}
70
};
71
72
template
<>
73
class
fmt::formatter<
R3B
::
Neuland::BarCalData
>
74
{
75
public
:
76
static
constexpr
auto
parse
(format_parse_context& ctx) {
return
ctx.end(); }
77
template
<
typename
FmtContent>
78
constexpr
auto
format
(
const
R3B::Neuland::BarCalData
& signal, FmtContent& ctn)
const
79
{
80
return
fmt::format_to(ctn.out(),
81
"ModuleNum: {}, left bar: [{}], right bar: [{}]"
,
82
signal.
module_num
,
83
fmt::join(signal.
left
,
", "
),
84
fmt::join(signal.
right
,
", "
));
85
}
86
};
87
#endif
R3BFormatters.h
R3BNeulandCalDataContainer
std::vector< R3B::Neuland::BarCalData > R3BNeulandCalDataContainer
Definition
R3BNeulandCalData2.h:53
R3BValueError.h
fmt::formatter< R3B::Neuland::BarCalData >::parse
static constexpr auto parse(format_parse_context &ctx)
Definition
R3BNeulandCalData2.h:76
fmt::formatter< R3B::Neuland::BarCalData >::format
constexpr auto format(const R3B::Neuland::BarCalData &signal, FmtContent &ctn) const
Definition
R3BNeulandCalData2.h:78
fmt::formatter< R3B::Neuland::CalDataSignal >::parse
static constexpr auto parse(format_parse_context &ctx)
Definition
R3BNeulandCalData2.h:60
fmt::formatter< R3B::Neuland::CalDataSignal >::format
constexpr auto format(const R3B::Neuland::CalDataSignal &signal, FmtContent &ctn) const
Definition
R3BNeulandCalData2.h:62
R3B::Neuland
Simulation of NeuLAND Bar/Paddle.
Definition
R3BNeulandAnalysisApp.cxx:44
R3B
Definition
R3BNeulandAnalysisApp.cxx:44
R3B::Neuland::BarCalData
Definition
R3BNeulandCalData2.h:39
R3B::Neuland::BarCalData::module_num
int module_num
Definition
R3BNeulandCalData2.h:46
R3B::Neuland::BarCalData::BarCalData
BarCalData()=default
R3B::Neuland::BarCalData::BarCalData
BarCalData(int mod_num)
Definition
R3BNeulandCalData2.h:42
R3B::Neuland::BarCalData::left
std::vector< CalDataSignal > left
Definition
R3BNeulandCalData2.h:47
R3B::Neuland::BarCalData::right
std::vector< CalDataSignal > right
Definition
R3BNeulandCalData2.h:48
R3B::Neuland::CalDataSignal
Definition
R3BNeulandCalData2.h:31
R3B::Neuland::CalDataSignal::trigger_time
ValueError< double > trigger_time
Definition
R3BNeulandCalData2.h:34
R3B::Neuland::CalDataSignal::leading_time
ValueError< double > leading_time
Definition
R3BNeulandCalData2.h:32
R3B::Neuland::CalDataSignal::time_over_threshold
ValueError< double > time_over_threshold
Definition
R3BNeulandCalData2.h:33
R3B::ValueError
Definition
R3BValueError.h:42
neuland
calibration
map_to_cal
R3BNeulandCalData2.h
Generated by
1.18.0