CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/Alignment/CocoaModel/interface/ParameterMgr.h

Go to the documentation of this file.
00001 //   COCOA class header file
00002 //Id:  ParameterMgr.h
00003 //CAT: Model
00004 //
00005 //   Manages the parameters of the input file (variables that are given a value to be reused in the file)
00006 // 
00007 //   History: v1.0  11/11/01   Pedro Arce
00008 #ifndef ParameterMgr_h
00009 #define ParameterMgr_h
00010 
00011 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h" 
00012 #include <map>
00013 typedef std::map<ALIstring, ALIdouble, std::less<ALIstring> > msd;
00014 
00015 class ParameterMgr {
00016 
00017  private:
00018   ParameterMgr(){};
00019 
00020  public:
00021   static ParameterMgr* getInstance();
00022   ALIdouble getVal( const ALIstring& str, const ALIdouble dimensionFactor = 1. );
00023 
00024   void addParameter( const ALIstring& name, const ALIstring& valstr );
00025   void setRandomSeed( const long seed );
00026   void addRandomGaussParameter( const ALIstring& name, const ALIstring& valMean, const ALIstring& valStdDev );
00027   void addRandomFlatParameter( const ALIstring& name, const ALIstring& valMean, const ALIstring& valInterval );
00028 
00029   // get the parameter value if parameter name exists and return 1, else return 0
00030   ALIint getParameterValue( const ALIstring& name, ALIdouble& val );
00031 
00032 
00033  private:
00034   static ParameterMgr* theInstance;
00035 
00036   msd theParameters;
00037 };
00038 
00039 #endif