#include <DQM/EcalCommon/interface/EcalMonitorPrescaler.h>
Public Member Functions | |
EcalMonitorPrescaler (edm::ParameterSet const &) | |
void | endJob (void) |
virtual bool | filter (edm::Event &e, edm::EventSetup const &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 | statusflagsPrescaleFactor_ |
int | testpulsePrescaleFactor_ |
int | timingPrescaleFactor_ |
int | triggertowerPrescaleFactor_ |
Definition at line 19 of file EcalMonitorPrescaler.h.
EcalMonitorPrescaler::EcalMonitorPrescaler | ( | edm::ParameterSet const & | ps | ) | [explicit] |
Definition at line 21 of file EcalMonitorPrescaler.cc.
References clusterPrescaleFactor_, cosmicPrescaleFactor_, count_, EcalRawDataCollection_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), integrityPrescaleFactor_, laserPrescaleFactor_, ledPrescaleFactor_, occupancyPrescaleFactor_, pedestaloffsetPrescaleFactor_, pedestalonlinePrescaleFactor_, pedestalPrescaleFactor_, statusflagsPrescaleFactor_, testpulsePrescaleFactor_, timingPrescaleFactor_, and triggertowerPrescaleFactor_.
00021 { 00022 00023 count_ = 0; 00024 00025 EcalRawDataCollection_ = ps.getParameter<InputTag>("EcalRawDataCollection"); 00026 00027 occupancyPrescaleFactor_ = ps.getUntrackedParameter<int>("occupancyPrescaleFactor" , 0); 00028 integrityPrescaleFactor_ = ps.getUntrackedParameter<int>("integrityPrescaleFactor", 0); 00029 statusflagsPrescaleFactor_ = ps.getUntrackedParameter<int>("statusflagsPrescaleFactor" , 0); 00030 00031 pedestalonlinePrescaleFactor_ = ps.getUntrackedParameter<int>("pedestalonlinePrescaleFactor", 0); 00032 00033 laserPrescaleFactor_ = ps.getUntrackedParameter<int>("laserPrescaleFactor", 0); 00034 ledPrescaleFactor_ = ps.getUntrackedParameter<int>("ledPrescaleFactor", 0); 00035 pedestalPrescaleFactor_ = ps.getUntrackedParameter<int>("pedestalPrescaleFactor", 0); 00036 testpulsePrescaleFactor_ = ps.getUntrackedParameter<int>("testpulsePrescaleFactor", 0); 00037 00038 pedestaloffsetPrescaleFactor_ = ps.getUntrackedParameter<int>("pedestaloffsetPrescaleFactor", 0); 00039 00040 triggertowerPrescaleFactor_ = ps.getUntrackedParameter<int>("triggertowerPrescaleFactor" , 0); 00041 timingPrescaleFactor_ = ps.getUntrackedParameter<int>("timingPrescaleFactor" , 0); 00042 00043 cosmicPrescaleFactor_ = ps.getUntrackedParameter<int>("cosmicPrescaleFactor", 0); 00044 clusterPrescaleFactor_ = ps.getUntrackedParameter<int>("clusterPrescaleFactor", 0); 00045 00046 }
EcalMonitorPrescaler::~EcalMonitorPrescaler | ( | ) | [virtual] |
bool EcalMonitorPrescaler::filter | ( | edm::Event & | e, | |
edm::EventSetup const & | c | |||
) | [virtual] |
Implements edm::EDFilter.
Definition at line 50 of file EcalMonitorPrescaler.cc.
References clusterPrescaleFactor_, EcalDCCHeaderBlock::COSMIC, cosmicPrescaleFactor_, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, count_, EcalRawDataCollection_, edm::Event::getByLabel(), EcalDCCHeaderBlock::getRunType(), 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, StDecayID::status, statusflagsPrescaleFactor_, EcalDCCHeaderBlock::TESTPULSE_GAP, EcalDCCHeaderBlock::TESTPULSE_MGPA, testpulsePrescaleFactor_, timingPrescaleFactor_, and triggertowerPrescaleFactor_.
00050 { 00051 00052 count_++; 00053 00054 bool status = false; 00055 00056 if ( occupancyPrescaleFactor_ ) { 00057 if ( count_ % occupancyPrescaleFactor_ == 0 ) status = true; 00058 } 00059 if ( integrityPrescaleFactor_ ) { 00060 if ( count_ % integrityPrescaleFactor_ == 0 ) status = true; 00061 } 00062 if ( statusflagsPrescaleFactor_ ) { 00063 if ( count_ % statusflagsPrescaleFactor_ == 0 ) status = true; 00064 } 00065 00066 if ( pedestalonlinePrescaleFactor_ ) { 00067 if ( count_ % pedestalonlinePrescaleFactor_ == 0 ) status = true; 00068 } 00069 00070 if ( triggertowerPrescaleFactor_ ) { 00071 if ( count_ % triggertowerPrescaleFactor_ == 0 ) status = true; 00072 } 00073 if ( timingPrescaleFactor_ ) { 00074 if ( count_ % timingPrescaleFactor_ == 0 ) status = true; 00075 } 00076 00077 Handle<EcalRawDataCollection> dcchs; 00078 00079 if ( e.getByLabel(EcalRawDataCollection_, dcchs) ) { 00080 00081 for ( EcalRawDataCollection::const_iterator dcchItr = dcchs->begin(); dcchItr != dcchs->end(); ++dcchItr ) { 00082 00083 EcalDCCHeaderBlock dcch = (*dcchItr); 00084 00085 if ( dcch.getRunType() == EcalDCCHeaderBlock::LASER_STD || 00086 dcch.getRunType() == EcalDCCHeaderBlock::LASER_GAP ) { 00087 if ( laserPrescaleFactor_ ) { 00088 if ( count_ % laserPrescaleFactor_ == 0 ) status = true; 00089 } 00090 } 00091 if ( dcch.getRunType() == EcalDCCHeaderBlock::LED_STD || 00092 dcch.getRunType() == EcalDCCHeaderBlock::LED_GAP ) { 00093 if ( ledPrescaleFactor_ ) { 00094 if ( count_ % ledPrescaleFactor_ == 0 ) status = true; 00095 } 00096 } 00097 if ( dcch.getRunType() == EcalDCCHeaderBlock::PEDESTAL_STD || 00098 dcch.getRunType() == EcalDCCHeaderBlock::PEDESTAL_GAP ) { 00099 if ( pedestalPrescaleFactor_ ) { 00100 if ( count_ % pedestalPrescaleFactor_ == 0 ) status = true; 00101 } 00102 } 00103 if ( dcch.getRunType() == EcalDCCHeaderBlock::TESTPULSE_MGPA || 00104 dcch.getRunType() == EcalDCCHeaderBlock::TESTPULSE_GAP ) { 00105 if ( testpulsePrescaleFactor_ ) { 00106 if ( count_ % testpulsePrescaleFactor_ == 0 ) status = true; 00107 } 00108 } 00109 00110 if ( dcch.getRunType() == EcalDCCHeaderBlock::PEDESTAL_OFFSET_SCAN ) { 00111 if ( pedestaloffsetPrescaleFactor_ ) { 00112 if ( count_ % pedestaloffsetPrescaleFactor_ == 0 ) status = true; 00113 } 00114 } 00115 00116 if ( dcch.getRunType() == EcalDCCHeaderBlock::COSMIC || 00117 dcch.getRunType() == EcalDCCHeaderBlock::MTCC || 00118 dcch.getRunType() == EcalDCCHeaderBlock::COSMICS_GLOBAL || 00119 dcch.getRunType() == EcalDCCHeaderBlock::PHYSICS_GLOBAL || 00120 dcch.getRunType() == EcalDCCHeaderBlock::COSMICS_LOCAL || 00121 dcch.getRunType() == EcalDCCHeaderBlock::PHYSICS_LOCAL ) { 00122 if ( cosmicPrescaleFactor_ ) { 00123 if ( count_ % cosmicPrescaleFactor_ == 0 ) status = true; 00124 } 00125 } 00126 00127 if ( dcch.getRunType() == EcalDCCHeaderBlock::COSMIC || 00128 dcch.getRunType() == EcalDCCHeaderBlock::MTCC || 00129 dcch.getRunType() == EcalDCCHeaderBlock::COSMICS_GLOBAL || 00130 dcch.getRunType() == EcalDCCHeaderBlock::PHYSICS_GLOBAL || 00131 dcch.getRunType() == EcalDCCHeaderBlock::COSMICS_LOCAL || 00132 dcch.getRunType() == EcalDCCHeaderBlock::PHYSICS_LOCAL ) { 00133 if ( clusterPrescaleFactor_ ) { 00134 if ( count_ % clusterPrescaleFactor_ == 0 ) status = true; 00135 } 00136 } 00137 00138 } 00139 00140 } else { 00141 00142 LogWarning("EcalMonitorPrescaler") << EcalRawDataCollection_ << " not available"; 00143 00144 } 00145 00146 return status; 00147 00148 }
Definition at line 54 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
Definition at line 53 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::count_ [private] |
Definition at line 33 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
Definition at line 31 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
Definition at line 38 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
Definition at line 43 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
int EcalMonitorPrescaler::ledPrescaleFactor_ [private] |
Definition at line 44 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
Definition at line 37 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
Definition at line 48 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
Definition at line 41 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
Definition at line 45 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
Definition at line 39 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
Definition at line 46 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
Definition at line 51 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().
Definition at line 50 of file EcalMonitorPrescaler.h.
Referenced by EcalMonitorPrescaler(), and filter().