source: trunk/MagicSoft/Mars/mbase/MEvtLoop.h@ 1913

Last change on this file since 1913 was 1880, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 2.3 KB
Line 
1#ifndef MARS_MEvtLoop
2#define MARS_MEvtLoop
3
4/////////////////////////////////////////////////////////////////////////////
5// //
6// MEvtLoop //
7// //
8// Class to execute the tasks in a tasklist //
9// //
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef MARS_MParContainer
13#include "MParContainer.h"
14#endif
15
16class MParList;
17class MTaskList;
18class TGProgressBar;
19#ifdef __MARS__
20class MProgressBar;
21#endif
22
23class MEvtLoop : public MParContainer
24{
25private:
26 MParList *fParList;
27 MTaskList *fTaskList; //!
28
29 TGProgressBar *fProgress; //!
30
31 enum { kIsOwner = BIT(14) };
32
33 Bool_t HasDuplicateNames(const TString txt) const;
34 Bool_t HasDuplicateNames(TObjArray &arr, const TString txt) const;
35
36 void StreamPrimitive(ofstream &out) const;
37
38public:
39 MEvtLoop(const char *name="Evtloop");
40 virtual ~MEvtLoop();
41
42 void SetParList(MParList *p) { fParList = p; }
43 MParList *GetParList() const { return fParList; }
44 MTaskList *GetTaskList() const { return fTaskList; }
45
46 void SetOwner(Bool_t enable=kTRUE);
47
48 void SetProgressBar(TGProgressBar *bar) { fProgress = bar; }
49#ifdef __MARS__
50 void SetProgressBar(MProgressBar *bar);
51#endif
52
53 Bool_t PreProcess(const char *tlist="MTaskList");
54 Bool_t Process(Int_t maxcnt) const;
55 Bool_t PostProcess() const;
56
57 Bool_t Eventloop(Int_t maxcnt=-1, const char *tlist="MTaskList");
58
59 void MakeMacro(const char *filename="evtloop.C");
60
61 void SavePrimitive(ofstream &out, Option_t *o="");
62
63 Int_t Read(const char *name="Evtloop");
64 Int_t Write(const char *name="Evtloop", Int_t option=0, Int_t bufsize=0);
65
66 void Print(Option_t *opt="") const;
67
68 Bool_t ReadEnv(const TEnv &env, TString prefix="", Bool_t print=kFALSE);
69 Bool_t WriteEnv(TEnv &env, TString prefix="", Bool_t print=kFALSE) const;
70
71 ClassDef(MEvtLoop, 1) // Class to execute the tasks in a tasklist
72};
73
74R__EXTERN TList *gListOfPrimitives; // instantiation in MEvtLoop
75
76#endif
Note: See TracBrowser for help on using the repository browser.