CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/Alignment/CocoaUtilities/interface/GlobalOptionMgr.h

Go to the documentation of this file.
00001 //   COCOA class header file
00002 //Id:  GlobalOptionMgr.h
00003 //CAT: Model
00004 //
00005 //   Class to manage the sets of fitted entries (one set per each measurement data set)
00006 // 
00007 //   History: v1.0 
00008 //   Pedro Arce
00009 
00010 #ifndef _GlobalOptionMgr_HH
00011 #define _GlobalOptionMgr_HH
00012 
00013 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
00014 #include <map>
00015 
00016 class ALIFileIn;
00017 
00018 class GlobalOptionMgr
00019 {
00020 private:
00021   GlobalOptionMgr(){ };
00022 
00023 public:
00024   //---------- Constructors / Destructor
00025   ~GlobalOptionMgr(){ };
00026   static GlobalOptionMgr* getInstance();
00027 
00028  public:
00030   void setDefaultGlobalOptions();
00031 
00032   std::map< ALIstring, ALIdouble, std::less<ALIstring> >& GlobalOptions() {
00033     return theGlobalOptions;
00034   }
00035 
00036   ALIdouble getGlobalOption( const ALIstring& sstr );
00037 
00039   int getGlobalOptionValue( const ALIstring& sstr, ALIdouble& val );
00040   void setGlobalOption( const ALIstring go, const ALIdouble val, ALIFileIn& filein );
00041   bool setGlobalOption( const ALIstring go, const ALIdouble val, bool bExit = 1 );
00042  
00043 private:
00044   static GlobalOptionMgr* theInstance;
00046   std::map< ALIstring, ALIdouble, std::less<ALIstring> > theGlobalOptions;
00047 
00048 };
00049 
00050 #endif
00051