Method added to start reconstruction from raw data
[u/mrichter/AliRoot.git] / PMD / AliPMDReconstructor.cxx
index 185181413995b9bfab47ec36d4cd25afc8236adf..1b5d51235961c532a86d2dc12904ef6812e94764 100644 (file)
 #include "AliRun.h"
 #include "AliPMDClusterFinder.h"
 #include "AliPMDtracker.h"
+#include "AliRawReader.h"
 #include "AliESDPmdTrack.h"
 #include "AliESD.h"
 
-
 ClassImp(AliPMDReconstructor)
 
 
 //_____________________________________________________________________________
 void AliPMDReconstructor::Reconstruct(AliRunLoader* runLoader) const
 {
-// reconstruct clusters
+// reconstruct clusters from digits file
 
   AliPMDClusterFinder *pmdClus = new AliPMDClusterFinder(runLoader);
   pmdClus->Load();
+  pmdClus->SetDebug(1);
   for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++)
     {
       pmdClus->Digits2RecPoints(iEvent);
@@ -46,6 +47,25 @@ void AliPMDReconstructor::Reconstruct(AliRunLoader* runLoader) const
   pmdClus->UnLoad();
   delete pmdClus;
 
+}
+//_____________________________________________________________________________
+void AliPMDReconstructor::Reconstruct(AliRunLoader* runLoader,
+                                     AliRawReader *rawReader) const
+{
+// reconstruct clusters from Raw Data
+
+  AliPMDClusterFinder pmdClus(runLoader);
+  pmdClus.LoadClusters();
+
+  Int_t iEvent = 0;
+  while (rawReader->NextEvent()) {
+    pmdClus.SetDebug(1);
+    pmdClus.Digits2RecPoints(iEvent,rawReader);
+    
+    iEvent++;
+  }
+  pmdClus.UnLoadClusters();
+  
 }
 
 // ------------------------------------------------------------------------ //