/*
$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
+
*/
///////////////////////////////////////////////////////////////////////////////
// //
+// Alice segment manager class //
+// //
///////////////////////////////////////////////////////////////////////////////
+#include <TTree.h>
+
+#include "AliRun.h"
+
#include "AliTRD.h"
#include "AliTRDgeometry.h"
#include "AliTRDsegmentArray.h"
+#include "AliTRDdataArray.h"
ClassImp(AliTRDsegmentArray)
}
//_____________________________________________________________________________
-AliTRDsegmentArray::AliTRDsegmentArray(Int_t n)
- :AliTRDsegmentArrayBase("AliTRDdataArray",n)
+AliTRDsegmentArray::AliTRDsegmentArray(Text_t *classname, Int_t n)
+ :AliTRDsegmentArrayBase(classname,n)
{
//
// Constructor creating an array of AliTRDdataArray of size <n>
//
- AliTRDdataArray *DataArray;
+ AliTRDdataArray *dataArray;
for (Int_t i = 0; i < n; i++) {
- DataArray = (AliTRDdataArray *) AddSegment(i);
+ dataArray = (AliTRDdataArray *) AddSegment(i);
}
}
+//_____________________________________________________________________________
+AliTRDsegmentArray::AliTRDsegmentArray(AliTRDsegmentArray &a)
+{
+ //
+ // AliTRDsegmentArray copy constructor
+ //
+
+ a.Copy(*this);
+
+}
+
+//_____________________________________________________________________________
+AliTRDsegmentArray::~AliTRDsegmentArray()
+{
+ //
+ // AliTRDsegmentArray destructor
+ //
+}
+
+//_____________________________________________________________________________
+void AliTRDsegmentArray::Copy(TObject &a)
+{
+ //
+ // Copy function
+ //
+
+ AliTRDsegmentArrayBase::Copy(a);
+
+}
+
//_____________________________________________________________________________
void AliTRDsegmentArray::Delete()
{
// Loop through all segments and read them from the tree
Bool_t status = kTRUE;
for (Int_t iSegment = 0; iSegment < fNSegment; iSegment++) {
- AliTRDdataArray *DataArray = (AliTRDdataArray *) fSegment->At(iSegment);
- if (!DataArray) {
+ AliTRDdataArray *dataArray = (AliTRDdataArray *) fSegment->At(iSegment);
+ if (!dataArray) {
status = kFALSE;
break;
}
- fBranch->SetAddress(&DataArray);
+ fBranch->SetAddress(&dataArray);
fBranch->GetEntry(iSegment);
}
// Loop through all segments and fill them into the tree
Bool_t status = kTRUE;
for (Int_t iSegment = 0; iSegment < fNSegment; iSegment++) {
- const AliTRDdataArray *DataArray =
+ const AliTRDdataArray *kDataArray =
(AliTRDdataArray *) AliTRDsegmentArrayBase::At(iSegment);
- if (!DataArray) {
+ if (!kDataArray) {
status = kFALSE;
break;
}
- fBranch->SetAddress(&DataArray);
+ fBranch->SetAddress(&kDataArray);
fBranch->Fill();
}
}
//_____________________________________________________________________________
-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
if (gAlice) {
- AliTRDgeometry *Geo = ((AliTRD*) gAlice->GetDetector("TRD"))->GetGeometry();
- Int_t det = Geo->GetDetector(pla,cha,sec);
+ AliTRDgeometry *geo = ((AliTRD*) gAlice->GetDetector("TRD"))->GetGeometry();
+ Int_t det = geo->GetDetector(pla,cha,sec);
return GetDataArray(det);
}