CbmRoot
Loading...
Searching...
No Matches
reco/offline/app/ProgramOptions.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: Volker Friese [committer], Jan de Cuveland */
4
12#ifndef CBM_RECO_OFFLINE_APP_PROGRAMOPTIONS_H
13#define CBM_RECO_OFFLINE_APP_PROGRAMOPTIONS_H 1
14
15#define DEFAULT_CONFIG "reco/offline/config/RecoConfig_event_ideal.yaml"
16#define DEFAULT_SETUP "sis100_electron"
17
18
19#include <string>
20
21namespace cbm::reco::offline
22{
23
31 public:
33 ProgramOptions(int argc, char* argv[]) { ParseOptions(argc, argv); }
34
37
40
42 ~ProgramOptions() = default;
43
45 [[nodiscard]] const std::string& RawFile() const { return fRaw; }
46
48 [[nodiscard]] const std::string& OutputFile() const { return fOutput; }
49
51 [[nodiscard]] const std::string& ConfigFile() const { return fConfig; }
52
54 [[nodiscard]] bool Overwrite() const { return fOverwrite; }
55
57 [[nodiscard]] const std::string& ParFile() const { return fPar; }
58
60 [[nodiscard]] const std::string& SetupTag() const { return fSetup; }
61
62
63 private:
65 void ParseOptions(int argc, char* argv[]);
66
67
68 private: // members
69 std::string fRaw = "";
70 std::string fOutput = "";
71 std::string fPar = "";
72 std::string fConfig = "";
73 std::string fSetup = "";
74 bool fOverwrite = false;
75 };
76
77} // namespace cbm::reco::offline
78
79#endif /* CBM_RECO_OFFLINE_APP_PROGRAMOPTIONS_H */
const std::string & SetupTag() const
Get geometry setup tag.
std::string fRaw
Input raw (digi) file name (ROOT format)
ProgramOptions & operator=(const ProgramOptions &)=delete
Assignment operator forbidden.
~ProgramOptions()=default
Destructor.
const std::string & RawFile() const
Get digitization (raw) file name.
const std::string & ParFile() const
Get parameter file name.
std::string fPar
Parameter file name (ROOT format)
bool fOverwrite
Enable overwriting of existing output file.
const std::string & OutputFile() const
Get output file name (.root format)
std::string fConfig
Configuration file name (YAML format)
std::string fOutput
Output file name (ROOT format)
bool Overwrite() const
Get overwrite option.
ProgramOptions(const ProgramOptions &)=delete
Copy constructor forbidden.
const std::string & ConfigFile() const
Get configuration file name (YAML format)
void ParseOptions(int argc, char *argv[])
Parse command line arguments using boost program_options.
ProgramOptions(int argc, char *argv[])
Standard constructor with command line arguments.