#ifndef MARS_MEvtLoop #define MARS_MEvtLoop ///////////////////////////////////////////////////////////////////////////// // // // MEvtLoop // // // // Class to execute the tasks in a tasklist // // // ///////////////////////////////////////////////////////////////////////////// #ifndef MARS_MParContainer #include "MParContainer.h" #endif class MTask; class MParList; class MTaskList; class TGProgressBar; #ifdef __MARS__ class MProgressBar; #endif class MEvtLoop : public MParContainer { private: MParList *fParList; MTaskList *fTaskList; //! TGProgressBar *fProgress; //! enum { kIsOwner = BIT(14) }; Bool_t HasDuplicateNames(const TString txt) const; Bool_t HasDuplicateNames(TObjArray &arr, const TString txt) const; void StreamPrimitive(ofstream &out) const; Bool_t ProcessGuiEvents(Int_t num); public: MEvtLoop(const char *name="Evtloop"); virtual ~MEvtLoop(); void SetParList(MParList *p); MParList *GetParList() const { return fParList; } MTaskList *GetTaskList() const { return fTaskList; } MTask *FindTask(const char *name) const; MTask *FindTask(const MTask *obj) const; MStatusDisplay *GetDisplay() { return fDisplay; } void SetDisplay(MStatusDisplay *d); void SetOwner(Bool_t enable=kTRUE); void SetProgressBar(TGProgressBar *bar); #ifdef __MARS__ void SetProgressBar(MProgressBar *bar); #endif Bool_t PreProcess(const char *tlist="MTaskList"); Int_t Process(Int_t maxcnt); Bool_t PostProcess() const; Bool_t Eventloop(Int_t maxcnt=-1, const char *tlist="MTaskList"); void MakeMacro(const char *filename="evtloop.C"); void SavePrimitive(ofstream &out, Option_t *o=""); Int_t Read(const char *name="Evtloop"); Int_t Write(const char *name="Evtloop", Int_t option=0, Int_t bufsize=0); void Print(Option_t *opt="") const; Bool_t ReadEnv(const TEnv &env, TString prefix="", Bool_t print=kFALSE); Bool_t WriteEnv(TEnv &env, TString prefix="", Bool_t print=kFALSE) const; void RecursiveRemove(TObject *obj); ClassDef(MEvtLoop, 1) // Class to execute the tasks in a tasklist }; // FIXME: Move as (persistent) static data member to MParContainer R__EXTERN TList *gListOfPrimitives; // instantiation in MEvtLoop #endif