Class Reference for E1039 Core & Analysis Software
PHParameterContainerInterface.h
Go to the documentation of this file.
1 #ifndef PHParameterContainerInterface__H
2 #define PHParameterContainerInterface__H
3 
4 #include <map>
5 #include <string>
6 
7 class PHCompositeNode;
8 class PHParameters;
10 
12 {
13  public:
14  PHParameterContainerInterface(const std::string &name);
16 
17  void set_name(const std::string &name);
18  virtual void SetDefaultParameters() = 0;
19 
20  // Get/Set parameters from macro
21  void set_double_param(const int id, const std::string &name, const double dval);
22  double get_double_param(const int id, const std::string &name) const;
23  void set_int_param(const int id, const std::string &name, const int ival);
24  int get_int_param(const int id, const std::string &name) const;
25  void set_string_param(const int id, const std::string &name, const std::string &sval);
26  std::string get_string_param(const int id, const std::string &name) const;
27 
29  void CreateInitialize(const int detid);
30  void SaveToNodeTree(PHCompositeNode *runNode, const std::string &nodename);
31  void PutOnParNode(PHCompositeNode *parNode, const std::string &nodename);
32  int ExistDetid(const int detid) const;
33 
34  protected:
35  void set_default_double_param( const std::string &name, const double dval);
36  void set_default_int_param( const std::string &name, const int ival);
37  void set_default_string_param( const std::string &name, const std::string &sval);
38  void InitializeParameters();
39  const PHParametersContainer *GetParamsContainer() {return paramscontainer;}
40  PHParametersContainer *GetParamsContainerModify() {return paramscontainer;}
41  const PHParameters *GetDefaultParameters() {return defaultparams;}
42 
43  private:
44  PHParametersContainer *paramscontainer;
45  PHParameters *defaultparams;
46  std::map<int, PHParameters *> macroparams;
47 };
48 
49 #endif
void set_name(const std::string &name)
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
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)
const PHParametersContainer * GetParamsContainer()
int get_int_param(const int id, const std::string &name) const
PHParametersContainer * GetParamsContainerModify()
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 set_default_int_param(const std::string &name, const int ival)