]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDsegmentArray.cxx
Signature of AliESDtrack::GetOuter... has changed
[u/mrichter/AliRoot.git] / TRD / AliTRDsegmentArray.cxx
index ab01aee63d6950fdaa7e279a20e19d890ec8d595..385ca7d7c0ac5df050ed2a90ea28bc48cfa35e26 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.6  2000/11/01 14:53:21  cblume
-Merge with TRD-develop
-
-Revision 1.1.4.3  2000/10/06 16:49:46  cblume
-Made Getters const
-
-Revision 1.1.4.2  2000/10/04 16:34:58  cblume
-Replace include files by forward declarations
-
-Revision 1.5  2000/10/02 21:28:19  fca
-Removal of useless dependecies via forward declarations
-
-Revision 1.4  2000/06/27 13:08:50  cblume
-Changed to Copy(TObject &A) to appease the HP-compiler
-
-Revision 1.3  2000/06/08 18:32:58  cblume
-Make code compliant to coding conventions
-
-Revision 1.2  2000/05/08 16:17:27  cblume
-Merge TRD-develop
-
-Revision 1.1.4.1  2000/05/08 14:55:03  cblume
-Bug fixes
-
-Revision 1.1  2000/02/28 19:02:32  cblume
-Add new TRD classes
-
-*/
+/* $Id$ */
 
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
@@ -71,7 +42,7 @@ AliTRDsegmentArray::AliTRDsegmentArray():AliTRDsegmentArrayBase()
 }
 
 //_____________________________________________________________________________
-AliTRDsegmentArray::AliTRDsegmentArray(Text_t *classname, Int_t n)
+AliTRDsegmentArray::AliTRDsegmentArray(const char *classname, Int_t n)
                    :AliTRDsegmentArrayBase(classname,n)
 {
   //
@@ -88,6 +59,7 @@ AliTRDsegmentArray::AliTRDsegmentArray(Text_t *classname, Int_t n)
 
 //_____________________________________________________________________________
 AliTRDsegmentArray::AliTRDsegmentArray(AliTRDsegmentArray &a)
+:AliTRDsegmentArrayBase(a)
 {
   //
   // AliTRDsegmentArray copy constructor
@@ -103,6 +75,9 @@ AliTRDsegmentArray::~AliTRDsegmentArray()
   //
   // AliTRDsegmentArray destructor
   //
+
+  Delete();
+
 }
 
 //_____________________________________________________________________________
@@ -130,16 +105,22 @@ void AliTRDsegmentArray::Delete()
 }
 
 //_____________________________________________________________________________
-Bool_t AliTRDsegmentArray::LoadArray(const Char_t *branchname)
+Bool_t AliTRDsegmentArray::LoadArray(const Char_t *branchname, TTree *tree)
 {
   //
   // Loads all segments of the array from the branch <branchname> of
-  // the digits tree
+  // the digits tree <tree>
   //
 
-  // Connect the digits tree
-  fTree = gAlice->TreeD();
-  if (!fTree) return kFALSE;
+  fTree = tree;
+
+  // Connect the digits tree as default
+  if (!fTree) {
+    printf("AliTRDsegmentArray::LoadArray -- ");
+    printf("Use default TreeD\n");
+    fTree = gAlice->TreeD();
+    if (!fTree) return kFALSE;
+  }
 
   // Get the branch
   fBranch = fTree->GetBranch(branchname);
@@ -162,16 +143,22 @@ Bool_t AliTRDsegmentArray::LoadArray(const Char_t *branchname)
 }
 
 //_____________________________________________________________________________
-Bool_t AliTRDsegmentArray::StoreArray(const Char_t *branchname)
+Bool_t AliTRDsegmentArray::StoreArray(const Char_t *branchname, TTree *tree)
 {
   //
   // Stores all segments of the array in the branch <branchname> of 
-  // the digits tree
+  // the digits tree <tree>
   //
 
-  // Connect the digits tree
-  fTree = gAlice->TreeD();
-  if (!fTree) return kFALSE;
+  fTree = tree;
+
+  // Connect the digits tree as default
+  if (!fTree) {
+    printf("AliTRDsegmentArray::StoreArray -- ");
+    printf("Use default TreeD\n");
+    fTree = gAlice->TreeD();
+    if (!fTree) return kFALSE;
+  }
 
   // Get the branch
   fBranch = fTree->GetBranch(branchname);