CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
EcalMonitorPrescaler Class Reference

#include <EcalMonitorPrescaler.h>

Inheritance diagram for EcalMonitorPrescaler:
edm::EDFilter edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 EcalMonitorPrescaler (const edm::ParameterSet &ps)
 
bool filter (edm::Event &e, const edm::EventSetup &c)
 
virtual ~EcalMonitorPrescaler ()
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
virtual ~EDFilter ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

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_
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter ModuleType
 
typedef WorkerT< EDFilterWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDFilter
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 17 of file EcalMonitorPrescaler.h.

Constructor & Destructor Documentation

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_.

17  {
18 
19  count_ = 0;
20 
21  EcalRawDataCollection_ = ps.getParameter<edm::InputTag>("EcalRawDataCollection");
22 
23  occupancyPrescaleFactor_ = ps.getUntrackedParameter<int>("occupancyPrescaleFactor" , 0);
24  integrityPrescaleFactor_ = ps.getUntrackedParameter<int>("integrityPrescaleFactor", 0);
25  statusflagsPrescaleFactor_ = ps.getUntrackedParameter<int>("statusflagsPrescaleFactor" , 0);
26 
27  pedestalonlinePrescaleFactor_ = ps.getUntrackedParameter<int>("pedestalonlinePrescaleFactor", 0);
28 
29  laserPrescaleFactor_ = ps.getUntrackedParameter<int>("laserPrescaleFactor", 0);
30  ledPrescaleFactor_ = ps.getUntrackedParameter<int>("ledPrescaleFactor", 0);
31  pedestalPrescaleFactor_ = ps.getUntrackedParameter<int>("pedestalPrescaleFactor", 0);
32  testpulsePrescaleFactor_ = ps.getUntrackedParameter<int>("testpulsePrescaleFactor", 0);
33 
34  pedestaloffsetPrescaleFactor_ = ps.getUntrackedParameter<int>("pedestaloffsetPrescaleFactor", 0);
35 
36  triggertowerPrescaleFactor_ = ps.getUntrackedParameter<int>("triggertowerPrescaleFactor" , 0);
37  timingPrescaleFactor_ = ps.getUntrackedParameter<int>("timingPrescaleFactor" , 0);
38 
39  cosmicPrescaleFactor_ = ps.getUntrackedParameter<int>("cosmicPrescaleFactor", 0);
40 
41  physicsPrescaleFactor_ = ps.getUntrackedParameter<int>("physicsPrescaleFactor", 0);
42 
43  clusterPrescaleFactor_ = ps.getUntrackedParameter<int>("clusterPrescaleFactor", 0);
44 
45 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag EcalRawDataCollection_
EcalMonitorPrescaler::~EcalMonitorPrescaler ( )
virtual

Definition at line 47 of file EcalMonitorPrescaler.cc.

47 { }

Member Function Documentation

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_.

Referenced by Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filter(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setDataAccessor(), and Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView().

49  {
50 
51  count_++;
52 
53  bool status = false;
54 
56  if ( count_ % occupancyPrescaleFactor_ == 0 ) status = true;
57  }
59  if ( count_ % integrityPrescaleFactor_ == 0 ) status = true;
60  }
62  if ( count_ % statusflagsPrescaleFactor_ == 0 ) status = true;
63  }
64 
66  if ( count_ % pedestalonlinePrescaleFactor_ == 0 ) status = true;
67  }
68 
70  if ( count_ % triggertowerPrescaleFactor_ == 0 ) status = true;
71  }
72  if ( timingPrescaleFactor_ ) {
73  if ( count_ % timingPrescaleFactor_ == 0 ) status = true;
74  }
75 
77 
78  if ( e.getByLabel(EcalRawDataCollection_, dcchs) ) {
79 
80  for ( EcalRawDataCollection::const_iterator dcchItr = dcchs->begin(); dcchItr != dcchs->end(); ++dcchItr ) {
81 
82  if ( dcchItr->getRunType() == EcalDCCHeaderBlock::LASER_STD ||
83  dcchItr->getRunType() == EcalDCCHeaderBlock::LASER_GAP ) {
84  if ( laserPrescaleFactor_ ) {
85  if ( count_ % laserPrescaleFactor_ == 0 ) status = true;
86  }
87  }
88  if ( dcchItr->getRunType() == EcalDCCHeaderBlock::LED_STD ||
89  dcchItr->getRunType() == EcalDCCHeaderBlock::LED_GAP ) {
90  if ( ledPrescaleFactor_ ) {
91  if ( count_ % ledPrescaleFactor_ == 0 ) status = true;
92  }
93  }
94  if ( dcchItr->getRunType() == EcalDCCHeaderBlock::PEDESTAL_STD ||
95  dcchItr->getRunType() == EcalDCCHeaderBlock::PEDESTAL_GAP ) {
96  if ( pedestalPrescaleFactor_ ) {
97  if ( count_ % pedestalPrescaleFactor_ == 0 ) status = true;
98  }
99  }
100  if ( dcchItr->getRunType() == EcalDCCHeaderBlock::TESTPULSE_MGPA ||
101  dcchItr->getRunType() == EcalDCCHeaderBlock::TESTPULSE_GAP ) {
102  if ( testpulsePrescaleFactor_ ) {
103  if ( count_ % testpulsePrescaleFactor_ == 0 ) status = true;
104  }
105  }
106 
107  if ( dcchItr->getRunType() == EcalDCCHeaderBlock::PEDESTAL_OFFSET_SCAN ) {
109  if ( count_ % pedestaloffsetPrescaleFactor_ == 0 ) status = true;
110  }
111  }
112 
113  if ( dcchItr->getRunType() == EcalDCCHeaderBlock::COSMIC ||
114  dcchItr->getRunType() == EcalDCCHeaderBlock::COSMICS_GLOBAL ||
115  dcchItr->getRunType() == EcalDCCHeaderBlock::COSMICS_LOCAL ) {
116  if ( cosmicPrescaleFactor_ ) {
117  if ( count_ % cosmicPrescaleFactor_ == 0 ) status = true;
118  }
119  }
120 
121  if ( dcchItr->getRunType() == EcalDCCHeaderBlock::MTCC ||
122  dcchItr->getRunType() == EcalDCCHeaderBlock::PHYSICS_GLOBAL ||
123  dcchItr->getRunType() == EcalDCCHeaderBlock::PHYSICS_LOCAL ) {
124  if ( physicsPrescaleFactor_ ) {
125  if ( count_ % physicsPrescaleFactor_ == 0 ) status = true;
126  }
127  }
128 
129  if ( dcchItr->getRunType() == EcalDCCHeaderBlock::COSMIC ||
130  dcchItr->getRunType() == EcalDCCHeaderBlock::MTCC ||
131  dcchItr->getRunType() == EcalDCCHeaderBlock::COSMICS_GLOBAL ||
132  dcchItr->getRunType() == EcalDCCHeaderBlock::PHYSICS_GLOBAL ||
133  dcchItr->getRunType() == EcalDCCHeaderBlock::COSMICS_LOCAL ||
134  dcchItr->getRunType() == EcalDCCHeaderBlock::PHYSICS_LOCAL ) {
135  if ( clusterPrescaleFactor_ ) {
136  if ( count_ % clusterPrescaleFactor_ == 0 ) status = true;
137  }
138  }
139 
140  }
141 
142  } else {
143 
144  edm::LogWarning("EcalMonitorPrescaler") << EcalRawDataCollection_ << " not available";
145 
146  }
147 
148  return status;
149 
150 }
std::vector< T >::const_iterator const_iterator
edm::InputTag EcalRawDataCollection_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
tuple status
Definition: ntuplemaker.py:245

Member Data Documentation

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().

edm::InputTag EcalMonitorPrescaler::EcalRawDataCollection_
private

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().