// $Id: BrDataTable.h,v 1.3 1998/03/26 23:31:48 hagel Exp $ // $Log: BrDataTable.h,v $ // Revision 1.3 1998/03/26 23:31:48 hagel // Added GetEntries to same as Entries // // Revision 1.2 1998/03/09 20:53:32 videbaek // Ensure that pointers are non-NULL before deleting // // Revision 1.1.1.1 1998/03/04 21:32:49 brahmlib // Brat base // // #ifndef _BRDATATABLE_H #define _BRDATATABLE_H /////////////////////////////////////////////////////////////////////// // // // BrDataTable // // // // BRAMS data container class. Raw data and the results of // // calibration and reconstruction operations are stored in // // BrDataTable objects, which in turn are managed and // // stored using the BrEvent class. // // // // Author : Kris Hagel from a template by Gunther Roland // // // Created : July 13 1997 // // Version : 1.0 // // Changed : // // // /////////////////////////////////////////////////////////////////////// // Root Classes #include "TObjArray.h" // BRAHMS Classes #include "BrDataObject.h" class BrDataTable : public BrDataObject { public: BrDataTable(); BrDataTable(Char_t *Name,Char_t *Title = NULL); virtual ~BrDataTable(); virtual void Add(TObject *object); virtual void AddAt(TObject *object,Int_t idx); virtual TObjArray *GetObjectList() { return fObjectList; } Int_t Entries() {if(fObjectList) return fObjectList->GetEntries(); else return 0;} Int_t GetEntries() {if(fObjectList) return fObjectList->GetEntries(); else return 0;} //kh 26-mar-1998 same as EntrieS BrDataTable *At(Int_t i) {return (BrDataTable*)fObjectList->At(i);} void Sort(Int_t upto) {fObjectList->Sort(upto);} void Sort() {if(fObjectList)fObjectList->Sort(Entries());} void Clear() {if(fObjectList)fObjectList->Clear();} void Delete() {if(fObjectList)fObjectList->Delete();} void DeleteAndCompressAt(Int_t i); void DeleteAndCompress(TObject* obj); protected: TObjArray *fObjectList; // List of objects stored in container public: ClassDef(BrDataTable, 1) // BRAHMS data container class }; #endif