// -*- mode: c++ -*- // // $Id: BrDataObject.h,v 1.1.1.1 2001/06/21 14:54:58 hagel Exp $ // /////////////////////////////////////////////////////////////////////// // // // BrDataObject // // // // BRAHMS data storage class. // // // // Author : Kris Hagel from a template by Gunther Roland // // Created : July 13 1997 // // Version : 1.1 // // Changed : 2/24/98 fv // // /////////////////////////////////////////////////////////////////////// #ifndef BRAT_BrDataObject #define BRAT_BrDataObject #ifndef ROOT_TNamed #include "TObject.h" #endif #ifndef ROOT_TString #include "TString.h" #endif #ifdef _use_creation_id #ifndef BRAT_BrCreationID #include "BrCreationID.h" #endif #endif class BrDataObject : public TObject { public: BrDataObject(); BrDataObject(const Char_t* name, const Char_t* title = NULL); virtual ~BrDataObject(); #ifdef _use_creation_id virtual BrCreationID* GetCreationID() const { return fCreationID; } #endif virtual Bool_t IsPersistent() const { return fIsPersistent; } virtual Bool_t IsNode() const { return kFALSE;} virtual Bool_t IsTable() const { return kFALSE;} virtual void SetCreationID(TObject *Creator); virtual void SetPersistent(Bool_t b) { fIsPersistent = b; } virtual const Char_t* GetName() const {return fName;} virtual const Char_t* GetTitle() const {return fTitle;} virtual void SetName(const Text_t *name); virtual void SetTitle(const Text_t *title); virtual void Copy(BrDataObject &dataobject); virtual void Print(Option_t* option="") const; //*MENU* static const Float_t kInvalidValue; protected: #ifdef _use_creation_id BrCreationID *fCreationID; // Globally unique ID specifying creation #endif Bool_t fIsPersistent; // Flag marking object as persistent Char_t fName[64]; //Name of data object; Char_t fTitle[64]; //Title of data object; public: ClassDef(BrDataObject,1) // BRAHMS data container class }; #endif // $Log: BrDataObject.h,v $ // Revision 1.1.1.1 2001/06/21 14:54:58 hagel // Initial revision of brat2 // // Revision 1.13 2001/06/01 15:46:10 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.12 2001/01/29 19:58:46 cholm // Added konstant kInvalidValue for general use // // Revision 1.11 2000/11/15 16:08:06 videbaek // file cleanup // // Revision 1.10 2000/06/03 18:17:02 videbaek // Changed inheritance of BrIOModule. Added utility to BrDataObject.. See Update message for more info // // Revision 1.9 2000/04/13 00:01:55 cholm // Added methods for browsing BrEvents, either directly or via // a BrEventIO. Also added method GetROOTFile to BrEventIO. // // Revision 1.8 1999/05/12 16:22:20 hagel // Implemented + , =+ and = operators for BrEventNode. These will be useful // for adding events together. Has been tested for single pion events and seems // to work. In the course of implementing this, several conflicts with const were // identified. These were cleaned up by adding appropriate const's where needed. // It was checked that it did not break other things. // // Revision 1.7 1999/01/21 23:23:18 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.6 1998/08/20 14:00:33 hagel // Add Copy method // // Revision 1.5 1998/08/17 16:38:12 hagel // Make BrDataObject inherit from TObject for the purpose of using in Trees // Include fName, fTitle data members // Include SetName, GetName, SetTitle, GetTitle methods // All this because TTree seems to have problem working with TString. // // Revision 1.4 1998/08/14 21:26:23 videbaek // Some cleanup mods // // Revision 1.3 1998/08/13 22:20:56 hagel // Eliminate fCreationID for the moment // // Revision 1.2 1998/03/09 20:53:32 videbaek // Ensure that pointers are non-NULL before deleting // //