]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/TTreeStream.cxx
new AliSplineFit class. Performs recursive fits to data point arrays
[u/mrichter/AliRoot.git] / STEER / TTreeStream.cxx
index a09744ecbc8ec87706d275ef458cd5cdf5a01221..487e535c126e2520fe7a29183200b2b0ab853324 100644 (file)
@@ -1,3 +1,20 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
 //
 //  marian.ivanov@cern.ch
 //
 //  Run and see   TTreeSRedirector::Test() as an example of TTreeSRedirectorer functionality 
 // 
 
-/* $Id$ */
-
-#include "TFile.h"
-#include "TObjArray.h"
-#include "TTree.h"
-#include "TTreeStream.h"
-
+#include <TClass.h>
+#include <TFile.h>
+#include <TObjArray.h>
+#include <TTree.h>
+#include <TTreeStream.h>
 
 ClassImp(TTreeDataElement)
 ClassImp(TTreeStream)
@@ -144,6 +159,17 @@ TTreeSRedirector::~TTreeSRedirector()
   fFile->Close();
   delete fFile;
 }
+void TTreeSRedirector::StoreObject(TObject* object){
+  //
+  //
+  //
+  TFile * backup = gFile;
+  fFile->cd();
+  object->Write();
+  if (backup) backup->cd();
+}
+
+
 
 TTreeStream  & TTreeSRedirector::operator<<(Int_t id)
 {
@@ -260,6 +286,7 @@ TTreeStream::TTreeStream(const char *treename):
   fBranches(0),
   fTree(new TTree(treename, treename)),
   fCurrentIndex(0),
+  fId(0),
   fNextName(),
   fNextNameCounter(),
   fStatus(0)