CbmRoot
Loading...
Searching...
No Matches
cbm::sim::digitization::ProgramOptions Class Reference

#include <ProgramOptions.h>

Collaboration diagram for cbm::sim::digitization::ProgramOptions:
[legend]

Public Member Functions

 ProgramOptions (int argc, char *argv[])
 Standard constructor with command line arguments.
 
 ProgramOptions (const ProgramOptions &)=delete
 Copy constructor forbidden.
 
ProgramOptionsoperator= (const ProgramOptions &)=delete
 Assignment operator forbidden.
 
 ~ProgramOptions ()=default
 Destructor.
 
const std::string & OutputFile () const
 Get output file name (.root format)
 
const std::vector< std::string > & TraFiles () const
 Get transport file name.
 
const std::string & ParFile () const
 Get parameter file name.
 
const std::string & ConfigFile () const
 Get configuration file name (YAML format)
 
const std::string & SetupTag () const
 Get geometry setup tag.
 
bool Overwrite () const
 Get overwrite option.
 

Private Member Functions

void ParseOptions (int argc, char *argv[])
 Parse command line arguments using boost program_options.
 

Private Attributes

std::string fOutput = ""
 Output file name (ROOT format)
 
std::vector< std::string > fTra
 List of transport input sources (ROOT format)
 
std::string fPar = ""
 Parameter file name (ROOT format)
 
std::string fConfig = ""
 Configuration file name (YAML format)
 
std::string fSetup = ""
 Geometry setup tag.
 
bool fOverwrite = false
 Enable overwriting of existing output file.
 

Detailed Description

Author
Frederic Linz f.lin.nosp@m.z@gs.nosp@m.i.de
Since
09 January 2024

Program option class for the application cbmatc

Definition at line 31 of file sim/response/app/ProgramOptions.h.

Constructor & Destructor Documentation

◆ ProgramOptions() [1/2]

cbm::sim::digitization::ProgramOptions::ProgramOptions ( int argc,
char * argv[] )
inline

Standard constructor with command line arguments.

Definition at line 34 of file sim/response/app/ProgramOptions.h.

References ParseOptions().

◆ ProgramOptions() [2/2]

cbm::sim::digitization::ProgramOptions::ProgramOptions ( const ProgramOptions & )
delete

Copy constructor forbidden.

◆ ~ProgramOptions()

cbm::sim::digitization::ProgramOptions::~ProgramOptions ( )
default

Destructor.

Member Function Documentation

◆ ConfigFile()

const std::string & cbm::sim::digitization::ProgramOptions::ConfigFile ( ) const
inlinenodiscard

Get configuration file name (YAML format)

Definition at line 55 of file sim/response/app/ProgramOptions.h.

References fConfig.

◆ operator=()

ProgramOptions & cbm::sim::digitization::ProgramOptions::operator= ( const ProgramOptions & )
delete

Assignment operator forbidden.

◆ OutputFile()

const std::string & cbm::sim::digitization::ProgramOptions::OutputFile ( ) const
inlinenodiscard

Get output file name (.root format)

Definition at line 46 of file sim/response/app/ProgramOptions.h.

References fOutput.

◆ Overwrite()

bool cbm::sim::digitization::ProgramOptions::Overwrite ( ) const
inlinenodiscard

Get overwrite option.

Definition at line 61 of file sim/response/app/ProgramOptions.h.

References fOverwrite.

◆ ParFile()

const std::string & cbm::sim::digitization::ProgramOptions::ParFile ( ) const
inlinenodiscard

Get parameter file name.

Definition at line 52 of file sim/response/app/ProgramOptions.h.

References fPar.

◆ ParseOptions()

void ProgramOptions::ParseOptions ( int argc,
char * argv[] )
private

Parse command line arguments using boost program_options.

Definition at line 29 of file sim/response/app/ProgramOptions.cxx.

References DEFAULT_CONFIG, DEFAULT_SETUP, fConfig, fOutput, fOverwrite, fPar, fSetup, and fTra.

Referenced by ProgramOptions().

◆ SetupTag()

const std::string & cbm::sim::digitization::ProgramOptions::SetupTag ( ) const
inlinenodiscard

Get geometry setup tag.

Definition at line 58 of file sim/response/app/ProgramOptions.h.

References fSetup.

◆ TraFiles()

const std::vector< std::string > & cbm::sim::digitization::ProgramOptions::TraFiles ( ) const
inlinenodiscard

Get transport file name.

Definition at line 49 of file sim/response/app/ProgramOptions.h.

References fTra.

Member Data Documentation

◆ fConfig

std::string cbm::sim::digitization::ProgramOptions::fConfig = ""
private

Configuration file name (YAML format)

Definition at line 73 of file sim/response/app/ProgramOptions.h.

Referenced by ConfigFile(), and ParseOptions().

◆ fOutput

std::string cbm::sim::digitization::ProgramOptions::fOutput = ""
private

Output file name (ROOT format)

Definition at line 70 of file sim/response/app/ProgramOptions.h.

Referenced by OutputFile(), and ParseOptions().

◆ fOverwrite

bool cbm::sim::digitization::ProgramOptions::fOverwrite = false
private

Enable overwriting of existing output file.

Definition at line 75 of file sim/response/app/ProgramOptions.h.

Referenced by Overwrite(), and ParseOptions().

◆ fPar

std::string cbm::sim::digitization::ProgramOptions::fPar = ""
private

Parameter file name (ROOT format)

Definition at line 72 of file sim/response/app/ProgramOptions.h.

Referenced by ParFile(), and ParseOptions().

◆ fSetup

std::string cbm::sim::digitization::ProgramOptions::fSetup = ""
private

Geometry setup tag.

Definition at line 74 of file sim/response/app/ProgramOptions.h.

Referenced by ParseOptions(), and SetupTag().

◆ fTra

std::vector<std::string> cbm::sim::digitization::ProgramOptions::fTra
private

List of transport input sources (ROOT format)

Definition at line 71 of file sim/response/app/ProgramOptions.h.

Referenced by ParseOptions(), and TraFiles().


The documentation for this class was generated from the following files: