// $Id: BrModule.h,v 1.4 1998/04/06 21:11:48 videbaek Exp $ // // $Log: BrModule.h,v $ // Revision 1.4 1998/04/06 21:11:48 videbaek // Clean up and additions for Win95 // // #ifndef _BRMODULE_H #define _BRMODULE_H /////////////////////////////////////////////////////////// // // BrModule // // BRAHMS Analysis Module Class // // A standard Physics analysis Module should be derived from // this base class. This ensure that the general framework // is capable of accessing these in a common and general way. // The methods (member functions) consists of a general set for // all modules; but the user if free to add specific ones for // specific needs. Ideas for this has been taken from both the // PHOBOS tool set as well as from the BABAR framework. The initial version // is derived from the ROOT base classes, // // Author : Flemming Videbaek // Created: 27/12/97 // Version: 1.0 // // some memberdata are defined using the nomenclature // d_ to see how this will work out compared to the // ROOT default of f // /////////////////////////////////////////////////////////// // ROOT classes #ifndef ROOT_TNamed #include "TNamed.h" #endif #ifndef ROOT_TList #include "TList.h" #endif #ifndef ROOT_TStopwatch #include "TStopwatch.h" #endif // System and ROOT include files // // BRAHMS classes // class BrEventNode; class BrModule : public TNamed { public: BrModule(); BrModule(Char_t *name, Char_t *title); virtual ~BrModule(); virtual void Init(){}; virtual void Begin(){}; virtual void Event(); virtual void Event(BrEventNode* inev, BrEventNode *outev); virtual void End(){}; virtual void Info() const; // Required tables virtual void AddRequiredTable(TObject *tablename) {fRequiredTableList->Add(tablename);}; // Add a table to the list of // Required tables virtual TList* GetRequiredTableList() {return fRequiredTableList;} //Get the list of Required Tables //Statistics virtual void EventStatisticsStart(); //To be called by asp virtual void EventStatisticsEnd(); //To be called by asp virtual void ListEventStatistics(); //To be called by asp TList *HistogramList() const {return d_HistogramList_p;} void SetDebugLevel(const Int_t level){d_DebugLevel=level;} void SetRequiredData(Char_t* name); Int_t DebugLevel(){return d_DebugLevel;} //Debuglevel value void SetVerbose(Int_t Verbose){d_Verbose = Verbose;}; private: Int_t d_DebugLevel; //Level for amount of debug information //output during execution of the module entries //The application programmer should use the //member functions DebugLevel() for decision to //output information TList* d_HistogramList_p; //List of histograms associated with //the module. Once added to this list they //should be considerd owned by Module. // Int_t d_Verbose; //Option flag TList* fRequiredTableList; //Statistics TStopwatch fTimer; Double_t fCpuTime; public: ClassDef(BrModule,1) // BRAHMS Module definitions }; #endif