16 defaultparams(nullptr)
25 delete paramscontainer;
27 while(macroparams.begin() != macroparams.end())
29 delete macroparams.begin()->second;
30 macroparams.erase(macroparams.begin());
47 cout <<
"trying to overwrite default double " << name <<
" "
60 cout <<
"trying to overwrite default double " << name <<
" "
61 << defaultparams->
get_int_param(name) <<
" with " << ival << endl;
73 cout <<
"trying to overwrite default double " << name <<
" "
86 cout <<
"double parameter " << name <<
" not implemented" << endl;
87 cout <<
"implemented double parameters are:" << endl;
92 map<int, PHG4Parameters *>::iterator iter = macroparams.find(detid);
94 if (iter != macroparams.end())
96 params = iter->second;
100 ostringstream paramname;
101 paramname << paramscontainer->
Name() <<
"_" << detid;
103 macroparams[detid] = params;
116 cout <<
"no parameters for detid " << detid <<
" in "
117 << paramscontainer->
Name() <<
" found" << endl;
126 cout <<
"integer parameter " << name <<
" not implemented" << endl;
127 cout <<
"implemented integer parameters are:" << endl;
132 map<int, PHG4Parameters *>::iterator iter = macroparams.find(detid);
134 if (iter != macroparams.end())
136 params = iter->second;
140 ostringstream paramname;
141 paramname << paramscontainer->
Name() <<
"_" << detid;
156 cout <<
"no parameters for detid " << detid <<
" in "
157 << paramscontainer->
Name() <<
" found" << endl;
166 cout <<
"string parameter " << name <<
" not implemented" << endl;
167 cout <<
"implemented string parameters are:" << endl;
173 map<int, PHG4Parameters *>::iterator iter = macroparams.find(detid);
175 if (iter != macroparams.end())
177 params = iter->second;
181 ostringstream paramname;
182 paramname << paramscontainer->
Name() <<
"_" << detid;
197 cout <<
"no parameters for detid " << detid <<
" in "
198 << paramscontainer->
Name() <<
" found" << endl;
205 map<int, PHG4Parameters *>::const_iterator iter;
206 for (iter = macroparams.begin(); iter != macroparams.end(); ++iter)
211 std::pair< PHG4Parameters::dIter, PHG4Parameters::dIter> double_begin_end = iter->second->
get_all_double_params();
212 for (
PHG4Parameters::dIter diter = double_begin_end.first; diter != double_begin_end.second; ++diter)
217 std::pair< PHG4Parameters::iIter, PHG4Parameters::iIter> int_begin_end = iter->second->get_all_int_params();
223 std::pair< PHG4Parameters::strIter, PHG4Parameters::strIter> string_begin_end = iter->second->get_all_string_params();
257 ostringstream paramname;
258 paramname << paramscontainer->
Name() <<
"_" << detid;
PHBoolean addNode(PHNode *)
void CreateInitialize(const int detid)
std::string get_string_param(const int id, const std::string &name) const
virtual ~PHG4ParameterContainerInterface()
void set_default_int_param(const std::string &name, const int ival)
void InitializeParameters()
void set_int_param(const int id, const std::string &name, const int ival)
void set_name(const std::string &name)
void set_default_double_param(const std::string &name, const double dval)
double get_double_param(const int id, const std::string &name) const
void SaveToNodeTree(PHCompositeNode *runNode, const std::string &nodename)
void UpdateParametersWithMacro()
int get_int_param(const int id, const std::string &name) const
void set_default_string_param(const std::string &name, const std::string &sval)
PHG4ParameterContainerInterface(const std::string &name)
void set_double_param(const int id, const std::string &name, const double dval)
void PutOnParNode(PHCompositeNode *parNode, const std::string &nodename)
int ExistDetid(const int detid) const
void set_string_param(const int id, const std::string &name, const std::string &sval)
virtual void SetDefaultParameters()=0
void set_name(const std::string &name)
void AddPHG4Parameters(const int layer, PHG4Parameters *params)
int ExistDetid(const int detid) const
const PHG4Parameters * GetParameters(const int layer) const
void SaveToNodeTree(PHCompositeNode *topNode, const std::string &nodename)
PHG4Parameters * GetParametersToModify(const int layer)
void set_double_param(const std::string &name, const double dval)
bool exist_string_param(const std::string &name) const
dMap::const_iterator dIter
std::string get_string_param(const std::string &name) const
void set_int_param(const std::string &name, const int ival)
double get_double_param(const std::string &name) const
iMap::const_iterator iIter
bool exist_int_param(const std::string &name) const
std::map< const std::string, std::string >::const_iterator strIter
void set_string_param(const std::string &name, const std::string &str)
bool exist_double_param(const std::string &name) const
int get_int_param(const std::string &name) const
std::pair< std::map< const std::string, double >::const_iterator, std::map< const std::string, double >::const_iterator > get_all_double_params()