CbmRoot
Loading...
Searching...
No Matches
analysis/common/analysis_tree_converter/steer/Config.h
Go to the documentation of this file.
1
/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2
SPDX-License-Identifier: GPL-3.0-only
3
Authors: Frederic Linz [committer], Volker Friese */
4
10
#ifndef CBM_ATCONVERTER_STEER_CONFIG_H
11
#define CBM_ATCONVERTER_STEER_CONFIG_H 1
12
13
#include "
CbmDefs.h
"
14
15
#include <array>
16
#include <fstream>
17
#include <sstream>
18
#include <string>
19
20
#include <yaml-cpp/yaml.h>
21
22
namespace
cbm::atconverter
23
{
24
25
enum class
ECbmEvbuildType
26
{
27
Ideal
,
28
Real
,
29
Undefined
30
};
31
32
40
class
Config
{
41
public
:
43
Config
() =
default
;
44
45
47
virtual
~Config
() =
default
;
48
49
53
void
LoadYaml
(
const
std::string& filename);
54
55
57
std::string
ToString
()
58
{
59
std::stringstream out;
60
out <<
ToYaml
();
61
return
out.str();
62
}
63
64
68
void
SaveYaml
(
const
std::string& filename)
69
{
70
std::ofstream fout(filename);
71
fout <<
ToYaml
();
72
}
73
74
75
private
:
76
ECbmRecoMode
ToCbmRecoMode
(std::string tag);
77
std::string
ToString
(
ECbmRecoMode
mode);
78
80
YAML::Node
ToYaml
();
81
82
83
public
:
84
// --- Global settings
85
std::string
f_glb_logLevel
=
"INFO"
;
86
std::string
f_glb_logVerbose
=
"LOW"
;
87
std::string
f_glb_logColor
=
"true"
;
88
ECbmRecoMode
f_glb_mode
=
ECbmRecoMode::Undefined
;
89
int
f_glb_numTs
= -1;
90
int
f_glb_firstTs
= 0;
91
float
f_glb_tslength
= 1.e5;
92
93
std::string
f_glb_system
=
""
;
94
float
f_glb_beamMom
= 12.;
95
96
bool
f_glb_trackMatching
=
true
;
97
98
// --- Event builder
99
ECbmEvbuildType
f_evbuild_type
=
ECbmEvbuildType::Undefined
;
100
101
// --- Fsd hits converter settings
102
float
f_fsd_minChi2match
= -1.;
103
float
f_fsd_maxChi2match
= 10000.;
104
};
105
106
}
// namespace cbm::atconverter
107
108
109
#endif
/* CBM_ATCONVERTER_STEER_CONFIG_H */
CbmDefs.h
ECbmRecoMode
ECbmRecoMode
Reconstruct the full time slice or event-by-event.
Definition
CbmDefs.h:162
ECbmRecoMode::Undefined
@ Undefined
cbm::atconverter::Config
Definition
analysis/common/analysis_tree_converter/steer/Config.h:40
cbm::atconverter::Config::f_fsd_minChi2match
float f_fsd_minChi2match
Definition
analysis/common/analysis_tree_converter/steer/Config.h:102
cbm::atconverter::Config::ToString
std::string ToString()
String output (YAML format)
Definition
analysis/common/analysis_tree_converter/steer/Config.h:57
cbm::atconverter::Config::f_glb_firstTs
int f_glb_firstTs
Definition
analysis/common/analysis_tree_converter/steer/Config.h:90
cbm::atconverter::Config::ToYaml
YAML::Node ToYaml()
Save to YAML node.
Definition
analysis/common/analysis_tree_converter/steer/Config.cxx:78
cbm::atconverter::Config::f_evbuild_type
ECbmEvbuildType f_evbuild_type
Definition
analysis/common/analysis_tree_converter/steer/Config.h:99
cbm::atconverter::Config::f_glb_numTs
int f_glb_numTs
Definition
analysis/common/analysis_tree_converter/steer/Config.h:89
cbm::atconverter::Config::Config
Config()=default
Constructor.
cbm::atconverter::Config::LoadYaml
void LoadYaml(const std::string &filename)
Load from YAML file.
cbm::atconverter::Config::f_glb_logColor
std::string f_glb_logColor
Definition
analysis/common/analysis_tree_converter/steer/Config.h:87
cbm::atconverter::Config::f_glb_system
std::string f_glb_system
Definition
analysis/common/analysis_tree_converter/steer/Config.h:93
cbm::atconverter::Config::f_glb_mode
ECbmRecoMode f_glb_mode
Definition
analysis/common/analysis_tree_converter/steer/Config.h:88
cbm::atconverter::Config::f_glb_tslength
float f_glb_tslength
Definition
analysis/common/analysis_tree_converter/steer/Config.h:91
cbm::atconverter::Config::SaveYaml
void SaveYaml(const std::string &filename)
Save to YAML file.
Definition
analysis/common/analysis_tree_converter/steer/Config.h:68
cbm::atconverter::Config::f_glb_trackMatching
bool f_glb_trackMatching
Definition
analysis/common/analysis_tree_converter/steer/Config.h:96
cbm::atconverter::Config::ToCbmRecoMode
ECbmRecoMode ToCbmRecoMode(std::string tag)
cbm::atconverter::Config::f_glb_logVerbose
std::string f_glb_logVerbose
Definition
analysis/common/analysis_tree_converter/steer/Config.h:86
cbm::atconverter::Config::f_glb_logLevel
std::string f_glb_logLevel
Definition
analysis/common/analysis_tree_converter/steer/Config.h:85
cbm::atconverter::Config::f_glb_beamMom
float f_glb_beamMom
Definition
analysis/common/analysis_tree_converter/steer/Config.h:94
cbm::atconverter::Config::~Config
virtual ~Config()=default
Destructor.
cbm::atconverter::Config::f_fsd_maxChi2match
float f_fsd_maxChi2match
Definition
analysis/common/analysis_tree_converter/steer/Config.h:103
cbm::atconverter
Definition
analysis/common/analysis_tree_converter/app/Application.cxx:17
cbm::atconverter::ECbmEvbuildType
ECbmEvbuildType
Definition
analysis/common/analysis_tree_converter/steer/Config.h:26
cbm::atconverter::ECbmEvbuildType::Ideal
@ Ideal
cbm::atconverter::ECbmEvbuildType::Real
@ Real
cbm::atconverter::ECbmEvbuildType::Undefined
@ Undefined
analysis
common
analysis_tree_converter
steer
Config.h
Generated on Sun Dec 22 2024 23:04:05 for CbmRoot by
1.12.0