test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
20 private:
22 
23 public:
24  //---------- Constructors / Destructor
26  static GlobalOptionMgr* getInstance();
27 
28  public:
31 
32  std::map< ALIstring, ALIdouble, std::less<ALIstring> >& GlobalOptions() {
33  return theGlobalOptions;
34  }
35 
36  ALIdouble getGlobalOption( const ALIstring& sstr );
37 
39  int getGlobalOptionValue( const ALIstring& sstr, ALIdouble& val );
40  void setGlobalOption( const ALIstring go, const ALIdouble val, ALIFileIn& filein );
41  bool setGlobalOption( const ALIstring go, const ALIdouble val, bool bExit = 1 );
42 
43 private:
46  std::map< ALIstring, ALIdouble, std::less<ALIstring> > theGlobalOptions;
47 
48 };
49 
50 #endif
51 
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::string ALIstring
Definition: CocoaGlobals.h:9
ALIdouble getGlobalOption(const ALIstring &sstr)
std::map< ALIstring, ALIdouble, std::less< ALIstring > > & GlobalOptions()