Adding a SetTreeAddress in AliPHOS and AliPHOSv0 classes for the re-analysis of the...
authormartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 29 May 2000 17:18:21 +0000 (17:18 +0000)
committermartinez <martinez@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 29 May 2000 17:18:21 +0000 (17:18 +0000)
PHOS/AliPHOSv0.cxx
PHOS/AliPHOSv0.h

index dbb1662..7c77325 100644 (file)
@@ -1269,31 +1269,6 @@ void AliPHOSv0::MakeBranch(Option_t* opt)
 
 }
 
-//____________________________________________________________________________
-AliPHOSRecPoint::RecPointsList * AliPHOSv0::PpsdRecPoints(Int_t evt) 
-{
-  // returns the pointer to the PPSD RecPoints list
-  // if the list is empty, get it from TreeR on the disk file
-
-  AliPHOSRecPoint::RecPointsList * rv = 0 ; 
-
-  if ( fPpsdRecPoints ) 
-    rv = fPpsdRecPoints ; 
-
-  else {
-    fPpsdRecPoints = new TClonesArray("AliPHOSPpsdRecPoint", 100) ; 
-    gAlice->GetEvent(evt) ; 
-    TTree * fReconstruct = gAlice->TreeR() ; 
-    fReconstruct->SetBranchAddress( "PHOSPpsdRP", &fPpsdRecPoints) ;
-    fReconstruct->GetEvent(0) ;
-    rv =  fPpsdRecPoints ;
-  }
-  
-  fPpsdRecPoints->Expand( fPpsdRecPoints->GetEntries() ) ; 
-    
-  return rv ; 
-  
-}
 
 //_____________________________________________________________________________
 void AliPHOSv0::Reconstruction(AliPHOSReconstructioner * Reconstructioner)
@@ -1426,6 +1401,23 @@ void AliPHOSv0::ResetReconstruction()
   
 }
 //____________________________________________________________________________
+
+//____________________________________________________________________________
+void AliPHOSv0::SetTreeAddress()
+{ 
+  TBranch *branch;
+  AliPHOS::SetTreeAddress();
+
+  //Branch address for TreeR: RecPpsdRecPoint
+  TTree *treeR = gAlice->TreeR();
+  if ( treeR && fPpsdRecPoints ) {
+    branch = treeR->GetBranch("PHOSPpsdRP");
+    if (branch) branch->SetAddress(&fPpsdRecPoints) ;
+  }
+}
+
+//____________________________________________________________________________
+
 void AliPHOSv0::StepManager(void)
 {
   // Accumulates hits as long as the track stays in a single crystal or PPSD gas Cell
index f74d311..c4378f7 100644 (file)
@@ -41,12 +41,16 @@ public:
   virtual void   Init(void) ;                                       // does nothing
   Int_t IsVersion(void) const { return 0 ; }
   void           MakeBranch(Option_t* opt) ;
-  virtual AliPHOSRecPoint::RecPointsList* PpsdRecPoints(Int_t evt=0) ; // gets Array of clusters in the PPSD 
+  virtual  AliPHOSRecPoint::RecPointsList *  PpsdRecPoints() {
+    // Getting list of PPSD RecPoints
+    return fPpsdRecPoints ;
+  }
   void           Reconstruction(AliPHOSReconstructioner * Reconstructioner) ;
   void           ResetClusters(){} ;
   virtual void   ResetDigits() ; 
   void           SetReconstructioner(AliPHOSReconstructioner& Reconstructioner) {fReconstructioner = &Reconstructioner ;} 
   void           SetDigitThreshold(Float_t th) { fDigitThreshold = th ; } 
+  virtual void   SetTreeAddress(); 
   virtual void   StepManager(void) ;                                // does the tracking through PHOS and a preliminary digitalization
   virtual TString Version(void){ return TString("v0"); }
 protected: