// -*- mode: c++ -*- // // $Id: BrEvent.h,v 1.7 2001/12/13 12:30:26 ouerdane Exp $ // /////////////////////////////////////////////////////////////////////// // // // BrEvent // // // // Brahms event class // // // // BrEvent manages access to the raw and reconstructed data // // for one event in the BRAT environment. // // environment // // // // Author : Kris Hagel from a model by Gunther Roland // // Created : // // Version : 1.0 // // Changed : July 12 1997 // // // // Add BrEventHeader // // Add HashTable for BrDataBuffers // // Modified all Object named Br... // // // /////////////////////////////////////////////////////////////////////// #ifndef BRAT_BrEvent #define BRAT_BrEvent #include "TNamed.h" #include "THashTable.h" #include "TBrowser.h" #include "BrEventHeader.h" #include "BrEventNode.h" class BrEvent : public BrEventNode { public: BrEvent(); BrEvent(Char_t* Name, Int_t run, Int_t event); virtual ~BrEvent(); virtual Int_t GetRunNumber() const; virtual Int_t GetEventNumber() const; virtual Int_t GetDate() const; virtual Int_t GetTriggerMask() const; virtual Int_t GetTime() const; virtual Int_t GetEventType() const; virtual BrEventHeader* GetEventHeader() const; virtual void Print(Option_t* opt="") const; //*MENU* virtual void Copy(BrEvent &event); virtual void Browse(TBrowser* b); virtual Bool_t IsEventHeader(); private: void CheckHeader() const; mutable BrEventHeader* fEventHeader; Int_t fRunNumber; //! non persistent! Int_t fEventNumber; //! non persistent! public: ClassDef(BrEvent,1) // BRAHMS event data class }; //____________________________________________________________________ inline Int_t BrEvent::GetRunNumber() const { CheckHeader(); return fEventHeader->RunNumber(); } //____________________________________________________________________ inline Int_t BrEvent::GetEventNumber() const { CheckHeader(); return fEventHeader->EventNumber(); } //____________________________________________________________________ inline Int_t BrEvent::GetDate() const { CheckHeader(); return fEventHeader->Date(); } //____________________________________________________________________ inline Int_t BrEvent::GetTriggerMask() const { CheckHeader(); return fEventHeader->TriggerMask(); } //____________________________________________________________________ inline Int_t BrEvent::GetTime() const { CheckHeader(); return fEventHeader->Time(); } //____________________________________________________________________ inline Int_t BrEvent::GetEventType() const { CheckHeader(); return fEventHeader->EventType(); } //____________________________________________________________________ inline Bool_t BrEvent::IsEventHeader() { if (fEventHeader) return kTRUE; return kFALSE; } //____________________________________________________________________ inline BrEventHeader* BrEvent::GetEventHeader() const { CheckHeader(); return fEventHeader; } #endif // $Log: BrEvent.h,v $ // Revision 1.7 2001/12/13 12:30:26 ouerdane // added method Bool_t IsEventHeader() to check if it really exists // // Revision 1.6 2001/08/21 16:41:58 cholm // Minor fixes. // // Revision 1.5 2001/08/21 16:11:34 cholm // Added methos CheckHeade for on-demand creation. Also moved inline // methods out of class declaration body and into the end of the file // // Revision 1.4 2001/08/08 21:52:08 hagel // Eliminate memory leak by creating on demand fObjectList and fEventHeader // // Revision 1.3 2001/06/25 14:24:02 cholm // packages/ // // Revision 1.2 2001/06/25 07:38:18 cholm // Removed Eun-Joo's previous erroneous change // // Revision 1.1.1.1 2001/06/21 14:54:58 hagel // Initial revision of brat2 // // Revision 1.12 2001/06/01 15:46:19 cholm // Fixed creation id class to be more clean. Now sets the user name // (if avaliable) has a Print method. // PRint method in BrDataObject. // Print method in BrDataTable // Print method in BrEvent // Print method in BrEventNode // // Revision 1.11 2000/10/17 20:51:42 videbaek // Moved CVS log comments // // Revision 1.10 2000/10/03 19:29:44 cholm // Made IsFolder() const (since it is in TObject) which was needed for the // objects to be browsable. Aslo, as of ROOT version 2.25.02 there's a list // of special objects, which BrEventIO now is added to. Some doc to // BrEventNode::Clear() added! Added method BrEventNode::SetOwner(). // Christian Holm // // Revision 1.9 2000/06/15 14:16:46 alv // Made more of the Get-methods const member functions // // Revision 1.8 2000/04/13 00:01:58 cholm // Added methods for browsing BrEvents, either directly or via // a BrEventIO. Also added method GetROOTFile to BrEventIO. // // Revision 1.7 1999/06/15 23:55:02 hagel // Added fEventType in BrEventHeader since it is in raw data // // Revision 1.6 1999/01/21 23:23:19 hagel // 1. Changed convention for checking includes. Current convention is: // BRAT_Br...... eg BRAT_BrModule ala ROOT. // 2. Added CVS logs to .h files that didn't have them. // 3. Moved checking of include definition to first line for easier reading // 4. Put checks before all includes in the include files as per BRAT specifications // 5. Added BrGeantHeader to Geant Makefile // 6. All changes have been checked to compile on NT ala Cygnus // // Revision 1.5 1998/08/20 14:29:44 hagel // Add Copy method // // Revision 1.4 1998/08/14 21:26:23 videbaek // Some cleanup mods // // Revision 1.3 1998/04/06 21:11:47 videbaek // Clean up and additions for Win95 // //