CbmRoot
Loading...
Searching...
No Matches
sim/response/steer/Run.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 CBMSIM_DIGITIZATION_STEER_RUN_H
11#define CBMSIM_DIGITIZATION_STEER_RUN_H 1
12
13#include "Config.h"
14
15#include <TNamed.h>
16#include <TString.h>
17
18#include <string>
19#include <vector>
20
21class CbmSetup;
22class FairTask;
23class CbmDigitization;
24class TTree;
25
27{
28
29 class Run : public TNamed {
30
31 public:
33 Run();
34
35
37 virtual ~Run();
38
39
41 void AllowOverwrite() { fOverwrite = true; }
42
43
45 void Exec();
46
47
49 const Config& GetConfig() const { return fConfig; }
50
51
54 std::string GetFileName(const TString file);
55
56
63 void LoadConfig(const char* fileName);
64
65
69 void SetConfig(const Config& config) { fConfig = config; }
70
71
75 void SetGeoSetupTag(const char* tag) { fSetupTag = tag; }
76
77
81 void SetOutput(const char* fileName) { fOutput = fileName; }
82
83
87 void SetTraFiles(const std::vector<std::string> files);
88
89
93 void SetParFile(const char* fileName) { fPar = fileName; }
94
95
96 private:
98 Run(const Run&) = delete;
99
100
102 Run operator=(const Run&) = delete;
103
104
109 bool CheckFile(const char* fileName);
110
111
112 private:
114 TString fOutput = "";
115 std::vector<TString> fTra;
116 TString fPar = "";
117 TString fSetupTag = "";
118 CbmSetup* fSetup = nullptr;
119 bool fOverwrite = false;
120
121 public:
123
124
126 };
127
128} // namespace cbm::sim::digitization
129
130#endif /* CBMSIM_DIGITIZATION_STEER_RUN_H */
std::string GetFileName(const TString file)
Get file name without ending.
void SetTraFiles(const std::vector< std::string > files)
Set transport file name.
ClassDef(cbm::sim::digitization::Run, 1)
Run operator=(const Run &)=delete
Assignment operator forbidden.
void SetParFile(const char *fileName)
Set parameter file name.
void SetConfig(const Config &config)
Set configuration.
bool CheckFile(const char *fileName)
Check existence of a file.
const Config & GetConfig() const
Settings object.
void AllowOverwrite()
Allow overwriting if output file already exists.
Run(const Run &)=delete
Copy constructor forbidden.
void LoadConfig(const char *fileName)
Set configuration file name.
void SetOutput(const char *fileName)
Set output file name.
void SetGeoSetupTag(const char *tag)
Set geometry setup tag.