Fork me on GitHub

source: svn/trunk/external/ExRootAnalysis/ExRootConfReader.h@ 1378

Last change on this file since 1378 was 957, checked in by Pavel Demin, 12 years ago

remove ClassDef from ExRootConfParam

File size: 1.7 KB
Line 
1#ifndef ExRootConfReader_h
2#define ExRootConfReader_h
3
4/** \class ExRootConfReader
5 *
6 * Class handling output ROOT tree
7 *
8 * $Date: 2008-06-04 13:57:24 $
9 * $Revision: 1.1 $
10 *
11 *
12 * \author P. Demin - UCL, Louvain-la-Neuve
13 *
14 */
15
16#include "TNamed.h"
17
18#include <map>
19#include <utility>
20
21struct Tcl_Obj;
22struct Tcl_Interp;
23
24class ExRootConfParam
25{
26public:
27
28 ExRootConfParam(const char *name = 0, Tcl_Obj *object = 0, Tcl_Interp *interp = 0);
29
30 int GetInt(int defaultValue = 0);
31 long GetLong(long defaultValue = 0);
32 double GetDouble(double defaultValue = 0.0);
33 bool GetBool(bool defaultValue = false);
34 const char *GetString(const char *defaultValue = "");
35
36 int GetSize();
37 ExRootConfParam operator[](int index);
38
39private:
40
41 const char *fName; //!
42 Tcl_Obj *fObject; //!
43 Tcl_Interp *fTclInterp; //!
44};
45
46//------------------------------------------------------------------------------
47
48class ExRootConfReader : public TNamed
49{
50public:
51 typedef std::map<TString, TString> ExRootTaskMap;
52
53 ExRootConfReader();
54 ~ExRootConfReader();
55
56 void ReadFile(const char *fileName);
57
58 int GetInt(const char *name, int defaultValue, int index = -1);
59 long GetLong(const char *name, long defaultValue, int index = -1);
60 double GetDouble(const char *name, double defaultValue, int index = -1);
61 bool GetBool(const char *name, bool defaultValue, int index = -1);
62 const char *GetString(const char *name, const char *defaultValue, int index = -1);
63 ExRootConfParam GetParam(const char *name);
64
65 const ExRootTaskMap *GetModules() const { return &fModules; }
66
67 void AddModule(const char *className, const char *moduleName);
68
69private:
70
71 Tcl_Interp *fTclInterp; //!
72
73 ExRootTaskMap fModules; //!
74
75 ClassDef(ExRootConfReader, 1)
76};
77
78#endif
79
Note: See TracBrowser for help on using the repository browser.