R3BROOT
R3B analysis software
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 <R3BFormatters.h>
17#include <R3BShared.h>
18#include <TObject.h>
19#include <vector>
20
21namespace R3B::Neuland
22{
23
31
33 {
34 public:
35 BarCalData() = default;
36 explicit BarCalData(unsigned int mod_num)
37 : module_num{ mod_num }
38 {
39 }
40 unsigned int module_num = 0; // 1 based bar num
41 std::vector<CalDataSignal> left;
42 std::vector<CalDataSignal> right;
43 ClassDefNV(BarCalData, 1)
44 };
45} // namespace R3B::Neuland
46 //
47using R3BNeulandCalDataContainer = std::vector<R3B::Neuland::BarCalData>;
48
49template <>
50class fmt::formatter<R3B::Neuland::CalDataSignal>
51{
52 public:
53 static constexpr auto parse(format_parse_context& ctx) { return ctx.end(); }
54 template <typename FmtContent>
55 constexpr auto format(const R3B::Neuland::CalDataSignal& signal, FmtContent& ctn) const
56 {
57 return format_to(ctn.out(),
58 "{{leadT: {}, tot: {}, trigT: {} }}",
59 signal.leading_time,
61 signal.trigger_time);
62 }
63};
64
65template <>
66class fmt::formatter<R3B::Neuland::BarCalData>
67{
68 public:
69 static constexpr auto parse(format_parse_context& ctx) { return ctx.end(); }
70 template <typename FmtContent>
71 constexpr auto format(const R3B::Neuland::BarCalData& signal, FmtContent& ctn) const
72 {
73 return format_to(ctn.out(),
74 "ModuleNum: {}, left bar: [{}], right bar: [{}]",
75 signal.module_num,
76 fmt::join(signal.left, ", "),
77 fmt::join(signal.right, ", "));
78 }
79};
std::vector< R3B::Neuland::BarCalData > R3BNeulandCalDataContainer
static constexpr auto parse(format_parse_context &ctx)
constexpr auto format(const R3B::Neuland::BarCalData &signal, FmtContent &ctn) const
static constexpr auto parse(format_parse_context &ctx)
constexpr auto format(const R3B::Neuland::CalDataSignal &signal, FmtContent &ctn) const
Simulation of NeuLAND Bar/Paddle.
BarCalData(unsigned int mod_num)
std::vector< CalDataSignal > left
std::vector< CalDataSignal > right
ValueError< double > trigger_time
ValueError< double > leading_time
ValueError< double > time_over_threshold