BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Executable option processing for BDSIM. More...
#include <BDSExecOptions.hh>
Public Member Functions | |
BDSExecOptions (int argc, char **argv) | |
void | Usage () const |
Print out the available executable commands (no exit). | |
void | PrintCopyright () const |
Print out the copyright information (no exit). | |
void | PrintCitation () const |
Print academic citation information. | |
void | Print () const |
Print out the commands and their set values. | |
const GMAD::Options & | Options () const |
Accessor for options generated by command line parsing. | |
const GMAD::Beam & | Beam () const |
Accessor for beam options generate by command line parsing. | |
G4String | InputFileName () const |
Acessor for convenience for the one thing that's needed before the parser options. | |
G4bool | IgnoreSIGINT () const |
Accessor. | |
Private Member Functions | |
BDSExecOptions () | |
Private default constructor to force use of provided one. | |
void | Parse (int argc, char **argv) |
G4String | GetPath (G4String filename) |
Helper method to set the BDSIMPath correctly. | |
Private Attributes | |
GMAD::Options | options |
The options instance that is populated by parsing the command line options. | |
GMAD::Beam | beam |
The beam instance that is populated by parsing some command line options. | |
G4bool | ignoreSIGINT |
Whether to ignore Ctrl-C or not - used for ctest. | |
Executable option processing for BDSIM.
Definition at line 31 of file BDSExecOptions.hh.
BDSExecOptions::BDSExecOptions | ( | int | argc, |
char ** | argv | ||
) |
after parsing the absolute path can be reconstructed
Definition at line 39 of file BDSExecOptions.cc.
References GMAD::Beam::Amalgamate(), GMAD::Options::Amalgamate(), GMAD::OptionsBase::batch, GMAD::OptionsBase::bdsimPath, beam, GetPath(), GMAD::OptionsBase::inputFileName, options, Parse(), GMAD::OptionsBase::recreate, GMAD::OptionsBase::recreateFileName, GMAD::Options::set_value(), GMAD::OptionsBase::startFromEvent, and Usage().
|
inline |
Definition at line 36 of file BDSExecOptions.hh.
|
inline |
Accessor for beam options generate by command line parsing.
Definition at line 54 of file BDSExecOptions.hh.
References beam.
Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().
|
private |
Helper method to set the BDSIMPath correctly.
Definition at line 537 of file BDSExecOptions.cc.
References BDS::GetCurrentDir().
Referenced by BDSExecOptions().
|
inline |
Accessor.
Definition at line 59 of file BDSExecOptions.hh.
References ignoreSIGINT.
Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().
|
inline |
Acessor for convenience for the one thing that's needed before the parser options.
Definition at line 57 of file BDSExecOptions.hh.
References GMAD::OptionsBase::inputFileName, and options.
Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().
|
inline |
Accessor for options generated by command line parsing.
Definition at line 51 of file BDSExecOptions.hh.
References options.
Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().
|
private |
Parse the command line options
[in] | argc | command line input number of variables |
[in] | argv | array of char* of the input parameters |
Definition at line 75 of file BDSExecOptions.cc.
References beam, ignoreSIGINT, BDSColourFromMaterial::Instance(), BDSColours::Instance(), BDSMaterials::Instance(), BDS::IsInteger(), BDS::IsNumber(), BDSMaterials::ListMaterials(), options, BDSColours::Print(), PrintCitation(), GMAD::Beam::set_value(), GMAD::Options::set_value(), and Usage().
Referenced by BDSExecOptions().
void BDSExecOptions::Print | ( | ) | const |
Print out the commands and their set values.
Definition at line 529 of file BDSExecOptions.cc.
Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().
void BDSExecOptions::PrintCitation | ( | ) | const |
Print academic citation information.
Definition at line 511 of file BDSExecOptions.cc.
Referenced by Parse().
void BDSExecOptions::PrintCopyright | ( | ) | const |
Print out the copyright information (no exit).
Definition at line 498 of file BDSExecOptions.cc.
Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().
void BDSExecOptions::Usage | ( | ) | const |
Print out the available executable commands (no exit).
Definition at line 434 of file BDSExecOptions.cc.
Referenced by BDSExecOptions(), and Parse().
|
private |
The beam instance that is populated by parsing some command line options.
Definition at line 78 of file BDSExecOptions.hh.
Referenced by BDSExecOptions(), Beam(), Parse(), and Print().
|
private |
Whether to ignore Ctrl-C or not - used for ctest.
Definition at line 81 of file BDSExecOptions.hh.
Referenced by IgnoreSIGINT(), and Parse().
|
private |
The options instance that is populated by parsing the command line options.
Definition at line 75 of file BDSExecOptions.hh.
Referenced by BDSExecOptions(), InputFileName(), Options(), Parse(), and Print().