CMS 3D CMS Logo

ParameterMgr.h
Go to the documentation of this file.
1 // COCOA class header file
2 //Id: ParameterMgr.h
3 //CAT: Model
4 //
5 // Manages the parameters of the input file (variables that are given a value to be reused in the file)
6 //
7 // History: v1.0 11/11/01 Pedro Arce
8 #ifndef ParameterMgr_h
9 #define ParameterMgr_h
10 
12 #include <map>
13 typedef std::map<ALIstring, ALIdouble, std::less<ALIstring> > msd;
14 
15 class ParameterMgr {
16 private:
18 
19 public:
20  static ParameterMgr* getInstance();
21  ALIdouble getVal(const ALIstring& str, const ALIdouble dimensionFactor = 1.);
22 
23  void addParameter(const ALIstring& name, const ALIstring& valstr);
24  void setRandomSeed(const long seed);
25  void addRandomGaussParameter(const ALIstring& name, const ALIstring& valMean, const ALIstring& valStdDev);
26  void addRandomFlatParameter(const ALIstring& name, const ALIstring& valMean, const ALIstring& valInterval);
27 
28  // get the parameter value if parameter name exists and return 1, else return 0
30 
31 private:
33 
35 };
36 
37 #endif
long double ALIdouble
Definition: CocoaGlobals.h:11
static ParameterMgr * getInstance()
Definition: ParameterMgr.cc:18
std::map< ALIstring, ALIdouble, std::less< ALIstring > > msd
Definition: ParameterMgr.h:13
int ALIint
Definition: CocoaGlobals.h:15
ALIint getParameterValue(const ALIstring &name, ALIdouble &val)
void addRandomGaussParameter(const ALIstring &name, const ALIstring &valMean, const ALIstring &valStdDev)
Definition: ParameterMgr.cc:75
void setRandomSeed(const long seed)
Definition: ParameterMgr.cc:72
static ParameterMgr * theInstance
Definition: ParameterMgr.h:32
std::map< ALIstring, ALIdouble, std::less< ALIstring > > msd
void addRandomFlatParameter(const ALIstring &name, const ALIstring &valMean, const ALIstring &valInterval)
Definition: ParameterMgr.cc:93
std::string ALIstring
Definition: CocoaGlobals.h:9
ALIdouble getVal(const ALIstring &str, const ALIdouble dimensionFactor=1.)
Definition: ParameterMgr.cc:27
void addParameter(const ALIstring &name, const ALIstring &valstr)
Definition: ParameterMgr.cc:63
#define str(s)