CMS 3D CMS Logo

HcalMonitorSelector.cc

Go to the documentation of this file.
00001 #include <DQM/HcalMonitorModule/interface/HcalMonitorSelector.h>
00002 
00003 /*
00004  * \file HcalMonitorSelector.cc
00005  * 
00006  * $Date: 2008/08/13 17:06:44 $
00007  * $Revision: 1.10 $
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     m_runNum=-1; 
00037     //If we don't have the trigger data, just activate everyone!
00038     m_eventMask = m_eventMask|DO_HCAL_PED_CALIBMON|DO_HCAL_LED_CALIBMON|DO_HCAL_LASER_CALIBMON; 
00039     return; 
00040   }
00041   const HcalTBTriggerData trigger = *triggerD;
00042   
00043   m_runNum = trigger.runNumber();
00044 
00045   // check trigger contents
00046   if (trigger.wasBeamTrigger())             { m_triggerMask |= 0x01; m_eventMask = m_eventMask|HCAL_BEAM_TRIGGER;}
00047   if (trigger.wasOutSpillPedestalTrigger()) { m_triggerMask |= 0x02; m_eventMask = m_eventMask|DO_HCAL_PED_CALIBMON;}
00048   if (trigger.wasInSpillPedestalTrigger())  { m_triggerMask |= 0x04; m_eventMask = m_eventMask|DO_HCAL_PED_CALIBMON;}
00049   if (trigger.wasLEDTrigger())              { m_triggerMask |= 0x08; m_eventMask = m_eventMask|DO_HCAL_LED_CALIBMON;}
00050   if (trigger.wasLaserTrigger())            { m_triggerMask |= 0x10; m_eventMask = m_eventMask|DO_HCAL_LASER_CALIBMON;}
00051 
00052   if(m_eventMask&DO_HCAL_PED_CALIBMON) m_eventMask = m_eventMask^DO_HCAL_RECHITMON;
00053 
00054   return;
00055 }

Generated on Tue Jun 9 17:32:57 2009 for CMSSW by  doxygen 1.5.4