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

Last change on this file since 1600 was 1540, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 2.1 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();
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 void 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 ClassDef(MEvtLoop, 1) // Class to execute the tasks in a tasklist
69};
70
71R__EXTERN TList *gListOfPrimitives; // instantiation in MEvtLoop
72
73#endif
Note: See TracBrowser for help on using the repository browser.