source: trunk/Mars/mbase/MTaskEnv.h@ 10058

Last change on this file since 10058 was 6278, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 1.0 KB
Line 
1#ifndef MARS_MTaskEnv
2#define MARS_MTaskEnv
3
4#ifndef MARS_MTask
5#include "MTask.h"
6#endif
7
8class MFilter;
9class MTaskList;
10
11class MTaskEnv : public MTask
12{
13private:
14 MTask *fTask;
15
16 enum { kIsOwner = BIT(14), kIsDummy = BIT(15) };
17
18 MTask *GetTask(const char *name) const;
19
20 Bool_t ReInit(MParList *list);
21
22 Int_t PreProcess(MParList *list);
23 Int_t Process();
24 Int_t PostProcess();
25
26 Bool_t WriteEnv(TEnv &env, TString prefix, Bool_t print=kFALSE) const;
27
28public:
29 MTaskEnv(const char *name=NULL, const char *title=NULL);
30 ~MTaskEnv();
31
32 void SetOwner(Bool_t b=kTRUE) { b ? SetBit(kIsOwner) : ResetBit(kIsOwner); }
33
34 void SetDefault(MTask *task=0) { fTask = task; if (fTask) { fTask->SetName(fName); ResetBit(kIsDummy); } else SetBit(kIsDummy); }
35 void SetDefault(const char *def);
36
37 MTask *GetTask() { return fTask; }
38
39 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
40
41 ClassDef(MTaskEnv, 0) // Task which can be setup from an environment file
42};
43
44#endif
Note: See TracBrowser for help on using the repository browser.