]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- simplification of calling AliTRDclusterizer from AliTRDReconstructor
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Mar 2009 10:46:45 +0000 (10:46 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Mar 2009 10:46:45 +0000 (10:46 +0000)
- simplification of calling AliTRDdigitsmanager from AliTRDclusterizer
- thus small changes in all three mentioned
- also changes in AliTRDclusterizer from compatibility to HLT components

TRD/AliTRDReconstructor.cxx
TRD/AliTRDclusterizer.cxx
TRD/AliTRDclusterizer.h
TRD/AliTRDdigitsManager.cxx
TRD/AliTRDdigitsManager.h

index edffd633d2bae80f299b7880567fb34f4186cc5d..738916c52cdf5ef967b791c7fc254092b93c130e 100644 (file)
@@ -161,9 +161,9 @@ void AliTRDReconstructor::Reconstruct(AliRawReader *rawReader
   rawReader->Select("TRD");
 
   // New (fast) cluster finder
-  AliTRDclusterizer clusterer("clusterer","TRD clusterizer",this);
-  //clusterer.SetReconstructor(this);                 //     ^| "this" tells the digitsmanager that we are reading raw files
-  clusterer.OpenOutput(clusterTree);                  //        it is not strictly necessaray but will give a speed up
+  AliTRDclusterizer clusterer("clusterer","TRD clusterizer");
+  clusterer.SetReconstructor(this);
+  clusterer.OpenOutput(clusterTree);
   clusterer.SetAddLabels(kFALSE);
   clusterer.Raw2ClustersChamber(rawReader);
   
@@ -185,8 +185,8 @@ void AliTRDReconstructor::Reconstruct(TTree *digitsTree
   //AliInfo("Reconstruct TRD clusters from Digits [Digit TTree -> Cluster TTree]");
 
   AliTRDclusterizer clusterer("clusterer","TRD clusterizer");
-  clusterer.SetReconstructor(this);                  //    ^| no this, because we are reading from digitsTree
-  clusterer.OpenOutput(clusterTree);                 //       it is necessary to NOT have the "this" here!
+  clusterer.SetReconstructor(this);
+  clusterer.OpenOutput(clusterTree);
   clusterer.ReadDigits(digitsTree);
   clusterer.MakeClusters();
 
index 9d1664c6e2f5893232ddb82f051be74f7bf0b3f8..a113535d9ee580d1c99e77f69138632d80e9df3a 100644 (file)
@@ -66,9 +66,8 @@ AliTRDclusterizer::AliTRDclusterizer(const AliTRDReconstructor *const rec)
   ,fClusterTree(NULL)
   ,fRecPoints(NULL)
   ,fTrackletTree(NULL)
-  ,fDigitsManager(new AliTRDdigitsManager(rec))
+  ,fDigitsManager(new AliTRDdigitsManager())
   ,fTrackletContainer(NULL)
-  ,fAddLabels(kTRUE)
   ,fRawVersion(2)
   ,fTransform(new AliTRDtransform(0))
   ,fLUTbin(0)
@@ -92,11 +91,14 @@ AliTRDclusterizer::AliTRDclusterizer(const AliTRDReconstructor *const rec)
   ,fCalPadStatusROC(NULL)
   ,fClusterROC(0)
   ,firstClusterROC(0)
+  ,fNoOfClusters(0)
 {
   //
   // AliTRDclusterizer default constructor
   //
 
+  SetBit(kAddLabels, kTRUE);
+
   AliTRDcalibDB *trd = 0x0;
   if (!(trd = AliTRDcalibDB::Instance())) {
     AliFatal("Could not get calibration object");
@@ -123,9 +125,8 @@ AliTRDclusterizer::AliTRDclusterizer(const Text_t *name, const Text_t *title, co
   ,fClusterTree(NULL)
   ,fRecPoints(NULL)
   ,fTrackletTree(NULL)
-  ,fDigitsManager(new AliTRDdigitsManager(rec))
+  ,fDigitsManager(new AliTRDdigitsManager())
   ,fTrackletContainer(NULL)
-  ,fAddLabels(kTRUE)
   ,fRawVersion(2)
   ,fTransform(new AliTRDtransform(0))
   ,fLUTbin(0)
@@ -149,11 +150,14 @@ AliTRDclusterizer::AliTRDclusterizer(const Text_t *name, const Text_t *title, co
   ,fCalPadStatusROC(NULL)
   ,fClusterROC(0)
   ,firstClusterROC(0)
+  ,fNoOfClusters(0)
 {
   //
   // AliTRDclusterizer constructor
   //
 
+  SetBit(kAddLabels, kTRUE);
+
   AliTRDcalibDB *trd = 0x0;
   if (!(trd = AliTRDcalibDB::Instance())) {
     AliFatal("Could not get calibration object");
@@ -177,7 +181,6 @@ AliTRDclusterizer::AliTRDclusterizer(const AliTRDclusterizer &c)
   ,fTrackletTree(NULL)
   ,fDigitsManager(NULL)
   ,fTrackletContainer(NULL)
-  ,fAddLabels(kTRUE)
   ,fRawVersion(2)
   ,fTransform(NULL)
   ,fLUTbin(0)
@@ -201,11 +204,14 @@ AliTRDclusterizer::AliTRDclusterizer(const AliTRDclusterizer &c)
   ,fCalPadStatusROC(NULL)
   ,fClusterROC(0)
   ,firstClusterROC(0)
+  ,fNoOfClusters(0)
 {
   //
   // AliTRDclusterizer copy constructor
   //
 
+  SetBit(kAddLabels, kTRUE);
+
   FillLUT();
 
 }
@@ -272,7 +278,6 @@ void AliTRDclusterizer::Copy(TObject &c) const
   ((AliTRDclusterizer &) c).fTrackletTree  = NULL;
   ((AliTRDclusterizer &) c).fDigitsManager = NULL;
   ((AliTRDclusterizer &) c).fTrackletContainer = NULL;
-  ((AliTRDclusterizer &) c).fAddLabels     = fAddLabels;
   ((AliTRDclusterizer &) c).fRawVersion    = fRawVersion;
   ((AliTRDclusterizer &) c).fTransform     = NULL;
   ((AliTRDclusterizer &) c).fLUTbin        = 0;
@@ -296,7 +301,7 @@ void AliTRDclusterizer::Copy(TObject &c) const
   ((AliTRDclusterizer &) c).fCalPadStatusROC = NULL;
   ((AliTRDclusterizer &) c).fClusterROC    = 0;
   ((AliTRDclusterizer &) c).firstClusterROC= 0;
-
+  ((AliTRDclusterizer &) c).fNoOfClusters  = 0;
 }
 
 //_____________________________________________________________________________
@@ -556,8 +561,8 @@ Bool_t AliTRDclusterizer::MakeClusters()
   //
 
   // Propagate info from the digits manager
-  if (fAddLabels == kTRUE){
-    fAddLabels = fDigitsManager->UsesDictionaries();
+  if (TestBit(kAddLabels)){
+    SetBit(kAddLabels, fDigitsManager->UsesDictionaries());
   }
   
   Bool_t fReturn = kTRUE;
@@ -575,7 +580,7 @@ Bool_t AliTRDclusterizer::MakeClusters()
   
     Bool_t fR = kFALSE;
     if (indexes->HasEntry()){
-      if (fAddLabels){
+      if (TestBit(kAddLabels)){
         for (Int_t iDict = 0; iDict < AliTRDdigitsManager::kNDict; iDict++){
           AliTRDarrayDictionary *tracksIn = 0; //mod
           tracksIn = (AliTRDarrayDictionary *) fDigitsManager->GetDictionary(i,iDict);  //mod
@@ -625,11 +630,11 @@ Bool_t AliTRDclusterizer::Raw2ClustersChamber(AliRawReader *rawReader)
 
   // Create the digits manager
   if (!fDigitsManager){
-    fDigitsManager = new AliTRDdigitsManager(fReconstructor);
+    fDigitsManager = new AliTRDdigitsManager(kTRUE);
     fDigitsManager->CreateArrays();
   }
 
-  fDigitsManager->SetUseDictionaries(fAddLabels);
+  fDigitsManager->SetUseDictionaries(TestBit(kAddLabels));
 
   // tracklet container for raw tracklet writing
   if (!fTrackletContainer && fReconstructor->IsWritingTracklets()) {
@@ -672,7 +677,7 @@ Bool_t AliTRDclusterizer::Raw2ClustersChamber(AliRawReader *rawReader)
   delete input;
   input = NULL;
 
-  AliInfo(Form("Number of found clusters : %d", RecPoints()->GetEntriesFast())); 
+  AliInfo(Form("Number of found clusters : %d", fNoOfClusters)); 
   return kTRUE;
 
 }
@@ -809,6 +814,9 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
   // Calibration object with the pad status
   fCalPadStatusROC       = calibration->GetPadStatusROC(fDet);
   
+  SetBit(kIsLUT, fReconstructor->GetRecoParam()->IsLUT());
+  SetBit(kIsHLT, fReconstructor->IsHLT());
+
   firstClusterROC = -1;
   fClusterROC     =  0;
 
@@ -846,7 +854,7 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
                    << "\n";
   }
 
-  if (fAddLabels) {
+  if (TestBit(kAddLabels)) {
     AddLabels(fDet,firstClusterROC,fClusterROC);
   }
 
@@ -947,12 +955,12 @@ Bool_t AliTRDclusterizer::FivePadCluster(MaxStruct &ThisMax, MaxStruct &Neighbou
 void AliTRDclusterizer::CreateCluster(const MaxStruct &Max)
 {
   //
-  // Creates a cluster at the given position and saves it in fRecPoint
+  // Creates a cluster at the given position and saves it in fRecPoints
   //
 
   // The position of the cluster in COL direction relative to the center pad (pad units)
   Double_t clusterPosCol = 0.0;
-  if (fReconstructor->GetRecoParam()->IsLUT()) {
+  if (TestBit(kIsLUT)) {
     // Calculate the position of the cluster by using the
     // lookup table method
     clusterPosCol = LUTposition(fLayer,Max.Signals[0]
@@ -982,37 +990,9 @@ void AliTRDclusterizer::CreateCluster(const MaxStruct &Max)
 
   // Count the number of pads in the cluster
   Int_t nPadCount = 1;
-  // Look to the right
-  Int_t ii = 1;
-  while (fDigits->GetData(Max.Row, Max.Col-ii, Max.Time) >= fSigThresh) {
-    nPadCount++;
-    ii++;
-    if (Max.Col < ii) break;
-  }
-  // Look to the left
-  ii = 1;
-  while (fDigits->GetData(Max.Row, Max.Col+ii, Max.Time) >= fSigThresh) {
-    nPadCount++;
-    ii++;
-    if (Max.Col+ii >= fColMax) break;
-  }
+  Short_t signals[7] = { 0, 0, 0, 0, 0, 0, 0 };
 
-  // Store the amplitudes of the pads in the cluster for later analysis
-  // and check whether one of these pads is masked in the database
-  Short_t signals[7] = { 0, 0, Max.Signals[0],
-                              Max.Signals[1], 
-                              Max.Signals[2], 0, 0 };
-  for(Int_t i = 0; i<2; i++)
-    {
-      if(Max.Col+i >= 3)
-       signals[i] = fDigits->GetData(Max.Row, Max.Col-3+i, Max.Time);
-      if(Max.Col+3-i < fColMax)
-       signals[6-i] = fDigits->GetData(Max.Row, Max.Col+3-i, Max.Time);
-    }
-  /*for (Int_t jPad = Max.Col-3; jPad <= Max.Col+3; jPad++) {
-    if ((jPad >= 0) && (jPad < fColMax))
-      signals[jPad-Max.Col+3] = TMath::Nint(fDigits->GetData(Max.Row,jPad,Max.Time));
-      }*/
+  if(!TestBit(kIsHLT))CalcAdditionalInfo(Max, signals, nPadCount);
 
   // Transform the local cluster coordinates into calibrated 
   // space point positions defined in the local tracking system.
@@ -1032,8 +1012,7 @@ void AliTRDclusterizer::CreateCluster(const MaxStruct &Max)
   Bool_t out = kTRUE;
   if (fTransform->Transform(clusterXYZ,clusterRCT,((UInt_t) Max.Time),out,0)) {
 
-    // Add the cluster to the output array
-    // The track indices will be stored later 
+    Char_t  clusterTimeBin = ((Char_t) clusterRCT[2]);
     Float_t clusterPos[3];
     clusterPos[0] = clusterXYZ[0];
     clusterPos[1] = clusterXYZ[1];
@@ -1041,45 +1020,95 @@ void AliTRDclusterizer::CreateCluster(const MaxStruct &Max)
     Float_t clusterSig[2];
     clusterSig[0] = clusterXYZ[4];
     clusterSig[1] = clusterXYZ[5];
-    Double_t clusterCharge  = clusterXYZ[3];
-    Char_t   clusterTimeBin = ((Char_t) clusterRCT[2]);
-
-    Int_t n = RecPoints()->GetEntriesFast();
-    AliTRDcluster *cluster = new((*RecPoints())[n]) AliTRDcluster(
-                                                                 fDet,
-                                                                 clusterCharge, clusterPos, clusterSig,
-                                                                 0x0,
-                                                                 ((Char_t) nPadCount),
-                                                                 signals,
-                                                                 ((UChar_t) Max.Col), ((UChar_t) Max.Row), ((UChar_t) Max.Time),
-                                                                 clusterTimeBin, clusterPosCol,
-                                                                 fVolid);
-    cluster->SetInChamber(!out);
-    cluster->SetFivePad(Max.FivePad);
-
+    Float_t clusterCharge  = clusterXYZ[3];
+    
+    AliTRDcluster cluster(
+                         fDet,
+                         clusterCharge, clusterPos, clusterSig,
+                         0x0,
+                         ((Char_t) nPadCount),
+                         signals,
+                         ((UChar_t) Max.Col), ((UChar_t) Max.Row), ((UChar_t) Max.Time),
+                         clusterTimeBin, clusterPosCol,
+                         fVolid);
+    
+    cluster.SetInChamber(!out);
+    cluster.SetFivePad(Max.FivePad);
+    
     UChar_t maskPosition = GetCorruption(Max.padStatus);
     if (maskPosition) { 
-      cluster->SetPadMaskedPosition(maskPosition);
-      cluster->SetPadMaskedStatus(GetPadStatus(Max.padStatus));
+      cluster.SetPadMaskedPosition(maskPosition);
+      cluster.SetPadMaskedStatus(GetPadStatus(Max.padStatus));
     }
-
+    
     // Temporarily store the Max.Row, column and time bin of the center pad
     // Used to later on assign the track indices
-    cluster->SetLabel(Max.Row, 0);
-    cluster->SetLabel(Max.Col, 1);
-    cluster->SetLabel(Max.Time,2);
-
+    cluster.SetLabel(Max.Row, 0);
+    cluster.SetLabel(Max.Col, 1);
+    cluster.SetLabel(Max.Time,2);
+    
+    AddClusterToArray(&cluster); //needs to be like that because HLT does things differently
+    
+    //AddCluster(Max,clusterXYZ,clusterTimeBin,signals,nPadCount,out,clusterPosCol);
     // Store the index of the first cluster in the current ROC
     if (firstClusterROC < 0) {
-      firstClusterROC = RecPoints()->GetEntriesFast() - 1;
+      firstClusterROC = fNoOfClusters;
     }
-
-    // Count the number of cluster in the current ROC
+    
+    fNoOfClusters++;
     fClusterROC++;
   }
 
 }
 
+//_____________________________________________________________________________
+void AliTRDclusterizer::CalcAdditionalInfo(const MaxStruct &Max, Short_t *const signals, Int_t &nPadCount)
+{
+  // Look to the right
+  Int_t ii = 1;
+  while (fDigits->GetData(Max.Row, Max.Col-ii, Max.Time) >= fSigThresh) {
+    nPadCount++;
+    ii++;
+    if (Max.Col < ii) break;
+  }
+  // Look to the left
+  ii = 1;
+  while (fDigits->GetData(Max.Row, Max.Col+ii, Max.Time) >= fSigThresh) {
+    nPadCount++;
+    ii++;
+    if (Max.Col+ii >= fColMax) break;
+  }
+
+  // Store the amplitudes of the pads in the cluster for later analysis
+  // and check whether one of these pads is masked in the database
+  signals[2]=Max.Signals[0];
+  signals[3]=Max.Signals[1];
+  signals[4]=Max.Signals[2];
+  for(Int_t i = 0; i<2; i++)
+    {
+      if(Max.Col+i >= 3)
+       signals[i] = fDigits->GetData(Max.Row, Max.Col-3+i, Max.Time);
+      if(Max.Col+3-i < fColMax)
+       signals[6-i] = fDigits->GetData(Max.Row, Max.Col+3-i, Max.Time);
+    }
+  /*for (Int_t jPad = Max.Col-3; jPad <= Max.Col+3; jPad++) {
+    if ((jPad >= 0) && (jPad < fColMax))
+      signals[jPad-Max.Col+3] = TMath::Nint(fDigits->GetData(Max.Row,jPad,Max.Time));
+      }*/
+}
+
+//_____________________________________________________________________________
+void AliTRDclusterizer::AddClusterToArray(AliTRDcluster *cluster)
+{
+  //
+  // Add a cluster to the array
+  //
+
+  Int_t n = RecPoints()->GetEntriesFast();
+  if(n!=fNoOfClusters)AliError(Form("fNoOfClusters != RecPoints()->GetEntriesFast %i != %i \n", fNoOfClusters, n));
+  new((*RecPoints())[n]) AliTRDcluster(*cluster);
+}
+
 //_____________________________________________________________________________
 Bool_t AliTRDclusterizer::AddLabels(const Int_t idet, const Int_t firstClusterROC, const Int_t nClusterROC)
 {
@@ -1392,7 +1421,6 @@ TClonesArray *AliTRDclusterizer::RecPoints()
     if(!(fRecPoints = AliTRDReconstructor::GetClusters())){
       // determine number of clusters which has to be allocated
       Float_t nclusters = fReconstructor->GetRecoParam()->GetNClusters();
-      if(fReconstructor->IsHLT()) nclusters /= AliTRDgeometry::kNsector;
 
       fRecPoints = new TClonesArray("AliTRDcluster", Int_t(nclusters));
     }
index c20221afd381ec7da2f25bb5cc6c50958d0f84f5..cf3ebade35f251ffca8bf4fb430abce17b69512d 100644 (file)
@@ -39,7 +39,10 @@ class AliTRDclusterizer : public TNamed
 
   // steering flags
   enum{
-    kOwner = BIT(14)
+    kIsHLT = BIT(12),    //  are we just in HLT?
+    kIsLUT = BIT(13),    //  are we using look up table for center of the cluster?
+    kOwner = BIT(14),    //  is the clusterizer owner of the clusters?
+    kAddLabels  = BIT(15)   //  Should clusters have MC labels?
   };
 
   struct MaxStruct
@@ -75,8 +78,8 @@ class AliTRDclusterizer : public TNamed
   virtual Bool_t   ReadDigits(TTree *digitsTree);
 
   virtual Bool_t   WriteClusters(Int_t det);
-          void     ResetRecPoints();
-  TClonesArray       *RecPoints();
+  void     ResetRecPoints();
+  virtual TClonesArray    *RecPoints();
           Bool_t   WriteTracklets(Int_t det);
 
   virtual Bool_t   Raw2Clusters(AliRawReader *rawReader);
@@ -86,13 +89,14 @@ class AliTRDclusterizer : public TNamed
   virtual Bool_t   MakeClusters(Int_t det);
 
   virtual Bool_t   AddLabels(const Int_t idet, const Int_t firstClusterROC, const Int_t nClusterROC);
-  virtual Bool_t   SetAddLabels(const Bool_t kset) { fAddLabels = kset; return fAddLabels;  } // should we assign labels to clusters
+  virtual Bool_t   SetAddLabels(const Bool_t kset) { SetBit(kAddLabels, kset); return TestBit(kAddLabels);  } // should we assign labels to clusters
   virtual void     SetRawVersion(const Int_t iver) { fRawVersion = iver; } // set the expected raw data version
   void             SetReconstructor(const AliTRDReconstructor *rec) {fReconstructor = rec;}
   static UChar_t   GetStatus(Short_t &signal);
+  Int_t            GetAddedClusters() {return fNoOfClusters;}
 
-  Bool_t           IsClustersOwner() const {return TestBit(kOwner);}
-  void             SetClustersOwner(Bool_t own=kTRUE) {SetBit(kOwner, own); if(!own) fRecPoints = 0x0;}
+  virtual Bool_t   IsClustersOwner() const {return TestBit(kOwner);}
+  void             SetClustersOwner(Bool_t own=kTRUE) {SetBit(kOwner, own); if(!own) {fRecPoints = 0x0; fNoOfClusters=0;} }
 
  protected:
 
@@ -112,8 +116,10 @@ class AliTRDclusterizer : public TNamed
   Bool_t           IsMaximum(const MaxStruct &Max, UChar_t &padStatus, Short_t *const Signals);       //for const correctness reasons not const parameters are given separately
   Bool_t           FivePadCluster(MaxStruct &ThisMax, MaxStruct &NeighbourMax);
   void             CreateCluster(const MaxStruct &Max); 
+  inline void      CalcAdditionalInfo(const MaxStruct &Max, Short_t *const signals, Int_t &nPadCount);
+  virtual void     AddClusterToArray(AliTRDcluster *cluster);
 
-  const AliTRDReconstructor *fReconstructor;       //! reconstructor
+  const AliTRDReconstructor *fReconstructor; //! reconstructor
   AliRunLoader        *fRunLoader;           //! Run Loader
   TTree               *fClusterTree;         //! Tree with the cluster
   TClonesArray        *fRecPoints;           //! Array of clusters
@@ -124,7 +130,6 @@ class AliTRDclusterizer : public TNamed
 
   UInt_t              **fTrackletContainer;  //! tracklet container
 
-  Bool_t               fAddLabels;           //  Should clusters have MC labels?
   Int_t                fRawVersion;          //  Expected raw version of the data - default is 2
 
   AliTRDtransform     *fTransform;           //! Transforms the reconstructed space points
@@ -132,8 +137,8 @@ class AliTRDclusterizer : public TNamed
   Int_t                fLUTbin;              //  Number of bins of the LUT
   Double_t            *fLUT;                 //! The lookup table
 
-  AliTRDarrayADC      *fDigits;
-  AliTRDSignalIndex   *fIndexes;
+  AliTRDarrayADC      *fDigits;               // Array holding the digits
+  AliTRDSignalIndex   *fIndexes;              // Array holding the indexes to the digits
   Float_t              fADCthresh;            // ADC thresholds: There is no ADC threshold anymore, and simParam should not be used in clusterizer. KO
   Float_t              fMaxThresh;            // Threshold value for the maximum
   Float_t              fSigThresh;            // Threshold value for the digit signal
@@ -148,11 +153,12 @@ class AliTRDclusterizer : public TNamed
   Float_t              fCalGainFactorDetValue;// Calibration value for chamber wise noise
   AliTRDCalROC        *fCalNoiseROC;          // Calibration object with pad wise values for the noise
   Float_t              fCalNoiseDetValue;     // Calibration value for chamber wise noise
-  AliTRDCalSingleChamberStatus *fCalPadStatusROC; //// Calibration object with the pad status
+  AliTRDCalSingleChamberStatus *fCalPadStatusROC; // Calibration object with the pad status
   Int_t                fClusterROC;           // The index to the first cluster of a given ROC
   Int_t                firstClusterROC;       // The number of cluster in a given ROC
+  Int_t                fNoOfClusters;         // Number of Clusters already processed and still owned by the clusterizer
 
-  ClassDef(AliTRDclusterizer,6)              //  TRD clusterfinder
+  ClassDef(AliTRDclusterizer,6)               //  TRD clusterfinder
 
 };
 
index a6a41ccf7f8d9b49590f1ba9e7d37935fbd137e1..32339f92489f653254170d97e9a74f251e2d5967 100644 (file)
@@ -45,7 +45,7 @@ ClassImp(AliTRDdigitsManager)
   const Int_t AliTRDdigitsManager::fgkNDict = kNDict;
 
 //_____________________________________________________________________________
-AliTRDdigitsManager::AliTRDdigitsManager(const AliTRDReconstructor *const rec)
+AliTRDdigitsManager::AliTRDdigitsManager(Bool_t rawRec)
   :TObject()
   ,fEvent(0)
   ,fTree(0)
@@ -56,13 +56,13 @@ AliTRDdigitsManager::AliTRDdigitsManager(const AliTRDReconstructor *const rec)
   ,fTreeD(0)
   ,fBranch(0)
   ,fDets(AliTRDgeometry::Ndet())
-  ,fRawRec(kFALSE)
+  ,fRawRec(rawRec)
 {
   //
   // Default constructor
   //
   
-  if(rec)
+  if(fRawRec)
     {
       fDets=1;
       fRawRec=kTRUE;
index 33c01e1742c3a11d5f70d3791f457c024ab97c56..d649a1e74ce210421d86eee078fc7a3f25573bf7 100644 (file)
@@ -20,7 +20,6 @@ class AliTRDSignalIndex;
 class AliTRDarrayADC;  
 class AliTRDarraySignal; 
 class AliTRDarrayDictionary;
-class AliTRDReconstructor;
 
 class AliTRDdigitsManager : public TObject {
 
@@ -28,7 +27,7 @@ class AliTRDdigitsManager : public TObject {
 
   enum { kNDict = 3 };
 
-  AliTRDdigitsManager(const AliTRDReconstructor *const rec = 0x0);  //if rec is given, we are reading raw data, so the TObjArrays may (and will) contain only one entry
+  AliTRDdigitsManager(Bool_t rawRec = kFALSE);  //if true digitsmanager uses only one entry in the TObjectArrays
   AliTRDdigitsManager(const AliTRDdigitsManager &m);
   virtual ~AliTRDdigitsManager();
   AliTRDdigitsManager &operator=(const AliTRDdigitsManager &m);
@@ -92,8 +91,7 @@ class AliTRDdigitsManager : public TObject {
   TTree              *fTreeD;              //  Tree with detector objects
   TBranch            *fBranch;             //  Branchaddress
   Int_t               fDets;               //  No of Detectors
-  Bool_t              fRawRec;             //  Reconstruct from raw data. If its kTRUE then the TObjArrays have only one entry.
-                                           //  If kFALSE then they have (AliTRDgeometry::Ndet()) entries (default).
+  Bool_t              fRawRec;             //  Reconstruct from raw files? If its kTRUE then the TObjArrays have only one entry.
 
   ClassDef(AliTRDdigitsManager,7)          //  Manages the TRD digits