Only call raw QA for events where we are readout
authorlaphecet <laphecet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Apr 2011 14:23:53 +0000 (14:23 +0000)
committerlaphecet <laphecet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Apr 2011 14:23:53 +0000 (14:23 +0000)
MUON/AliMUONQADataMakerRec.cxx
MUON/AliMUONTrackerQADataMakerRec.cxx

index d66990c..5e023c3 100644 (file)
@@ -28,6 +28,7 @@
 ///
 /// \author C. Finck, D. Stocco, L. Aphecetche, A. Blanc
 
+#include "AliDAQ.h"
 #include "AliMUONTrackerQADataMakerRec.h"
 #include "AliMUONTriggerQADataMakerRec.h"
 #include "AliQAChecker.h"
@@ -179,20 +180,32 @@ void AliMUONQADataMakerRec::InitESDs()
 void AliMUONQADataMakerRec::MakeRaws(AliRawReader* rawReader)
 {
   /// make QA for rawdata
-
-  // Check id histograms already created for this Event Specie
-
+  /// Note that we do not call the sub-datamaker MakeRaws method
+  /// for events where the MCH or MTR is not part of the readout...
+  
+  if ( !rawReader || !rawReader->GetDetectorPattern() ) return;
+  
+  UInt_t clmask = rawReader->GetDetectorPattern()[0];
+    
   if ( fTracker && rawReader->GetType() == AliRawEventHeaderBase::kPhysicsEvent ) 
   {
-    rawReader->Reset();
-    fTracker->MakeRaws(rawReader);
+    UInt_t mchMask = AliDAQ::DetectorPattern(" MUONTRK ");
+    if ( clmask & mchMask ) 
+    {
+      rawReader->Reset();
+      fTracker->MakeRaws(rawReader);
+    }
   }
   
   if ( fTrigger && (rawReader->GetType() == AliRawEventHeaderBase::kPhysicsEvent ||
                     rawReader->GetType() == AliRawEventHeaderBase::kCalibrationEvent ) )
   {
-    rawReader->Reset();    
-    fTrigger->MakeRaws(rawReader);
+    UInt_t mtrMask = AliDAQ::DetectorPattern(" MUONTRG ");
+    if ( clmask & mtrMask )
+    {
+      rawReader->Reset();    
+      fTrigger->MakeRaws(rawReader);
+    }
   }
 }
 
index 463fbcb..d887873 100644 (file)
@@ -579,12 +579,7 @@ void AliMUONTrackerQADataMakerRec::EndOfDetectorCycleRaws(Int_t specie, TObjArra
     ProjectTrackerData(TrackerDataMaker(specie)->Data(),
                        *hbp,*hnevents,*hddl,*hddlevents);
     
-    if ( fLogger->NumberOfEntries() > 0 )
-    {
-      // readout errors      
-      FillReadoutStatus(*fLogger,TrackerDataMaker(specie)->Data());      
-      fLogger->Clear();
-    }
+    FillReadoutStatus(*fLogger,TrackerDataMaker(specie)->Data());      
   }    
 }
 
@@ -1339,7 +1334,7 @@ void AliMUONTrackerQADataMakerRec::MakeRaws(AliRawReader* rawReader)
       TH1* hrostatus = GetRawsData(AliMUONQAIndices::kTrackerReadoutStatus);
 
       if (hrostatus) hrostatus->Fill(1.0*AliMUONQAIndices::kTrackerRawNofEmptyEvents);
-    }
+    }    
   }
 }
 
@@ -1606,6 +1601,8 @@ AliMUONTrackerQADataMakerRec::ResetDetectorRaws(TObjArray* list)
       }
     }
   }
+  
+  fLogger->Clear();
 }
 
 //____________________________________________________________________________