00001 /* BDSIM code. 00002 Author: Stewart T. Boogert , Royal Holloway, Univ. of London. 00003 Last modified 16.04.2013 00004 Copyright (c) 2002 by BDSIM authors. ALL RIGHTS RESERVED. 00005 */ 00006 00007 #ifndef BDSExecOptions_h 00008 #define BDSExecOptions_h 00009 00010 #include <getopt.h> 00011 00012 #include "G4String.hh" 00013 #include "G4Types.hh" 00014 #include "BDSOutputFormat.hh" 00015 00016 class BDSExecOptions 00017 { 00018 public: 00019 00020 static const BDSExecOptions* Instance(); 00021 static const BDSExecOptions* Instance(int argc, char **argv); 00022 ~BDSExecOptions(); 00023 00024 void Usage()const; 00025 void Print()const; 00026 00027 inline G4String GetInputFilename() const {return inputFilename;} 00028 inline G4String GetVisMacroFilename() const {return visMacroFilename;} 00029 inline G4bool GetVisDebug() const {return visDebug;} 00030 inline G4String GetOutputFilename() const {return outputFilename;} 00031 inline BDSOutputFormat GetOutputFormat() const {return outputFormat;} 00032 inline G4bool GetOutline() const {return outline;} 00033 inline G4String GetOutlineFilename() const {return outlineFilename;} 00034 inline G4String GetOutlineFormat() const {return outlineFormat;} 00035 00036 inline G4bool GetGFlash() const {return gflash;} 00037 inline G4double GetGFlashEMax() const {return gflashemax;} 00038 inline G4double GetGFlashEMin() const {return gflashemin;} 00039 00040 inline G4bool GetVerbose() const {return verbose;} 00041 inline G4bool GetVerboseEvent() const {return verboseEvent;} 00042 inline G4bool GetVerboseStep() const {return verboseStep;} 00043 inline G4int GetVerboseEventNumber() const {return verboseEventNumber;} 00044 inline G4bool GetBatch() const {return batch;} 00045 00046 inline G4int GetVerboseRunLevel() const {return verboseRunLevel;} 00047 inline G4int GetVerboseEventLevel() const {return verboseEventLevel;} 00048 inline G4int GetVerboseTrackingLevel() const {return verboseTrackingLevel;} 00049 inline G4int GetVerboseSteppingLevel() const {return verboseSteppingLevel;} 00050 00051 inline G4bool GetCircular() const {return circular;} 00052 inline G4int GetSeed() const {return seed;} 00053 inline G4bool SetSeed() const {return setSeed;} 00054 inline G4String GetBDSIMPATH() const {return itsBDSIMPATH;} 00055 inline G4bool SetSeedState() const {return setSeedState;} 00056 inline G4String GetSeedStateFilename() const {return seedStateFilename;} 00057 00058 protected : 00059 BDSExecOptions(int argc, char** argv); 00060 static BDSExecOptions* _instance; 00061 00062 private : 00063 BDSExecOptions(); 00064 void Parse(int arcg, char **argv); 00065 00066 G4String inputFilename; 00067 G4String visMacroFilename; 00068 G4bool visDebug; 00069 00071 G4String outputFilename; 00072 BDSOutputFormat outputFormat; 00074 00076 G4bool outline; 00077 G4String outlineFilename; 00078 G4String outlineFormat; 00080 00082 G4bool gflash; 00083 G4double gflashemax; 00084 G4double gflashemin; 00086 00087 G4bool batch; 00088 00090 G4bool verbose; 00091 G4bool verboseEvent; 00092 G4bool verboseStep; 00093 G4int verboseEventNumber; 00094 00095 G4int verboseRunLevel; 00096 G4int verboseEventLevel; 00097 G4int verboseTrackingLevel; 00098 G4int verboseSteppingLevel; 00100 00101 G4bool circular; 00102 G4int seed; 00103 G4bool setSeed; 00104 00105 G4String itsBDSIMPATH; 00106 G4bool setSeedState; 00107 G4String seedStateFilename; 00108 }; 00109 00110 #endif