CbmRoot
Loading...
Searching...
No Matches
sim/response/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: Frederic Linz [committer], Volker Friese, Jan de Cuveland */
4
12#ifndef CBMSIM_DIGITIZATION_APP_PROGRAMOPTIONS_H
13#define CBMSIM_DIGITIZATION_APP_PROGRAMOPTIONS_H 1
14
15#define DEFAULT_CONFIG "sim/response/config/DigiConfig_event_ideal.yaml"
16#define DEFAULT_SETUP "sis100_electron"
17
18
19#include <string>
20#include <vector>
21
23{
24
32 public:
34 ProgramOptions(int argc, char* argv[]) { ParseOptions(argc, argv); }
35
38
41
43 ~ProgramOptions() = default;
44
46 [[nodiscard]] const std::string& OutputFile() const { return fOutput; }
47
49 [[nodiscard]] const std::vector<std::string>& TraFiles() const { return fTra; }
50
52 [[nodiscard]] const std::string& ParFile() const { return fPar; }
53
55 [[nodiscard]] const std::string& ConfigFile() const { return fConfig; }
56
58 [[nodiscard]] const std::string& SetupTag() const { return fSetup; }
59
61 [[nodiscard]] bool Overwrite() const { return fOverwrite; }
62
63
64 private:
66 void ParseOptions(int argc, char* argv[]);
67
68
69 private: // members
70 std::string fOutput = "";
71 std::vector<std::string> fTra;
72 std::string fPar = "";
73 std::string fConfig = "";
74 std::string fSetup = "";
75 bool fOverwrite = false;
76 };
77
78} // namespace cbm::sim::digitization
79
80#endif /* CBMSIM_DIGITIZATION_APP_PROGRAMOPTIONS_H */
bool fOverwrite
Enable overwriting of existing output file.
ProgramOptions(const ProgramOptions &)=delete
Copy constructor forbidden.
const std::string & ParFile() const
Get parameter file name.
std::vector< std::string > fTra
List of transport input sources (ROOT format)
std::string fConfig
Configuration file name (YAML format)
std::string fOutput
Output file name (ROOT format)
std::string fPar
Parameter file name (ROOT format)
ProgramOptions & operator=(const ProgramOptions &)=delete
Assignment operator forbidden.
const std::vector< std::string > & TraFiles() const
Get transport file name.
const std::string & ConfigFile() const
Get configuration file name (YAML format)
const std::string & SetupTag() const
Get geometry setup tag.
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.
const std::string & OutputFile() const
Get output file name (.root format)