Fixed a bug in the function MakeRaws
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 24 Jun 2008 12:55:34 +0000 (12:55 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 24 Jun 2008 12:55:34 +0000 (12:55 +0000)
FMD/AliFMDQADataMakerRec.cxx

index 644f995..168000a 100644 (file)
@@ -29,6 +29,7 @@
 #include "AliESDFMD.h"
 #include "AliFMDParameters.h"
 #include "AliFMDRawReader.h"
+#include "AliRawReader.h"
 
 //_____________________________________________________________________
 // This is the class that collects the QA data for the FMD during
@@ -211,11 +212,16 @@ void AliFMDQADataMakerRec::MakeRaws(AliRawReader* rawReader)
   AliFMDRawReader fmdReader(rawReader,0);
   TClonesArray* digitsAddress = &fDigitsArray;
   fmdReader.ReadAdcs(digitsAddress);
-  for(Int_t i=0;i<fDigitsArray.GetEntriesFast();i++) {
-    //Raw ADC counts
-    AliFMDDigit* digit = static_cast<AliFMDDigit*>(fDigitsArray.At(i));
-    GetDigitsData(0)->Fill(digit->Counts());
+  
+  rawReader->Reset();
+  
+  while(rawReader->NextEvent()) {
+    
+    for(Int_t i=0;i<fDigitsArray.GetEntriesFast();i++) {
+      //Raw ADC counts
+      AliFMDDigit* digit = static_cast<AliFMDDigit*>(fDigitsArray.At(i));
+      GetRawsData(0)->Fill(digit->Counts());
+    }
   }
   
 }