new method Load added to AliPMDClusterFinder
authorbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 2 Apr 2004 12:42:42 +0000 (12:42 +0000)
committerbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 2 Apr 2004 12:42:42 +0000 (12:42 +0000)
PMD/AliPMD.cxx
PMD/AliPMDClusterFinder.cxx
PMD/AliPMDClusterFinder.h

index 3727fd3bfd58254370af5ff1c74f10df49bda12c..23121931bddd7adc9840be281ee58b0c3807033c 100644 (file)
@@ -374,11 +374,12 @@ void  AliPMD::Reconstruct() const
   
   AliRunLoader* runLoader = fLoader->GetRunLoader(); 
   AliPMDClusterFinder *pmdClus = new AliPMDClusterFinder(runLoader);
+  pmdClus->Load();
   for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++)
     {
       pmdClus->Digits2RecPoints(iEvent);
     }
-
+  pmdClus->UnLoad("R");
   delete pmdClus;
 
 }
index 19f5b0515e30e06091b3b043aef12652e5574d93..fd8499e03c4c37b25f40a7a20f71da390622ff04 100644 (file)
@@ -96,8 +96,6 @@ void AliPMDClusterFinder::Digits2RecPoints(Int_t ievt)
   pmdclust->SetDebug(fDebug);
   pmdclust->SetEdepCut(fEcut);
 
-  fPMDLoader->LoadDigits("READ");
-  fPMDLoader->LoadRecPoints("recreate");
   fRunLoader->GetEvent(ievt);
   //cout << " ***** Beginning::Digits2RecPoints *****" << endl;
   fTreeD = fPMDLoader->TreeD();
@@ -170,8 +168,6 @@ void AliPMDClusterFinder::Digits2RecPoints(Int_t ievt)
   ResetCellADC();
   fPMDLoader = fRunLoader->GetLoader("PMDLoader");  
   fPMDLoader->WriteRecPoints("OVERWRITE");
-  fPMDLoader->UnloadRecPoints();
-  fPMDLoader->UnloadDigits();
 
   //   delete the pointers
   delete pmdclust;
@@ -222,6 +218,14 @@ void AliPMDClusterFinder::ResetRecpoint()
   if (fRecpoints) fRecpoints->Clear();
 }
 // ------------------------------------------------------------------------- //
+void AliPMDClusterFinder::Load()
+{
+  // Unload all the *.root files
+  //
+  fPMDLoader->LoadDigits("READ");
+  fPMDLoader->LoadRecPoints("recreate");
+}
+// ------------------------------------------------------------------------- //
 void AliPMDClusterFinder::UnLoad(Option_t *option)
 {
   // Unload all the *.root files
index bdb3c27a8173dff6677f6c9f9d1565f4fb9c6126..85aa4f18a8e0ef9512c6ba2ec24dddc6c07d35c4 100644 (file)
@@ -43,6 +43,7 @@ class AliPMDClusterFinder
   void AddRecPoint(Int_t idet, Int_t ismn, Float_t * clusdata);
   void ResetCellADC();
   void ResetRecpoint();
+  void Load();
   void UnLoad(Option_t * option);
 
  protected:
@@ -64,7 +65,7 @@ class AliPMDClusterFinder
   static const Int_t fgkCol = 96; // Total number of cols in one unitmodule
   Double_t fCellADC[fgkRow][fgkCol]; // Array containing individual cell ADC
 
-  ClassDef(AliPMDClusterFinder,3) // To run PMD clustering
+  ClassDef(AliPMDClusterFinder,4) // To run PMD clustering
 };
 #endif