// $Id: BrDataObject.h,v 1.6 1998/08/20 14:00:33 hagel Exp $ // // $Log: BrDataObject.h,v $ // 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 // // #ifndef _BRDATAOBJECT_H #define _BRDATAOBJECT_H /////////////////////////////////////////////////////////////////////// // // // 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 // // /////////////////////////////////////////////////////////////////////// // Root Classes #ifndef ROOT_TNAMED #include "TNamed.h" #endif // BRAHMS Classes #ifdef _use_creation_id #ifndef _BRCREATIONID_H #include "BrCreationID.h" #endif #endif class BrDataObject : public TObject { public: BrDataObject(); BrDataObject(Char_t* Name, 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 void SetCreationID(TObject *Creator); virtual void SetPersistent(Bool_t b) { fIsPersistent = b; } virtual const Text_t *GetName() const {return fName;} virtual const Text_t *GetTitle() const {return fTitle;} virtual void SetName(const Text_t *name); virtual void SetTitle(const Text_t *title); virtual void Copy(BrDataObject &dataobject); protected: #ifdef _use_creation_id BrCreationID *fCreationID; // Globally unique ID specifying creation details #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