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, PHParameters *>::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, PHParameters *>::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, PHParameters *>::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, PHParameters *>::const_iterator iter;
206 for (iter = macroparams.begin(); iter != macroparams.end(); ++iter)
211 std::pair< PHParameters::dIter, PHParameters::dIter> double_begin_end = iter->second->
get_all_double_params();
212 for (
PHParameters::dIter diter = double_begin_end.first; diter != double_begin_end.second; ++diter)
217 std::pair< PHParameters::iIter, PHParameters::iIter> int_begin_end = iter->second->get_all_int_params();
218 for (
PHParameters::iIter iiter = int_begin_end.first; iiter != int_begin_end.second; ++iiter)
223 std::pair< PHParameters::strIter, PHParameters::strIter> string_begin_end = iter->second->get_all_string_params();
224 for (
PHParameters::strIter striter = string_begin_end.first; striter != string_begin_end.second; ++striter)
257 ostringstream paramname;
258 paramname << paramscontainer->
Name() <<
"_" << detid;
259 params =
new PHParameters(*defaultparams,paramname.str());
PHBoolean addNode(PHNode *)
void set_name(const std::string &name)
void UpdateParametersWithMacro()
std::string get_string_param(const int id, const std::string &name) const
void set_double_param(const int id, const std::string &name, const double dval)
void set_default_double_param(const std::string &name, const double dval)
double get_double_param(const int id, const std::string &name) const
virtual ~PHParameterContainerInterface()
int ExistDetid(const int detid) const
PHParameterContainerInterface(const std::string &name)
void PutOnParNode(PHCompositeNode *parNode, const std::string &nodename)
void set_int_param(const int id, const std::string &name, const int ival)
int get_int_param(const int id, const std::string &name) const
void InitializeParameters()
virtual void SetDefaultParameters()=0
void SaveToNodeTree(PHCompositeNode *runNode, const std::string &nodename)
void set_default_string_param(const std::string &name, const std::string &sval)
void set_string_param(const int id, const std::string &name, const std::string &sval)
void CreateInitialize(const int detid)
void set_default_int_param(const std::string &name, const int ival)
void set_name(const std::string &name)
int ExistDetid(const int detid) const
void SaveToNodeTree(PHCompositeNode *topNode, const std::string &nodename)
PHParameters * GetParametersToModify(const int layer)
const PHParameters * GetParameters(const int layer) const
void AddPHParameters(const int layer, PHParameters *params)
iMap::const_iterator iIter
void set_string_param(const std::string &name, const std::string &str)
double get_double_param(const std::string &name) const
int get_int_param(const std::string &name) const
void set_int_param(const std::string &name, const int ival)
void set_double_param(const std::string &name, const double dval)
std::map< const std::string, std::string >::const_iterator strIter
std::string get_string_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()
bool exist_int_param(const std::string &name) const
dMap::const_iterator dIter
bool exist_string_param(const std::string &name) const
bool exist_double_param(const std::string &name) const