[d7d2da3] | 1 | #ifndef ExRootTask_h
|
---|
| 2 | #define ExRootTask_h
|
---|
| 3 |
|
---|
| 4 | /** \class ExRootTask
|
---|
| 5 | *
|
---|
| 6 | * Class handling output ROOT tree
|
---|
| 7 | *
|
---|
| 8 | * \author P. Demin - UCL, Louvain-la-Neuve
|
---|
| 9 | *
|
---|
| 10 | */
|
---|
| 11 |
|
---|
| 12 | #include "TTask.h"
|
---|
| 13 |
|
---|
| 14 | #include "ExRootAnalysis/ExRootConfReader.h"
|
---|
| 15 |
|
---|
| 16 | class TClass;
|
---|
| 17 | class TFolder;
|
---|
| 18 |
|
---|
[341014c] | 19 | class ExRootTask: public TTask
|
---|
[d7d2da3] | 20 | {
|
---|
| 21 | public:
|
---|
| 22 | ExRootTask();
|
---|
| 23 | virtual ~ExRootTask();
|
---|
| 24 |
|
---|
| 25 | virtual void Init();
|
---|
| 26 | virtual void Process();
|
---|
| 27 | virtual void Finish();
|
---|
| 28 |
|
---|
| 29 | virtual void InitTask();
|
---|
| 30 | virtual void ProcessTask();
|
---|
| 31 | virtual void FinishTask();
|
---|
| 32 |
|
---|
| 33 | virtual void InitSubTasks();
|
---|
| 34 | virtual void ProcessSubTasks();
|
---|
| 35 | virtual void FinishSubTasks();
|
---|
| 36 |
|
---|
| 37 | void Add(TTask *task);
|
---|
| 38 |
|
---|
| 39 | ExRootTask *NewTask(TClass *cl, const char *name);
|
---|
| 40 | ExRootTask *NewTask(const char *className, const char *taskName);
|
---|
| 41 |
|
---|
[341014c] | 42 | void Exec(Option_t *option);
|
---|
[d7d2da3] | 43 |
|
---|
| 44 | int GetInt(const char *name, int defaultValue, int index = -1);
|
---|
| 45 | long GetLong(const char *name, long defaultValue, int index = -1);
|
---|
| 46 | double GetDouble(const char *name, double defaultValue, int index = -1);
|
---|
| 47 | bool GetBool(const char *name, bool defaultValue, int index = -1);
|
---|
| 48 | const char *GetString(const char *name, const char *defaultValue, int index = -1);
|
---|
| 49 | ExRootConfParam GetParam(const char *name);
|
---|
| 50 | const ExRootConfReader::ExRootTaskMap *GetModules();
|
---|
| 51 |
|
---|
| 52 | void SetFolder(TFolder *folder) { fFolder = folder; }
|
---|
| 53 | void SetConfReader(ExRootConfReader *conf) { fConfReader = conf; }
|
---|
| 54 |
|
---|
| 55 | protected:
|
---|
| 56 | TFolder *GetFolder() const { return fFolder; }
|
---|
| 57 | ExRootConfReader *GetConfReader() const { return fConfReader; }
|
---|
| 58 |
|
---|
| 59 | TFolder *NewFolder(const char *name);
|
---|
| 60 | TObject *GetObject(const char *name, TClass *cl);
|
---|
| 61 |
|
---|
| 62 | private:
|
---|
| 63 | TFolder *fFolder; //!
|
---|
| 64 | ExRootConfReader *fConfReader; //!
|
---|
| 65 |
|
---|
| 66 | ClassDef(ExRootTask, 1)
|
---|
| 67 | };
|
---|
| 68 |
|
---|
| 69 | #endif /* ExRootTask */
|
---|