CMS 3D CMS Logo

GlobalOptionMgr.h
Go to the documentation of this file.
1 // COCOA class header file
2 //Id: GlobalOptionMgr.h
3 //CAT: Model
4 //
5 // Class to manage the sets of fitted entries (one set per each measurement data set)
6 //
7 // History: v1.0
8 // Pedro Arce
9 
10 #ifndef _GlobalOptionMgr_HH
11 #define _GlobalOptionMgr_HH
12 
14 #include <map>
15 
16 class ALIFileIn;
17 
19 private:
21 
22 public:
23  //---------- Constructors / Destructor
25  static GlobalOptionMgr* getInstance();
26 
27 public:
30 
31  std::map<ALIstring, ALIdouble, std::less<ALIstring> >& GlobalOptions() { return theGlobalOptions; }
32 
33  ALIdouble getGlobalOption(const ALIstring& sstr);
34 
36  int getGlobalOptionValue(const ALIstring& sstr, ALIdouble& val);
37  void setGlobalOption(const ALIstring go, const ALIdouble val, ALIFileIn& filein);
38  bool setGlobalOption(const ALIstring go, const ALIdouble val, bool bExit = true);
39 
40 private:
43  std::map<ALIstring, ALIdouble, std::less<ALIstring> > theGlobalOptions;
44 };
45 
46 #endif
long double ALIdouble
Definition: CocoaGlobals.h:11
static GlobalOptionMgr * theInstance
static GlobalOptionMgr * getInstance()
int getGlobalOptionValue(const ALIstring &sstr, ALIdouble &val)
--— Search a string in theGlobalOptions and return 1 if found
std::map< ALIstring, ALIdouble, std::less< ALIstring > > theGlobalOptions
global options
void setGlobalOption(const ALIstring go, const ALIdouble val, ALIFileIn &filein)
void setDefaultGlobalOptions()
Set the list of default global options.
std::map< ALIstring, ALIdouble, std::less< ALIstring > > & GlobalOptions()
std::string ALIstring
Definition: CocoaGlobals.h:9
ALIdouble getGlobalOption(const ALIstring &sstr)