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
22namespace cbm::atconverter
23{
24
25 enum class ECbmEvbuildType
26 {
27 Ideal,
28 Real,
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";
89 int f_glb_numTs = -1;
91 float f_glb_tslength = 1.e5;
92
93 std::string f_glb_system = "";
94 float f_glb_beamMom = 12.;
95
97
98 // --- Event builder
100
101 // --- Fsd hits converter settings
103 float f_fsd_maxChi2match = 10000.;
104 };
105
106} // namespace cbm::atconverter
107
108
109#endif /* CBM_ATCONVERTER_STEER_CONFIG_H */
ECbmRecoMode
Reconstruct the full time slice or event-by-event.
Definition CbmDefs.h:162
Config()=default
Constructor.
void LoadYaml(const std::string &filename)
Load from YAML file.
void SaveYaml(const std::string &filename)
Save to YAML file.
ECbmRecoMode ToCbmRecoMode(std::string tag)
virtual ~Config()=default
Destructor.