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 );
87 if ( it->second ==
b_defaults.find(name)->second ) {
103 const std::map<std::string,G4int>::iterator it =
i_values.find( name );
105 if ( it->second ==
i_defaults.find(name)->second ) {
127 const std::map<std::string,G4double>::iterator it =
values.find( name );
128 if ( it !=
values.end() ) {
129 if ( it->second ==
defaults.find(name)->second ) {
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 );
198 const std::map<std::string,G4bool>::iterator it =
b_values.find( name );
202 if ( check_change && value !=
b_defaults.find(name)->second ) {
223 const std::map<std::string,G4int>::iterator it =
i_values.find( name );
227 if ( check_change && value !=
i_defaults.find(name)->second ) {
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: "
268 <<
", default value = " <<
b_defaults.find( name )->second
269 <<
", current value = " <<
b_values.find( name )->second
272 G4cout <<
"G4HadronicDeveloperParameters: "
274 <<
", default value = " <<
i_defaults.find( name )->second
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 issue_is_already_defined(const std::string &name)
G4HadronicDeveloperParameters()
G4bool SetDefault(const std::string name, const G4bool value)
void Dump(const std::string name)
G4bool GetDefault(const std::string name, G4bool &value)
G4bool Set(const std::string name, const G4bool)
void issue_no_param(const std::string &name)
const XML_Char int const XML_Char * value
std::map< std::string, std::pair< const G4int, const G4int > > i_limits
void issue_is_modified(const std::string &name)
void issue_has_changed(const std::string &name)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::map< std::string, const G4int > i_defaults
static MCTruthManager * instance
static G4HadronicDeveloperParameters & GetInstance()
G4GLOB_DLL std::ostream G4cout
G4bool get(const std::string name, G4bool &value, G4bool check_change=false)
std::map< std::string, std::pair< const G4double, const G4double > > limits
std::map< std::string, const G4double > defaults
void issue_non_eligible_value(const std::string &name)
std::map< std::string, const G4bool > b_defaults
G4bool DeveloperGet(const std::string name, G4bool &value)
std::map< std::string, G4int > i_values
G4bool Get(const std::string name, G4bool &value)
std::map< std::string, G4bool > b_values
G4bool check_value_within_limits(std::pair< const G4double, const G4double > &, G4double)
std::map< std::string, G4double > values