Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:34:26

0001 //   COCOA class header file

0002 //Id:  GlobalOptionMgr.h

0003 //CAT: Model

0004 //

0005 //   Class to manage the sets of fitted entries (one set per each measurement data set)

0006 //

0007 //   History: v1.0

0008 //   Pedro Arce

0009 
0010 #ifndef _GlobalOptionMgr_HH
0011 #define _GlobalOptionMgr_HH
0012 
0013 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
0014 #include <map>
0015 
0016 class ALIFileIn;
0017 
0018 class GlobalOptionMgr {
0019 private:
0020   GlobalOptionMgr() {}
0021 
0022 public:
0023   //---------- Constructors / Destructor

0024   ~GlobalOptionMgr() {}
0025   static GlobalOptionMgr* getInstance();
0026 
0027 public:
0028   /// Set the list of default global options

0029   void setDefaultGlobalOptions();
0030 
0031   std::map<ALIstring, ALIdouble, std::less<ALIstring> >& GlobalOptions() { return theGlobalOptions; }
0032 
0033   ALIdouble getGlobalOption(const ALIstring& sstr);
0034 
0035   ///----- Search a string in theGlobalOptions and return 1 if found

0036   int getGlobalOptionValue(const ALIstring& sstr, ALIdouble& val);
0037   void setGlobalOption(const ALIstring go, const ALIdouble val, ALIFileIn& filein);
0038   bool setGlobalOption(const ALIstring go, const ALIdouble val, bool bExit = true);
0039 
0040 private:
0041   static GlobalOptionMgr* theInstance;
0042   /// global options

0043   std::map<ALIstring, ALIdouble, std::less<ALIstring> > theGlobalOptions;
0044 };
0045 
0046 #endif