BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Private Member Functions | Private Attributes
BDSExecOptions Class Reference

Executable option processing for BDSIM. More...

#include <BDSExecOptions.hh>

Collaboration diagram for BDSExecOptions:
Collaboration graph

Public Member Functions

 BDSExecOptions (int argc, char **argv)
 
void Usage () const
 Print out the available executable commands (no exit). More...
 
void PrintCopyright () const
 Print out the copyright information (no exit). More...
 
void PrintCitation () const
 Print academic citation information. More...
 
void Print () const
 Print out the commands and their set values. More...
 
const GMAD::OptionsOptions () const
 Accessor for options generated by command line parsing. More...
 
const GMAD::BeamBeam () const
 Accessor for beam options generate by command line parsing. More...
 
G4String InputFileName () const
 Acessor for convenience for the one thing that's needed before the parser options. More...
 
G4bool IgnoreSIGINT () const
 Accessor. More...
 

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. More...
 

Private Attributes

GMAD::Options options
 The options instance that is populated by parsing the command line options. More...
 
GMAD::Beam beam
 The beam instance that is populated by parsing some command line options. More...
 
G4bool ignoreSIGINT
 Whether to ignore Ctrl-C or not - used for ctest. More...
 

Detailed Description

Executable option processing for BDSIM.

Definition at line 31 of file BDSExecOptions.hh.

Constructor & Destructor Documentation

◆ BDSExecOptions()

BDSExecOptions::BDSExecOptions ( int  argc,
char **  argv 
)

◆ ~BDSExecOptions()

BDSExecOptions::~BDSExecOptions ( )
inline

Definition at line 36 of file BDSExecOptions.hh.

Member Function Documentation

◆ Beam()

const GMAD::Beam & BDSExecOptions::Beam ( ) const
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().

Here is the caller graph for this function:

◆ GetPath()

G4String BDSExecOptions::GetPath ( G4String  filename)
private

Helper method to set the BDSIMPath correctly.

Definition at line 526 of file BDSExecOptions.cc.

References BDS::GetCurrentDir().

Referenced by BDSExecOptions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IgnoreSIGINT()

G4bool BDSExecOptions::IgnoreSIGINT ( ) const
inline

Accessor.

Definition at line 59 of file BDSExecOptions.hh.

References ignoreSIGINT.

Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().

Here is the caller graph for this function:

◆ InputFileName()

G4String BDSExecOptions::InputFileName ( ) const
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().

Here is the caller graph for this function:

◆ Options()

const GMAD::Options & BDSExecOptions::Options ( ) const
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().

Here is the caller graph for this function:

◆ Parse()

void BDSExecOptions::Parse ( int  argc,
char **  argv 
)
private

Parse the command line options

Parameters
[in]argccommand line input number of variables
[in]argvarray 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Print()

void BDSExecOptions::Print ( ) const

Print out the commands and their set values.

Definition at line 518 of file BDSExecOptions.cc.

References beam, and options.

Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().

Here is the caller graph for this function:

◆ PrintCitation()

void BDSExecOptions::PrintCitation ( ) const

Print academic citation information.

Definition at line 500 of file BDSExecOptions.cc.

Referenced by Parse().

Here is the caller graph for this function:

◆ PrintCopyright()

void BDSExecOptions::PrintCopyright ( ) const

Print out the copyright information (no exit).

Definition at line 487 of file BDSExecOptions.cc.

Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().

Here is the caller graph for this function:

◆ Usage()

void BDSExecOptions::Usage ( ) const

Print out the available executable commands (no exit).

Definition at line 426 of file BDSExecOptions.cc.

Referenced by BDSExecOptions(), and Parse().

Here is the caller graph for this function:

Field Documentation

◆ beam

GMAD::Beam BDSExecOptions::beam
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().

◆ ignoreSIGINT

G4bool BDSExecOptions::ignoreSIGINT
private

Whether to ignore Ctrl-C or not - used for ctest.

Definition at line 81 of file BDSExecOptions.hh.

Referenced by IgnoreSIGINT(), and Parse().

◆ options

GMAD::Options BDSExecOptions::options
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().


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