00001 #include <DQM/HcalMonitorModule/interface/HcalMonitorSelector.h> 00002 00003 /* 00004 * \file HcalMonitorSelector.cc 00005 * 00006 * $Date: 2010/04/08 15:42:19 $ 00007 * $Revision: 1.12 $ 00008 * \author W Fisher 00009 * 00010 */ 00011 00012 HcalMonitorSelector::HcalMonitorSelector(const edm::ParameterSet& ps){ 00013 00014 m_eventMask = 0; 00015 m_triggerMask = 0; 00016 m_runNum = -1; 00017 } 00018 00019 HcalMonitorSelector::~HcalMonitorSelector(){ 00020 00021 } 00022 00023 void HcalMonitorSelector::processEvent(const edm::Event& e){ 00024 m_eventMask = 0; 00025 m_triggerMask = 0; 00026 00028 m_eventMask = DO_HCAL_DIGIMON|DO_HCAL_DFMON|DO_HCAL_RECHITMON; 00029 m_eventMask = m_eventMask|DO_HCAL_PED_CALIBMON|DO_HCAL_LED_CALIBMON|DO_HCAL_LASER_CALIBMON; 00030 00031 return; 00032 00033 edm::Handle<HcalTBTriggerData> triggerD; 00034 e.getByType(triggerD); 00035 if (!triggerD.isValid()) 00036 { 00037 m_runNum=-1; 00038 //If we don't have the trigger data, just activate everyone! 00039 m_eventMask = m_eventMask|DO_HCAL_PED_CALIBMON|DO_HCAL_LED_CALIBMON|DO_HCAL_LASER_CALIBMON; 00040 return; 00041 } 00042 const HcalTBTriggerData trigger = *triggerD; 00043 00044 m_runNum = trigger.runNumber(); 00045 00046 // check trigger contents 00047 if (trigger.wasBeamTrigger()) { m_triggerMask |= 0x01; m_eventMask = m_eventMask|HCAL_BEAM_TRIGGER;} 00048 if (trigger.wasOutSpillPedestalTrigger()) { m_triggerMask |= 0x02; m_eventMask = m_eventMask|DO_HCAL_PED_CALIBMON;} 00049 if (trigger.wasInSpillPedestalTrigger()) { m_triggerMask |= 0x04; m_eventMask = m_eventMask|DO_HCAL_PED_CALIBMON;} 00050 if (trigger.wasLEDTrigger()) { m_triggerMask |= 0x08; m_eventMask = m_eventMask|DO_HCAL_LED_CALIBMON;} 00051 if (trigger.wasLaserTrigger()) { m_triggerMask |= 0x10; m_eventMask = m_eventMask|DO_HCAL_LASER_CALIBMON;} 00052 00053 if(m_eventMask&DO_HCAL_PED_CALIBMON) m_eventMask = m_eventMask^DO_HCAL_RECHITMON; 00054 00055 return; 00056 }