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 
17  private:
19 
20  public:
21  static ParameterMgr* getInstance();
22  ALIdouble getVal( const ALIstring& str, const ALIdouble dimensionFactor = 1. );
23 
24  void addParameter( const ALIstring& name, const ALIstring& valstr );
25  void setRandomSeed( const long seed );
26  void addRandomGaussParameter( const ALIstring& name, const ALIstring& valMean, const ALIstring& valStdDev );
27  void addRandomFlatParameter( const ALIstring& name, const ALIstring& valMean, const ALIstring& valInterval );
28 
29  // get the parameter value if parameter name exists and return 1, else return 0
31 
32 
33  private:
35 
37 };
38 
39 #endif
long double ALIdouble
Definition: CocoaGlobals.h:11
static ParameterMgr * getInstance()
Definition: ParameterMgr.cc:19
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:87
void setRandomSeed(const long seed)
Definition: ParameterMgr.cc:80
static ParameterMgr * theInstance
Definition: ParameterMgr.h:34
std::map< ALIstring, ALIdouble, std::less< ALIstring > > msd
void addRandomFlatParameter(const ALIstring &name, const ALIstring &valMean, const ALIstring &valInterval)
std::string ALIstring
Definition: CocoaGlobals.h:9
ALIdouble getVal(const ALIstring &str, const ALIdouble dimensionFactor=1.)
Definition: ParameterMgr.cc:31
void addParameter(const ALIstring &name, const ALIstring &valstr)
Definition: ParameterMgr.cc:69
#define str(s)