]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/TTreeStream.h
bug
[u/mrichter/AliRoot.git] / STEER / TTreeStream.h
index 3250f35a3aaa72fe26aef60caced0a62f811172f..1c72dc9a966ba898edb3d060bc0e7e8be2b55289 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "TObject.h"
 #include "TString.h"
+#include "TTree.h"
 class TFile;
 class TObjArray;
 class TTree;
@@ -20,12 +21,15 @@ class TTreeDataElement: public TNamed {
   void   SetPointer(void* pointer) {fPointer=pointer;} 
   Char_t GetType() const {return fType;}
  protected:
-  TString fName;    // name of the data element
+
+  TTreeDataElement(const TTreeDataElement & tde);
+  TTreeDataElement & operator=(const TTreeDataElement & tde);
+
   Char_t  fType;     // type of data element
   TDataType *fDType; //data type pointer 
   TClass    *fClass; //data type pointer
   void * fPointer;  // pointer to element
-  ClassDef(TTreeDataElement,1)
+  ClassDef(TTreeDataElement,2)
 };
 
 class TTreeStream: public TNamed {
@@ -40,6 +44,7 @@ public:
   Int_t CheckIn(TObject *o);
   void BuildTree();
   void Fill();
+  Double_t GetSize(){ return fTree->GetZipBytes();}
   TTreeStream& Endl();
   //
   TTreeStream  &operator<<(Bool_t   &b){CheckIn('B',&b);return *this;}
@@ -59,12 +64,15 @@ public:
   TTreeStream  &operator<<(Char_t *name);
  protected:
   //
+
+  TTreeStream(const TTreeStream & ts);
+  TTreeStream & operator=(const TTreeStream & ts);
+
   TObjArray *fElements; //array of elements
   TObjArray *fBranches; //pointers to branches
   TTree *fTree;         //data storage
   Int_t fCurrentIndex;  //index of current element
   Int_t fId;            //identifier of layout
-  Int_t fHash;          //hash value of string
   TString fNextName;    //name for next entry
   Int_t   fNextNameCounter; //next name counter
   Int_t   fStatus;      //status of the layout
@@ -76,12 +84,18 @@ public:
 class TTreeSRedirector: public TObject { 
 public:
   TTreeSRedirector(const char *fname);
-  ~TTreeSRedirector();
+  virtual ~TTreeSRedirector();
   void Close();
   static void Test();
+  void StoreObject(TObject* object);
+  TFile * GetFile() {return fFile;};
   virtual   TTreeStream  &operator<<(Int_t id);
   virtual   TTreeStream  &operator<<(const char *name);
  private:
+
+  TTreeSRedirector(const TTreeSRedirector & tsr);
+  TTreeSRedirector & operator=(const TTreeSRedirector & tsr);
+
   TFile* fFile;        //file
   TObjArray *fDataLayouts;   //array of data layouts
   ClassDef(TTreeSRedirector,1)