// $Id: BrIOModule.h,v 1.4 1998/07/31 19:33:47 videbaek Exp $ // // $Log: BrIOModule.h,v $ // Revision 1.4 1998/07/31 19:33:47 videbaek // changed Energy unit to MeV // // #ifndef __BRIOMODULE_H #define __BRIOMODULE_H /////////////////////////////////////////////////////////// // // BrIOModule // // BRAHMS Analysis Module Class // // A standard IO 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. // The initial version // is derived from the ROOT base classes, // the class share many traits with the BrModule Class but has a different // set of member functions. // // Author : Flemming Videbaek // Created: 3/17/98 // Version: 1.0 // // /////////////////////////////////////////////////////////// // 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 BrEvent; class BrIOModule : public TNamed { public: BrIOModule(); BrIOModule(Char_t *name, Char_t *title); virtual ~BrIOModule(); virtual Bool_t Open(Char_t* Name){return kFALSE;}; virtual Bool_t Close(){return kFALSE;}; virtual void Begin(){;}; virtual void Event(BrEvent* event); virtual void End(){;}; virtual void Info() const; //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 void SetDebugLevel(const Int_t level){d_DebugLevel=level;} Int_t DebugLevel() const {return d_DebugLevel;} //Debuglevel value void SetVerbose(Int_t Verbose){d_Verbose = Verbose;} Int_t GetStatus() const {return fStatus;} Bool_t Eof() const {return fEof;} Bool_t Error() const { return fError;} protected: Int_t fStatus; // Status of Module Action Bool_t fError; // Error - result of transaction Bool_t fEof; // EndOfFile / EndOfData indicator Long_t fBytesTransferred; //!Bytes read or written 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 Int_t d_Verbose; // Option flag private: // //Statistics // Double_t fCpuTime; //! Time spend in this routine TStopwatch fTimer; //! public: ClassDef(BrIOModule,1) // BRAHMS IO Module definitions }; #endif