#include <EcalMonitorPrescaler.h>
Public Member Functions | |
EcalMonitorPrescaler (const edm::ParameterSet &ps) | |
bool | filter (edm::Event &e, const edm::EventSetup &c) |
virtual | ~EcalMonitorPrescaler () |
Private Attributes | |
int | clusterPrescaleFactor_ |
int | cosmicPrescaleFactor_ |
int | count_ |
edm::InputTag | EcalRawDataCollection_ |
int | integrityPrescaleFactor_ |
int | laserPrescaleFactor_ |
int | ledPrescaleFactor_ |
int | occupancyPrescaleFactor_ |
int | pedestaloffsetPrescaleFactor_ |
int | pedestalonlinePrescaleFactor_ |
int | pedestalPrescaleFactor_ |
int | physicsPrescaleFactor_ |
int | statusflagsPrescaleFactor_ |
int | testpulsePrescaleFactor_ |
int | timingPrescaleFactor_ |
int | triggertowerPrescaleFactor_ |
Definition at line 17 of file EcalMonitorPrescaler.h.
EcalMonitorPrescaler::EcalMonitorPrescaler | ( | const edm::ParameterSet & | ps | ) |
Definition at line 17 of file EcalMonitorPrescaler.cc.
References clusterPrescaleFactor_, cosmicPrescaleFactor_, count_, EcalRawDataCollection_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), integrityPrescaleFactor_, laserPrescaleFactor_, ledPrescaleFactor_, occupancyPrescaleFactor_, pedestaloffsetPrescaleFactor_, pedestalonlinePrescaleFactor_, pedestalPrescaleFactor_, physicsPrescaleFactor_, statusflagsPrescaleFactor_, testpulsePrescaleFactor_, timingPrescaleFactor_, and triggertowerPrescaleFactor_.
{ count_ = 0; EcalRawDataCollection_ = ps.getParameter<edm::InputTag>("EcalRawDataCollection"); occupancyPrescaleFactor_ = ps.getUntrackedParameter<int>("occupancyPrescaleFactor" , 0); integrityPrescaleFactor_ = ps.getUntrackedParameter<int>("integrityPrescaleFactor", 0); statusflagsPrescaleFactor_ = ps.getUntrackedParameter<int>("statusflagsPrescaleFactor" , 0); pedestalonlinePrescaleFactor_ = ps.getUntrackedParameter<int>("pedestalonlinePrescaleFactor", 0); laserPrescaleFactor_ = ps.getUntrackedParameter<int>("laserPrescaleFactor", 0); ledPrescaleFactor_ = ps.getUntrackedParameter<int>("ledPrescaleFactor", 0); pedestalPrescaleFactor_ = ps.getUntrackedParameter<int>("pedestalPrescaleFactor", 0); testpulsePrescaleFactor_ = ps.getUntrackedParameter<int>("testpulsePrescaleFactor", 0); pedestaloffsetPrescaleFactor_ = ps.getUntrackedParameter<int>("pedestaloffsetPrescaleFactor", 0); triggertowerPrescaleFactor_ = ps.getUntrackedParameter<int>("triggertowerPrescaleFactor" , 0); timingPrescaleFactor_ = ps.getUntrackedParameter<int>("timingPrescaleFactor" , 0); cosmicPrescaleFactor_ = ps.getUntrackedParameter<int>("cosmicPrescaleFactor", 0); physicsPrescaleFactor_ = ps.getUntrackedParameter<int>("physicsPrescaleFactor", 0); clusterPrescaleFactor_ = ps.getUntrackedParameter<int>("clusterPrescaleFactor", 0); }
EcalMonitorPrescaler::~EcalMonitorPrescaler | ( | ) | [virtual] |
Definition at line 47 of file EcalMonitorPrescaler.cc.
{ }
bool EcalMonitorPrescaler::filter | ( | edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [virtual] |
Implements edm::EDFilter.
Definition at line 49 of file EcalMonitorPrescaler.cc.
References clusterPrescaleFactor_, EcalDCCHeaderBlock::COSMIC, cosmicPrescaleFactor_, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, count_, EcalRawDataCollection_, edm::Event::getByLabel(), integrityPrescaleFactor_, EcalDCCHeaderBlock::LASER_GAP, EcalDCCHeaderBlock::LASER_STD, laserPrescaleFactor_, EcalDCCHeaderBlock::LED_GAP, EcalDCCHeaderBlock::LED_STD, ledPrescaleFactor_, EcalDCCHeaderBlock::MTCC, occupancyPrescaleFactor_, EcalDCCHeaderBlock::PEDESTAL_GAP, EcalDCCHeaderBlock::PEDESTAL_OFFSET_SCAN, EcalDCCHeaderBlock::PEDESTAL_STD, pedestaloffsetPrescaleFactor_, pedestalonlinePrescaleFactor_, pedestalPrescaleFactor_, EcalDCCHeaderBlock::PHYSICS_GLOBAL, EcalDCCHeaderBlock::PHYSICS_LOCAL, physicsPrescaleFactor_, ntuplemaker::status, statusflagsPrescaleFactor_, EcalDCCHeaderBlock::TESTPULSE_GAP, EcalDCCHeaderBlock::TESTPULSE_MGPA, testpulsePrescaleFactor_, timingPrescaleFactor_, and triggertowerPrescaleFactor_.
{ count_++; bool status = false; if ( occupancyPrescaleFactor_ ) { if ( count_ % occupancyPrescaleFactor_ == 0 ) status = true; } if ( integrityPrescaleFactor_ ) { if ( count_ % integrityPrescaleFactor_ == 0 ) status = true; } if ( statusflagsPrescaleFactor_ ) { if ( count_ % statusflagsPrescaleFactor_ == 0 ) status = true; } if ( pedestalonlinePrescaleFactor_ ) { if ( count_ % pedestalonlinePrescaleFactor_ == 0 ) status = true; } if ( triggertowerPrescaleFactor_ ) { if ( count_ % triggertowerPrescaleFactor_ == 0 ) status = true; } if ( timingPrescaleFactor_ ) { if ( count_ % timingPrescaleFactor_ == 0 ) status = true; } edm::Handle<EcalRawDataCollection> dcchs; if ( e.getByLabel(EcalRawDataCollection_, dcchs) ) { for ( EcalRawDataCollection::const_iterator dcchItr = dcchs->begin(); dcchItr != dcchs->end(); ++dcchItr ) { if ( dcchItr->getRunType() == EcalDCCHeaderBlock::LASER_STD || dcchItr->getRunType() == EcalDCCHeaderBlock::LASER_GAP ) { if ( laserPrescaleFactor_ ) { if ( count_ % laserPrescaleFactor_ == 0 ) status = true; } } if ( dcchItr->getRunType() == EcalDCCHeaderBlock::LED_STD || dcchItr->getRunType() == EcalDCCHeaderBlock::LED_GAP ) { if ( ledPrescaleFactor_ ) { if ( count_ % ledPrescaleFactor_ == 0 ) status = true; } } if ( dcchItr->getRunType() == EcalDCCHeaderBlock::PEDESTAL_STD || dcchItr->getRunType() == EcalDCCHeaderBlock::PEDESTAL_GAP ) { if ( pedestalPrescaleFactor_ ) { if ( count_ % pedestalPrescaleFactor_ == 0 ) status = true; } } if ( dcchItr->getRunType() == EcalDCCHeaderBlock::TESTPULSE_MGPA || dcchItr->getRunType() == EcalDCCHeaderBlock::TESTPULSE_GAP ) { if ( testpulsePrescaleFactor_ ) { if ( count_ % testpulsePrescaleFactor_ == 0 ) status = true; } } if ( dcchItr->getRunType() == EcalDCCHeaderBlock::PEDESTAL_OFFSET_SCAN ) { if ( pedestaloffsetPrescaleFactor_ ) { if ( count_ % pedestaloffsetPrescaleFactor_ == 0 ) status = true; } } if ( dcchItr->getRunType() == EcalDCCHeaderBlock::COSMIC || dcchItr->getRunType() == EcalDCCHeaderBlock::COSMICS_GLOBAL || dcchItr->getRunType() == EcalDCCHeaderBlock::COSMICS_LOCAL ) { if ( cosmicPrescaleFactor_ ) { if ( count_ % cosmicPrescaleFactor_ == 0 ) status = true; } } if ( dcchItr->getRunType() == EcalDCCHeaderBlock::MTCC || dcchItr->getRunType() == EcalDCCHeaderBlock::PHYSICS_GLOBAL || dcchItr->getRunType() == EcalDCCHeaderBlock::PHYSICS_LOCAL ) { if ( physicsPrescaleFactor_ ) { if ( count_ % physicsPrescaleFactor_ == 0 ) status = true; } } if ( dcchItr->getRunType() == EcalDCCHeaderBlock::COSMIC || dcchItr->getRunType() == EcalDCCHeaderBlock::MTCC || dcchItr->getRunType() == EcalDCCHeaderBlock::COSMICS_GLOBAL || dcchItr->getRunType() == EcalDCCHeaderBlock::PHYSICS_GLOBAL || dcchItr->getRunType() == EcalDCCHeaderBlock::COSMICS_LOCAL || dcchItr->getRunType() == EcalDCCHeaderBlock::PHYSICS_LOCAL ) { if ( clusterPrescaleFactor_ ) { if ( count_ % clusterPrescaleFactor_ == 0 ) status = true; } } } } else { edm::LogWarning("EcalMonitorPrescaler") << EcalRawDataCollection_ << " not available"; } return status; }
int EcalMonitorPrescaler::clusterPrescaleFactor_ [private] |
Definition at line 54 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::cosmicPrescaleFactor_ [private] |
Definition at line 50 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::count_ [private] |
Definition at line 30 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
Definition at line 28 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::integrityPrescaleFactor_ [private] |
Definition at line 35 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::laserPrescaleFactor_ [private] |
Definition at line 40 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::ledPrescaleFactor_ [private] |
Definition at line 41 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::occupancyPrescaleFactor_ [private] |
Definition at line 34 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::pedestaloffsetPrescaleFactor_ [private] |
Definition at line 45 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::pedestalonlinePrescaleFactor_ [private] |
Definition at line 38 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::pedestalPrescaleFactor_ [private] |
Definition at line 42 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::physicsPrescaleFactor_ [private] |
Definition at line 52 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::statusflagsPrescaleFactor_ [private] |
Definition at line 36 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::testpulsePrescaleFactor_ [private] |
Definition at line 43 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::timingPrescaleFactor_ [private] |
Definition at line 48 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::triggertowerPrescaleFactor_ [private] |
Definition at line 47 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().