source: trunk/MagicSoft/Mars/mbase/MTaskEnv.h@ 5454

Last change on this file since 5454 was 4732, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 974 bytes
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 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
27 Bool_t WriteEnv(TEnv &env, TString prefix, Bool_t print=kFALSE) const;
28
29public:
30 MTaskEnv(const char *name=NULL, const char *title=NULL);
31 ~MTaskEnv();
32
33 void SetOwner(Bool_t b=kTRUE) { b ? SetBit(kIsOwner) : ResetBit(kIsOwner); }
34
35 void SetDefault(MTask *task) { fTask = task; if (!task) SetBit(kIsDummy); }
36 void SetDefault(const char *def);
37
38 MTask *GetTask() { return fTask; }
39
40 ClassDef(MTaskEnv, 0) // Task which can be setup from an environment file
41};
42
43#endif
Note: See TracBrowser for help on using the repository browser.