BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSExecOptions.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2022.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef BDSEXECOPTIONS_H
20#define BDSEXECOPTIONS_H
21
22#include "globals.hh" // geant4 types / globals
23
24#include "parser/beam.h"
25#include "parser/options.h"
26
32{
33public:
34 BDSExecOptions(int argc, char **argv);
35
37
39 void Usage() const;
40
42 void PrintCopyright() const;
43
45 void PrintCitation() const;
46
48 void Print() const;
49
51 const GMAD::Options& Options() const {return options;}
52
54 const GMAD::Beam& Beam() const {return beam;}
55
57 inline G4String InputFileName() const {return options.inputFileName;}
58
59 inline G4bool IgnoreSIGINT() const {return ignoreSIGINT;}
60
61private:
64
69 void Parse(int argc, char **argv);
70
72 G4String GetPath(G4String filename);
73
76
79
82};
83
84#endif
Executable option processing for BDSIM.
GMAD::Options options
The options instance that is populated by parsing the command line options.
const GMAD::Options & Options() const
Accessor for options generated by command line parsing.
GMAD::Beam beam
The beam instance that is populated by parsing some command line options.
void Print() const
Print out the commands and their set values.
void PrintCitation() const
Print academic citation information.
G4bool IgnoreSIGINT() const
Accessor.
G4bool ignoreSIGINT
Whether to ignore Ctrl-C or not - used for ctest.
const GMAD::Beam & Beam() const
Accessor for beam options generate by command line parsing.
void Usage() const
Print out the available executable commands (no exit).
void PrintCopyright() const
Print out the copyright information (no exit).
void Parse(int argc, char **argv)
G4String GetPath(G4String filename)
Helper method to set the BDSIMPath correctly.
BDSExecOptions()
Private default constructor to force use of provided one.
G4String InputFileName() const
Acessor for convenience for the one thing that's needed before the parser options.
Beam class.
Definition: beam.h:44
std::string inputFileName
Input filename.
Definition: optionsBase.h:40
Options class.
Definition: options.h:44