* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-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$ */
///////////////////////////////////////////////////////////////////////////////
// //
#include <TTree.h>
+#include "AliRun.h"
+
#include "AliTRD.h"
#include "AliTRDgeometry.h"
#include "AliTRDsegmentArray.h"
+#include "AliTRDdataArray.h"
ClassImp(AliTRDsegmentArray)
}
//_____________________________________________________________________________
-AliTRDsegmentArray::AliTRDsegmentArray(Text_t *classname, Int_t n)
+AliTRDsegmentArray::AliTRDsegmentArray(const char *classname, Int_t n)
:AliTRDsegmentArrayBase(classname,n)
{
//
//_____________________________________________________________________________
AliTRDsegmentArray::AliTRDsegmentArray(AliTRDsegmentArray &a)
+:AliTRDsegmentArrayBase(a)
{
//
// AliTRDsegmentArray copy constructor
//
// AliTRDsegmentArray destructor
//
+
+ 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);
}
//_____________________________________________________________________________
-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);
}
//_____________________________________________________________________________
-AliTRDdataArray *AliTRDsegmentArray::GetDataArray(Int_t det)
+AliTRDdataArray *AliTRDsegmentArray::GetDataArray(Int_t det) const
{
//
// Returns the data array for a given detector
}
//_____________________________________________________________________________
-AliTRDdataArray *AliTRDsegmentArray::GetDataArray(Int_t pla, Int_t cha, Int_t sec)
+AliTRDdataArray *AliTRDsegmentArray::GetDataArray(Int_t pla
+ , Int_t cha, Int_t sec) const
{
//
// Returns the data array for a given detector