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

Last change on this file since 2057 was 1965, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 2.4 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
38 Bool_t ProcessGuiEvents(Int_t num);
39
40public:
41 MEvtLoop(const char *name="Evtloop");
42 virtual ~MEvtLoop();
43
44 void SetParList(MParList *p) { fParList = p; }
45 MParList *GetParList() const { return fParList; }
46 MTaskList *GetTaskList() const { return fTaskList; }
47
48 MStatusDisplay *GetDisplay() { return fDisplay; }
49
50 void SetOwner(Bool_t enable=kTRUE);
51
52 void SetProgressBar(TGProgressBar *bar) { fProgress = bar; }
53#ifdef __MARS__
54 void SetProgressBar(MProgressBar *bar);
55#endif
56
57 Bool_t PreProcess(const char *tlist="MTaskList");
58 Bool_t Process(Int_t maxcnt);
59 Bool_t PostProcess() const;
60
61 Bool_t Eventloop(Int_t maxcnt=-1, const char *tlist="MTaskList");
62
63 void MakeMacro(const char *filename="evtloop.C");
64
65 void SavePrimitive(ofstream &out, Option_t *o="");
66
67 Int_t Read(const char *name="Evtloop");
68 Int_t Write(const char *name="Evtloop", Int_t option=0, Int_t bufsize=0);
69
70 void Print(Option_t *opt="") const;
71
72 Bool_t ReadEnv(const TEnv &env, TString prefix="", Bool_t print=kFALSE);
73 Bool_t WriteEnv(TEnv &env, TString prefix="", Bool_t print=kFALSE) const;
74
75 ClassDef(MEvtLoop, 1) // Class to execute the tasks in a tasklist
76};
77
78R__EXTERN TList *gListOfPrimitives; // instantiation in MEvtLoop
79
80#endif
Note: See TracBrowser for help on using the repository browser.