Fork me on GitHub

source: git/external/ExRootAnalysis/ExRootConfReader.h@ ff37d75

ImprovedOutputFile Timing dual_readout llp
Last change on this file since ff37d75 was cab38f6, checked in by Pavel Demin <pavel.demin@…>, 10 years ago

remove svn tags and fix formatting

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