41 const std::map< std::string , const G4bool >::iterator it =
b_defaults.find(
name );
44 b_defaults.insert( std::pair<std::string, const G4bool>(
name , value ) );
45 b_values.insert( std::pair<std::string, G4bool>(
name , value ) );
55 const std::map< std::string , const G4int >::iterator it =
i_defaults.find(
name );
58 i_defaults.insert( std::pair<std::string, const G4int>(
name , value ) );
59 i_values.insert( std::pair<std::string, G4int>(
name , value ) );
60 i_limits.insert( std::pair< std::string,std::pair< const G4int , const G4int> >(
name, std::pair< const G4int , const G4int> ( lower_limit , upper_limit ) ) );
70 const std::map< std::string , const G4double >::iterator it =
defaults.find(
name );
73 defaults.insert( std::pair<std::string, const G4double>(
name , value ) );
74 values.insert( std::pair<std::string, G4double>(
name , value ) );
75 limits.insert( std::pair< std::string,std::pair< const G4double , const G4double> >(
name, std::pair< const G4double , const G4double> ( lower_limit , upper_limit ) ) );
85 const std::map<std::string,G4bool>::iterator it =
b_values.find(
name );
103 const std::map<std::string,G4int>::iterator it =
i_values.find(
name );
127 const std::map<std::string,G4double>::iterator it =
values.find(
name );
128 if ( it !=
values.end() ) {
151 const std::map<std::string,const G4bool>::iterator it =
b_defaults.find(
name );
164 const std::map<std::string,const G4int>::iterator it =
i_defaults.find(
name );
177 const std::map<std::string,const G4double>::iterator it =
defaults.find(
name );
193 return get(
name , value ,
true );
198 const std::map<std::string,G4bool>::iterator it =
b_values.find(
name );
218 return get(
name , value ,
true );
223 const std::map<std::string,G4int>::iterator it =
i_values.find(
name );
243 return get(
name , value ,
true );
248 const std::map<std::string,G4double>::iterator it =
values.find(
name );
249 if ( it !=
values.end() ) {
252 if ( check_change && value !=
defaults.find(
name)->second ) {
266 G4cout <<
"G4HadronicDeveloperParameters: "
269 <<
", current value = " <<
b_values.find(
name )->second
272 G4cout <<
"G4HadronicDeveloperParameters: "
275 <<
", lower limit = " <<
i_limits.find(
name )->second.first
276 <<
", upper limit = " <<
i_limits.find(
name )->second.second
277 <<
", current value = " <<
i_values.find(
name )->second
280 G4cout <<
"G4HadronicDeveloperParameters: "
282 <<
", default value = " <<
defaults.find(
name )->second
283 <<
", lower limit = " <<
limits.find(
name )->second.first
284 <<
", upper limit = " <<
limits.find(
name )->second.second
285 <<
", current value = " <<
values.find(
name )->second
294 if ( alimits.first <= value && value <= alimits.second ) {
302 if ( alimits.first <= value && value <= alimits.second ) {
310 std::string text(
"Parameter ");
312 text +=
" does not exist.";
317 std::string text(
"Parameter ");
319 text +=
" has already been changed once.";
323 std::string text(
"The value of the parameter ");
325 text +=
" is outside the allowable range.";
329 std::string text(
"Parameter ");
331 text +=
" is already defined.";
335 std::string text(
"Parameter ");
337 text +=
" has changed from default value.";
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
std::map< std::string, std::pair< const G4double, const G4double > > limits
std::map< std::string, const G4double > defaults
std::map< std::string, G4int > i_values
std::map< std::string, G4bool > b_values
std::map< std::string, const G4bool > b_defaults
G4bool DeveloperGet(const std::string name, G4bool &value)
void Dump(const std::string name)
G4bool Get(const std::string name, G4bool &value)
void issue_no_param(const std::string &name)
void issue_is_modified(const std::string &name)
G4bool Set(const std::string name, const G4bool)
void issue_is_already_defined(const std::string &name)
G4bool check_value_within_limits(std::pair< const G4double, const G4double > &, G4double)
G4bool get(const std::string name, G4bool &value, G4bool check_change=false)
std::map< std::string, G4double > values
void issue_non_eligible_value(const std::string &name)
static G4HadronicDeveloperParameters & GetInstance()
G4bool SetDefault(const std::string name, const G4bool value)
std::map< std::string, std::pair< const G4int, const G4int > > i_limits
std::map< std::string, const G4int > i_defaults
void issue_has_changed(const std::string &name)
G4HadronicDeveloperParameters()
G4bool GetDefault(const std::string name, G4bool &value)
const char * name(G4int ptype)