]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
select only raw data events where the EMCAL was included (needed for calibration...
authordsilverm <dsilverm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Apr 2010 22:33:23 +0000 (22:33 +0000)
committerdsilverm <dsilverm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Apr 2010 22:33:23 +0000 (22:33 +0000)
EMCAL/AliEMCALQADataMakerRec.cxx

index 0a00d6d530d3b4f6208a944854d9b1a285a55e13..6d0feac53dc7c01cb774118118020c31e698d4dc 100644 (file)
@@ -37,6 +37,7 @@ Change all existing histograms as experts
 
 
 // --- AliRoot header files ---
+#include "AliDAQ.h"
 #include "AliESDCaloCluster.h"
 #include "AliESDCaloCells.h"
 #include "AliESDEvent.h"
@@ -376,6 +377,13 @@ void AliEMCALQADataMakerRec::MakeESDs(AliESDEvent * esd)
 void AliEMCALQADataMakerRec::MakeRaws(AliRawReader* rawReader)
 {
   //Fill prepared histograms with Raw digit properties
+
+  // make sure EMCal was readout during the event
+  Int_t emcID = AliDAQ::DetectorID("EMCAL"); // bit 18..
+  const UInt_t *detPattern = reader->GetDetectorPattern(); 
+  UInt_t emcInReadout = ( ((1 << emcID) & detPattern[0]) >> emcID);
+  if (! emcInReadout) return; // no point in looking at this event, if no EMCal data
+
   // setup
   rawReader->Reset() ;
   AliCaloRawStreamV3 in(rawReader,"EMCAL");