Fork me on GitHub

source: git/external/ExRootAnalysis/ExRootConfReader.h@ 1388e73

ImprovedOutputFile
Last change on this file since 1388e73 was 341014c, checked in by Pavel Demin <pavel-demin@…>, 6 years ago

apply .clang-format to all .h, .cc and .cpp files

  • 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 ExRootConfParam(const char *name = 0, Tcl_Obj *object = 0, Tcl_Interp *interp = 0);
24
25 int GetInt(int defaultValue = 0);
26 long GetLong(long defaultValue = 0);
27 double GetDouble(double defaultValue = 0.0);
28 bool GetBool(bool defaultValue = false);
29 const char *GetString(const char *defaultValue = "");
30
31 int GetSize();
32 ExRootConfParam operator[](int index);
33
34private:
35 const char *fName; //!
36 Tcl_Obj *fObject; //!
37 Tcl_Interp *fTclInterp; //!
38};
39
40//------------------------------------------------------------------------------
41
[341014c]42class ExRootConfReader: public TNamed
[d7d2da3]43{
44public:
45 typedef std::map<TString, TString> ExRootTaskMap;
46
47 ExRootConfReader();
48 ~ExRootConfReader();
49
[bd8c884]50 void ReadFile(const char *fileName, bool isTop = true);
[d7d2da3]51
52 int GetInt(const char *name, int defaultValue, int index = -1);
53 long GetLong(const char *name, long defaultValue, int index = -1);
54 double GetDouble(const char *name, double defaultValue, int index = -1);
55 bool GetBool(const char *name, bool defaultValue, int index = -1);
56 const char *GetString(const char *name, const char *defaultValue, int index = -1);
57 ExRootConfParam GetParam(const char *name);
58
59 const ExRootTaskMap *GetModules() const { return &fModules; }
60
61 void AddModule(const char *className, const char *moduleName);
62
[bd8c884]63 const char *GetTopDir() const { return fTopDir; }
64
[d7d2da3]65private:
[bd8c884]66 const char *fTopDir; //!
67
[d7d2da3]68 Tcl_Interp *fTclInterp; //!
69
70 ExRootTaskMap fModules; //!
71
72 ClassDef(ExRootConfReader, 1)
73};
74
75#endif
Note: See TracBrowser for help on using the repository browser.