]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDsegmentArray.cxx
Update of digitization. Moved digit branch definition to AliTRD
[u/mrichter/AliRoot.git] / TRD / AliTRDsegmentArray.cxx
index 15306ccd9a7b717c8b80e7ee3a693c9548713be0..ab01aee63d6950fdaa7e279a20e19d890ec8d595 100644 (file)
 
 /*
 $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)
 
@@ -37,21 +71,51 @@ AliTRDsegmentArray::AliTRDsegmentArray():AliTRDsegmentArrayBase()
 }
 
 //_____________________________________________________________________________
-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()
 {
@@ -84,12 +148,12 @@ Bool_t AliTRDsegmentArray::LoadArray(const Char_t *branchname)
   // 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);
   }
 
@@ -116,13 +180,13 @@ Bool_t AliTRDsegmentArray::StoreArray(const Char_t *branchname)
   // 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();
   }
 
@@ -131,7 +195,7 @@ Bool_t AliTRDsegmentArray::StoreArray(const Char_t *branchname)
 }
 
 //_____________________________________________________________________________
-AliTRDdataArray *AliTRDsegmentArray::GetDataArray(Int_t det)
+AliTRDdataArray *AliTRDsegmentArray::GetDataArray(Int_t det) const
 {
   //
   // Returns the data array for a given detector
@@ -142,7 +206,8 @@ AliTRDdataArray *AliTRDsegmentArray::GetDataArray(Int_t det)
 }
 
 //_____________________________________________________________________________
-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
@@ -150,8 +215,8 @@ AliTRDdataArray *AliTRDsegmentArray::GetDataArray(Int_t pla, Int_t cha, Int_t se
 
   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);
 
   }