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

Last change on this file since 1526 was 1526, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 2.0 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
20class MEvtLoop : public MParContainer
21{
22private:
23 MParList *fParList;
24 MTaskList *fTaskList; //!
25
26 TGProgressBar *fProgress; //!
27
28 enum { kIsOwner = BIT(14) };
29
30 Bool_t HasDuplicateNames(const TString txt) const;
31 Bool_t HasDuplicateNames(TObjArray &arr, const TString txt) const;
32
33 void StreamPrimitive(ofstream &out) const;
34
35public:
36 MEvtLoop();
37 virtual ~MEvtLoop();
38
39 void SetParList(MParList *p) { fParList = p; }
40 MParList *GetParList() const { return fParList; }
41 MTaskList *GetTaskList() const { return fTaskList; }
42
43 void SetOwner(Bool_t enable=kTRUE);
44
45 void SetProgressBar(TGProgressBar *bar) { fProgress = bar; }
46
47 Bool_t PreProcess(const char *tlist="MTaskList");
48 void Process(Int_t maxcnt) const;
49 Bool_t PostProcess() const;
50
51 Bool_t Eventloop(Int_t maxcnt=-1, const char *tlist="MTaskList");
52
53 void MakeMacro(const char *filename="evtloop.C");
54
55 void SavePrimitive(ofstream &out, Option_t *o="");
56
57 Int_t Read(const char *name="Evtloop");
58 Int_t Write(const char *name="Evtloop", Int_t option=0, Int_t bufsize=0);
59
60 void Print(Option_t *opt="") const;
61
62 ClassDef(MEvtLoop, 1) // Class to execute the tasks in a tasklist
63};
64
65R__EXTERN TList *gListOfPrimitives; // instantiation in MEvtLoop
66
67#endif
Note: See TracBrowser for help on using the repository browser.