42G4tgrParameterMgr::G4tgrParameterMgr()
47G4tgrParameterMgr::~G4tgrParameterMgr()
55 if(theInstance ==
nullptr)
76 G4cout <<
" G4tgrParameterMgr::AddParameterNumber() -"
77 <<
" parameter added " << wl[1] <<
" = " << theParameterList[wl[1]]
90 theParameterList[wl[1]] = wl[2];
95 G4cout <<
" G4tgrParameterMgr::AddParameterString() -"
96 <<
" parameter added " << wl[1] <<
" = " << theParameterList[wl[1]]
108 G4mapss::const_iterator sdite = theParameterList.find(wl[1]);
109 if(sdite == theParameterList.cend())
111 existsAlready =
false;
115 existsAlready =
true;
122 G4String ErrMessage =
"Parameter already exists... " + wl[1];
123 G4Exception(
"G4tgrParameterMgr::CheckParameter()",
"IllegalConstruct",
128 G4String WarMessage =
"Parameter already exists... " + wl[1];
129 G4Exception(
"G4tgrParameterMgr::CheckParameter()",
"NotRecommended",
143 G4mapss::const_iterator sdite = theParameterList.find(name);
144 if(sdite == theParameterList.cend())
149 G4String ErrMessage =
"Parameter not found in list: " + name;
150 G4Exception(
"G4tgrParameterMgr::FindParameter()",
"InvalidSetup",
157 par = ((*sdite).second);
161 G4cout <<
" G4tgrParameterMgr::FindParameter() -"
162 <<
" parameter found " << name <<
" = " << par <<
G4endl;
174 G4cout <<
" @@@@@@@@@@@@@@@@@@ Dumping parameter list " <<
G4endl;
175 for(
auto cite = theParameterList.cbegin();
176 cite != theParameterList.cend(); ++cite)
178 G4cout << (*cite).first <<
" = " << (*cite).second <<
G4endl;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
static G4String ConvertToString(G4bool boolVal)
static G4int GetVerboseLevel()
void CheckIfNewParameter(const std::vector< G4String > &wl, G4bool mustBeNew)
void AddParameterNumber(const std::vector< G4String > &wl, G4bool mustBeNew=false)
void AddParameterString(const std::vector< G4String > &wl, G4bool mustBeNew=false)
G4String FindParameter(const G4String &name, G4bool exists=true)
static G4tgrParameterMgr * GetInstance()
static void CheckWLsize(const std::vector< G4String > &wl, unsigned int nWCheck, WLSIZEtype st, const G4String &methodName)
static G4double GetDouble(const G4String &str, G4double unitval=1.)