Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:31:43

0001 //   COCOA class header file

0002 //Id:  ParameterMgr.h

0003 //CAT: Model

0004 //

0005 //   Manages the parameters of the input file (variables that are given a value to be reused in the file)

0006 //

0007 //   History: v1.0  11/11/01   Pedro Arce

0008 #ifndef ParameterMgr_h
0009 #define ParameterMgr_h
0010 
0011 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
0012 #include <map>
0013 typedef std::map<ALIstring, ALIdouble, std::less<ALIstring> > msd;
0014 
0015 class ParameterMgr {
0016 private:
0017   ParameterMgr(){};
0018 
0019 public:
0020   static ParameterMgr* getInstance();
0021   ALIdouble getVal(const ALIstring& str, const ALIdouble dimensionFactor = 1.);
0022 
0023   void addParameter(const ALIstring& name, const ALIstring& valstr);
0024   void setRandomSeed(const long seed);
0025   void addRandomGaussParameter(const ALIstring& name, const ALIstring& valMean, const ALIstring& valStdDev);
0026   void addRandomFlatParameter(const ALIstring& name, const ALIstring& valMean, const ALIstring& valInterval);
0027 
0028   // get the parameter value if parameter name exists and return 1, else return 0

0029   ALIint getParameterValue(const ALIstring& name, ALIdouble& val);
0030 
0031 private:
0032   static ParameterMgr* theInstance;
0033 
0034   msd theParameters;
0035 };
0036 
0037 #endif