]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/AliPMDDigits2Recpoints.C
Bug fix related to the previous commit (55313)
[u/mrichter/AliRoot.git] / PMD / AliPMDDigits2Recpoints.C
index 67c917de343f9e2af2d603e1f50048dfb8f419b9..24688df1d8d4ec0b5fd57ba5acf8728516e1bb8c 100644 (file)
@@ -30,26 +30,47 @@ void AliPMDDigits2Recpoints(Int_t nevt=1)
   fRunLoader->LoadgAlice();
   gAlice = fRunLoader->GetAliRun();
 
+  printf(" Do you want reconstruction from Digits file or RAW data \n");
+  printf(" If RAW,    type 0 \n");
+  printf(" If Digits, type 1 \n");
+  Int_t itype;
+  cin >> itype;
 
   // Create the PMD Cluster Finder 
   AliPMDClusterFinder *clus = new AliPMDClusterFinder(fRunLoader);
-  
-  clus->SetDebug(1);
-  clus->Load();
 
+  if (itype == 1)
+    {
+      clus->Load();
+    }
+  else if (itype == 0)
+    {
+      clus->LoadClusters();
+    }  
 
 
   for (Int_t ievt = 0; ievt < nevt; ievt++)
     {
-      // from digits data
-      //      clus->Digits2RecPoints(ievt);
-
-      // from raw data
-      AliRawReaderFile reader(ievt);
-      clus->Digits2RecPoints(ievt, &reader);
+      if (itype == 1)
+       {
+         // from digits data
+         clus->Digits2RecPoints(ievt);
+       }
+      else if (itype == 0)
+       {
+         // from raw data
+         AliRawReaderFile reader(ievt);
+         clus->Digits2RecPoints(ievt, &reader);
+       }
+    }
+  if (itype == 1)
+    {
+      clus->UnLoad();
+    }
+  else if (itype == 0)
+    {
+      clus->UnLoadClusters();
     }
-  clus->UnLoad();
-
   timer.Stop();
   timer.Print();
 }