CMS 3D CMS Logo

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

#include <EcalBarrelMonitorModule.h>

Inheritance diagram for EcalBarrelMonitorModule:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 EcalBarrelMonitorModule (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~EcalBarrelMonitorModule ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze. More...
 
void beginJob (void)
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void cleanup (void)
 Cleanup. More...
 
void endJob (void)
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun. More...
 
void reset (void)
 Reset. More...
 
void setup (void)
 Setup. More...
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Attributes

bool debug_
 
DQMStoredqmStore_
 
edm::InputTag EBDigiCollection_
 
edm::InputTag EcalRawDataCollection_
 
edm::InputTag EcalRecHitCollection_
 
edm::InputTag EcalTrigPrimDigiCollection_
 
bool enableCleanup_
 
bool enableEventDisplay_
 
int evtNumber_
 
int evtType_
 
bool fixedRunNumber_
 
bool fixedRunType_
 
int ievt_
 
bool init_
 
bool isPhysics_
 
MonitorElementmeEBDCC_
 
MonitorElementmeEBdigis_ [2]
 
MonitorElementmeEBhits_ [2]
 
MonitorElementmeEBtpdigis_ [2]
 
MonitorElementmeEvent_ [36]
 
MonitorElementmeEvt_
 
MonitorElementmeEvtType_
 
bool mergeRuns_
 
MonitorElementmeRun_
 
MonitorElementmeRunType_
 
MonitorElementmeStatus_
 
std::string prefixME_
 
int runNumber_
 
int runType_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 21 of file EcalBarrelMonitorModule.h.

Constructor & Destructor Documentation

EcalBarrelMonitorModule::EcalBarrelMonitorModule ( const edm::ParameterSet ps)

Constructor.

Definition at line 32 of file EcalBarrelMonitorModule.cc.

References gather_cfg::cout, debug_, EBDigiCollection_, EcalRawDataCollection_, EcalRecHitCollection_, EcalTrigPrimDigiCollection_, enableCleanup_, enableEventDisplay_, evtNumber_, evtType_, fixedRunNumber_, fixedRunType_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, init_, meEBDCC_, meEBdigis_, meEBhits_, meEBtpdigis_, meEvent_, meEvt_, meEvtType_, mergeRuns_, meRun_, meRunType_, meStatus_, prefixME_, runNumber_, runType_, AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

32  {
33 
34  // verbose switch
35  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
36 
37  if ( verbose_ ) {
38  std::cout << std::endl;
39  std::cout << " *** Ecal Barrel Generic Monitor ***" << std::endl;
40  std::cout << std::endl;
41  }
42 
43  init_ = false;
44 
45  EcalRawDataCollection_ = ps.getParameter<edm::InputTag>("EcalRawDataCollection");
46  EBDigiCollection_ = ps.getParameter<edm::InputTag>("EBDigiCollection");
47  EcalRecHitCollection_ = ps.getParameter<edm::InputTag>("EcalRecHitCollection");
48  EcalTrigPrimDigiCollection_ = ps.getParameter<edm::InputTag>("EcalTrigPrimDigiCollection");
49 
50  // this should come from the event header
51  runNumber_ = ps.getUntrackedParameter<int>("runNumber", 0);
52 
53  fixedRunNumber_ = false;
54  if ( runNumber_ != 0 ) fixedRunNumber_ = true;
55 
56  if ( fixedRunNumber_ ) {
57  if ( verbose_ ) {
58  std::cout << " fixed Run Number = " << runNumber_ << std::endl;
59  }
60  }
61 
62  // this should come from the event header
63  evtNumber_ = 0;
64 
65  // this should come from the EcalBarrel event header
66  runType_ = ps.getUntrackedParameter<int>("runType", -1);
68 
69  fixedRunType_ = false;
70  if ( runType_ != -1 ) fixedRunType_ = true;
71 
72  if ( fixedRunType_) {
73  if ( verbose_ ) {
74  std::cout << " fixed Run Type = " << runType_ << std::endl;
75  }
76  }
77 
78  // debug switch
79  debug_ = ps.getUntrackedParameter<bool>("debug", false);
80 
81  if ( debug_ ) {
82  if ( verbose_ ) {
83  std::cout << " debug switch is ON" << std::endl;
84  }
85  } else {
86  if ( verbose_ ) {
87  std::cout << " debug switch is OFF" << std::endl;
88  }
89  }
90 
91  // prefixME path
92  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
93 
94  // enableCleanup switch
95  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
96 
97  // mergeRuns switch
98  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
99 
100  if ( enableCleanup_ ) {
101  if ( verbose_ ) {
102  std::cout << " enableCleanup switch is ON" << std::endl;
103  }
104  } else {
105  if ( verbose_ ) {
106  std::cout << " enableCleanup switch is OFF" << std::endl;
107  }
108  }
109 
110  // EventDisplay switch
111  enableEventDisplay_ = ps.getUntrackedParameter<bool>("enableEventDisplay", false);
112 
113  meStatus_ = 0;
114  meRun_ = 0;
115  meEvt_ = 0;
116  meRunType_ = 0;
117  meEvtType_ = 0;
118 
119  meEBDCC_ = 0;
120 
121  for (int i = 0; i < 2; i++) {
122  meEBdigis_[i] = 0;
123  meEBhits_[i] = 0;
124  meEBtpdigis_[i] = 0;
125  }
126 
127  for (int i = 0; i < 36; i++) {
128  meEvent_[i] = 0;
129  }
130 
131 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * meEBtpdigis_[2]
tuple cout
Definition: gather_cfg.py:121
EcalBarrelMonitorModule::~EcalBarrelMonitorModule ( )
virtual

Destructor.

Definition at line 133 of file EcalBarrelMonitorModule.cc.

133  {
134 
135 }

Member Function Documentation

void EcalBarrelMonitorModule::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Analyze.

Implements edm::EDAnalyzer.

Definition at line 372 of file EcalBarrelMonitorModule.cc.

References EcalDCCHeaderBlock::COSMIC, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, EBDigiCollection_, EcalBarrel, EcalRawDataCollection_, EcalRecHitCollection_, EcalTrigPrimDigiCollection_, enableEventDisplay_, edm::EventID::event(), evtNumber_, evtType_, MonitorElement::Fill(), fixedRunNumber_, fixedRunType_, edm::Event::getByLabel(), i, EBDetId::ic(), edm::EventBase::id(), ievt_, init_, Numbers::initGeometry(), ecalpyutils::ism(), Numbers::iSM(), isPhysics_, LogDebug, meEBDCC_, meEBdigis_, meEBhits_, meEBtpdigis_, meEvent_, meEvt_, meEvtType_, meRun_, meRunType_, meStatus_, EcalDCCHeaderBlock::MTCC, EcalDCCHeaderBlock::PHYSICS_GLOBAL, EcalDCCHeaderBlock::PHYSICS_LOCAL, edm::EventID::run(), runNumber_, runType_, setup(), Numbers::subDet(), and verbose_.

372  {
373 
375 
376  if ( ! init_ ) this->setup();
377 
378  ievt_++;
379 
380  LogDebug("EcalBarrelMonitorModule") << "processing event " << ievt_;
381 
382  if ( ! fixedRunNumber_ ) runNumber_ = e.id().run();
383 
384  evtNumber_ = e.id().event();
385 
387 
388  if ( e.getByLabel(EcalRawDataCollection_, dcchs) ) {
389 
390  if ( dcchs->size() == 0 ) {
391  LogDebug("EcalBarrelMonitorModule") << EcalRawDataCollection_ << " is empty";
392  return;
393  }
394 
395  int nebc = 0;
396 
397  for ( EcalRawDataCollection::const_iterator dcchItr = dcchs->begin(); dcchItr != dcchs->end(); ++dcchItr ) {
398 
399  if ( Numbers::subDet( *dcchItr ) != EcalBarrel ) continue;
400 
401  nebc++;
402 
403  }
404 
405  for ( EcalRawDataCollection::const_iterator dcchItr = dcchs->begin(); dcchItr != dcchs->end(); ++dcchItr ) {
406 
407  if ( Numbers::subDet( *dcchItr ) != EcalBarrel ) continue;
408 
409  if ( meEBDCC_ ) meEBDCC_->Fill(Numbers::iSM( *dcchItr, EcalBarrel )+0.5);
410 
411  if ( ! fixedRunNumber_ ) {
412  runNumber_ = dcchItr->getRunNumber();
413  }
414 
415  evtNumber_ = dcchItr->getLV1();
416 
417  if ( ! fixedRunType_ ) {
418  runType_ = dcchItr->getRunType();
419  evtType_ = runType_;
420  }
421 
422  if ( evtType_ < 0 || evtType_ > 22 ) evtType_ = -1;
423  if ( meEvtType_ ) meEvtType_->Fill(evtType_+0.5, 1./nebc);
424 
425  }
426 
427  LogDebug("EcalBarrelMonitorModule") << "event: " << ievt_ << " DCC headers collection size: " << nebc;
428 
429  } else {
430 
431  if ( evtType_ < 0 || evtType_ > 22 ) evtType_ = -1;
432  if ( meEvtType_ ) meEvtType_->Fill(evtType_+0.5, 1./36.);
433 
434  edm::LogWarning("EcalBarrelMonitorModule") << EcalRawDataCollection_ << " not available";
435 
436  }
437 
438  isPhysics_ = false;
445 
447 
448  if ( ievt_ == 1 ) {
449  LogDebug("EcalBarrelMonitorModule") << "processing run " << runNumber_;
450  // begin-of-run
451  if ( meStatus_ ) meStatus_->Fill(0);
452  } else {
453  // running
454  if ( meStatus_ ) meStatus_->Fill(1);
455  }
456 
457  if ( meRun_ ) meRun_->Fill(runNumber_);
458  if ( meEvt_ ) meEvt_->Fill(evtNumber_);
459 
461 
462  if ( e.getByLabel(EBDigiCollection_, digis) ) {
463 
464  int nebd = digis->size();
465  LogDebug("EcalBarrelMonitorModule") << "event " << ievt_ << " digi collection size " << nebd;
466 
467  int counter[36] = { 0 };
468 
469  if ( meEBdigis_[0] ) {
470  if ( isPhysics_ ) meEBdigis_[0]->Fill(float(nebd));
471  }
472 
473  for ( EBDigiCollection::const_iterator digiItr = digis->begin(); digiItr != digis->end(); ++digiItr ) {
474 
475  EBDetId id = digiItr->id();
476 
477  int ism = Numbers::iSM( id );
478 
479  counter[ism-1]++;
480 
481  }
482 
483  for (int i = 0; i < 36; i++) {
484 
485  if ( meEBdigis_[1] ) {
486  if ( isPhysics_ ) meEBdigis_[1]->Fill(i+1+0.5, counter[i]);
487  }
488 
489  }
490 
491  } else {
492 
493  edm::LogWarning("EcalBarrelMonitorModule") << EBDigiCollection_ << " not available";
494 
495  }
496 
498 
499  if ( e.getByLabel(EcalRecHitCollection_, hits) ) {
500 
501  int nebh = hits->size();
502  LogDebug("EcalBarrelMonitorModule") << "event " << ievt_ << " hits collection size " << nebh;
503 
504  if ( meEBhits_[0] ) {
505  if ( isPhysics_ ) meEBhits_[0]->Fill(float(nebh));
506  }
507 
508  int counter[36] = { 0 };
509 
510  for ( EcalRecHitCollection::const_iterator hitItr = hits->begin(); hitItr != hits->end(); ++hitItr ) {
511 
512  EBDetId id = hitItr->id();
513 
514  int ic = id.ic();
515  int ie = (ic-1)/20 + 1;
516  int ip = (ic-1)%20 + 1;
517 
518  int ism = Numbers::iSM( id );
519 
520  counter[ism-1]++;
521 
522  float xie = ie - 0.5;
523  float xip = ip - 0.5;
524 
525  float xval = hitItr->energy();
526 
527  if ( enableEventDisplay_ ) {
528 
529  if ( xval >= 10 ) {
530  if ( meEvent_[ism-1] ) meEvent_[ism-1]->Fill(xie, xip, xval);
531  }
532 
533  }
534 
535  }
536 
537  for (int i = 0; i < 36; i++) {
538 
539  if ( meEBhits_[1] ) {
540  if ( isPhysics_ ) meEBhits_[1]->Fill(i+1+0.5, counter[i]);
541  }
542 
543  }
544 
545  } else {
546 
547  edm::LogWarning("EcalBarrelMonitorModule") << EcalRecHitCollection_ << " not available";
548 
549  }
550 
552 
553  if ( e.getByLabel(EcalTrigPrimDigiCollection_, tpdigis) ) {
554 
555  int nebtpd = 0;
556  int counter[36] = { 0 };
557 
558  for ( EcalTrigPrimDigiCollection::const_iterator tpdigiItr = tpdigis->begin(); tpdigiItr != tpdigis->end(); ++tpdigiItr ) {
559 
560  EcalTrigTowerDetId idt = tpdigiItr->id();
561 
562  if ( Numbers::subDet( idt ) != EcalBarrel ) continue;
563 
564  int ismt = Numbers::iSM( idt );
565 
566  nebtpd++;
567  counter[ismt-1]++;
568 
569  }
570 
571  LogDebug("EcalBarrelMonitorModule") << "event " << ievt_ << " TP digi collection size " << nebtpd;
572  if ( meEBtpdigis_[0] ) {
573  if ( isPhysics_ ) meEBtpdigis_[0]->Fill(float(nebtpd));
574  }
575 
576  for (int i = 0; i < 36; i++) {
577 
578  if ( meEBtpdigis_[1] ) {
579  if ( isPhysics_ ) meEBtpdigis_[1]->Fill(i+1+0.5, counter[i]);
580  }
581 
582  }
583 
584  } else {
585 
586  edm::LogWarning("EcalBarrelMonitorModule") << EcalTrigPrimDigiCollection_ << " not available";
587 
588  }
589 
590 }
#define LogDebug(id)
RunNumber_t run() const
Definition: EventID.h:42
EventNumber_t event() const
Definition: EventID.h:44
int i
Definition: DBlmapReader.cc:9
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
std::vector< T >::const_iterator const_iterator
void Fill(long long x)
MonitorElement * meEBtpdigis_[2]
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
int ic() const
get ECAL/crystal number inside SM
Definition: EBDetId.cc:46
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
Definition: Numbers.cc:50
edm::EventID id() const
Definition: EventBase.h:56
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:246
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:145
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
void EcalBarrelMonitorModule::beginJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 137 of file EcalBarrelMonitorModule.cc.

References gather_cfg::cout, debug_, dqmStore_, enableEventDisplay_, ievt_, cppFunctionSkipper::operator, prefixME_, DQMStore::rmdir(), and DQMStore::setCurrentFolder().

137  {
138 
139  if ( debug_ ) std::cout << "EcalBarrelMonitorModule: beginJob" << std::endl;
140 
141  ievt_ = 0;
142 
144 
145  if ( dqmStore_ ) {
146  dqmStore_->setCurrentFolder(prefixME_ + "/EcalInfo");
147  dqmStore_->rmdir(prefixME_ + "/EcalInfo");
148  if ( enableEventDisplay_ ) {
149  dqmStore_->setCurrentFolder(prefixME_ + "/EcalEvent");
150  dqmStore_->rmdir(prefixME_ + "/EcalEvent");
151  }
152  }
153 
154 }
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2535
tuple cout
Definition: gather_cfg.py:121
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void EcalBarrelMonitorModule::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 156 of file EcalBarrelMonitorModule.cc.

References gather_cfg::cout, debug_, mergeRuns_, and reset().

156  {
157 
158  if ( debug_ ) std::cout << "EcalBarrelMonitorModule: beginRun" << std::endl;
159 
160  if ( ! mergeRuns_ ) this->reset();
161 
162 }
tuple cout
Definition: gather_cfg.py:121
void EcalBarrelMonitorModule::cleanup ( void  )
protected

Cleanup.

Definition at line 294 of file EcalBarrelMonitorModule.cc.

References dqmStore_, enableCleanup_, enableEventDisplay_, MonitorElement::getName(), i, init_, meEBDCC_, meEBdigis_, meEBhits_, meEBtpdigis_, meEvent_, meEvt_, meEvtType_, meRun_, meRunType_, meStatus_, prefixME_, DQMStore::removeElement(), and DQMStore::setCurrentFolder().

Referenced by endJob().

294  {
295 
296  if ( ! enableCleanup_ ) return;
297 
298  if ( dqmStore_ ) {
299 
300  dqmStore_->setCurrentFolder(prefixME_ + "/EcalInfo");
301 
303  meStatus_ = 0;
304 
306  meRun_ = 0;
307 
309  meEvt_ = 0;
310 
312  meRunType_ = 0;
313 
315  meEvtType_ = 0;
316 
318  meEBDCC_ = 0;
319 
320  for (int i = 0; i < 2; i++) {
321 
322  if ( meEBdigis_[i] ) dqmStore_->removeElement( meEBdigis_[i]->getName() );
323  meEBdigis_[i] = 0;
324 
325  if ( meEBhits_[i] ) dqmStore_->removeElement( meEBhits_[i]->getName() );
326  meEBhits_[i] = 0;
327 
328  if ( meEBtpdigis_[i] ) dqmStore_->removeElement( meEBtpdigis_[i]->getName() );
329  meEBtpdigis_[i] = 0;
330 
331  }
332 
333  if ( enableEventDisplay_ ) {
334 
335  dqmStore_->setCurrentFolder(prefixME_ + "/EcalEvent");
336 
337  for (int i = 0; i < 36; i++) {
338 
339  if ( meEvent_[i] ) dqmStore_->removeElement( meEvent_[i]->getName() );
340  meEvent_[i] = 0;
341 
342  }
343 
344  }
345 
346  }
347 
348  init_ = false;
349 
350 }
const std::string & getName(void) const
get name of ME
int i
Definition: DBlmapReader.cc:9
void removeElement(const std::string &name)
Definition: DQMStore.cc:2577
MonitorElement * meEBtpdigis_[2]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void EcalBarrelMonitorModule::endJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 352 of file EcalBarrelMonitorModule.cc.

References cleanup(), gather_cfg::cout, debug_, dqmStore_, evtNumber_, MonitorElement::Fill(), DQMStore::get(), ievt_, init_, meEvt_, meRun_, meStatus_, prefixME_, and runNumber_.

352  {
353 
354  if ( debug_ ) std::cout << "EcalBarrelMonitorModule: endJob, ievt = " << ievt_ << std::endl;
355 
356  if ( dqmStore_ ) {
357  meStatus_ = dqmStore_->get(prefixME_ + "/EcalInfo/STATUS");
358  meRun_ = dqmStore_->get(prefixME_ + "/EcalInfo/RUN");
359  meEvt_ = dqmStore_->get(prefixME_ + "/EcalInfo/EVT");
360  }
361 
362  // end-of-run
363  if ( meStatus_ ) meStatus_->Fill(2);
364 
365  if ( meRun_ ) meRun_->Fill(runNumber_);
366  if ( meEvt_ ) meEvt_->Fill(evtNumber_);
367 
368  if ( init_ ) this->cleanup();
369 
370 }
void Fill(long long x)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1473
tuple cout
Definition: gather_cfg.py:121
void EcalBarrelMonitorModule::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 164 of file EcalBarrelMonitorModule.cc.

References gather_cfg::cout, debug_, evtNumber_, MonitorElement::Fill(), meEvt_, meRun_, meStatus_, and runNumber_.

164  {
165 
166  if ( debug_ ) std::cout << "EcalBarrelMonitorModule: endRun" << std::endl;
167 
168  // end-of-run
169  if ( meStatus_ ) meStatus_->Fill(2);
170 
171  if ( meRun_ ) meRun_->Fill(runNumber_);
172  if ( meEvt_ ) meEvt_->Fill(evtNumber_);
173 
174 }
void Fill(long long x)
tuple cout
Definition: gather_cfg.py:121
void EcalBarrelMonitorModule::reset ( void  )
protected

Reset.

Definition at line 176 of file EcalBarrelMonitorModule.cc.

References enableEventDisplay_, i, meEBDCC_, meEBdigis_, meEBhits_, meEBtpdigis_, meEvent_, meEvtType_, and MonitorElement::Reset().

Referenced by beginRun().

176  {
177 
178  if ( meEvtType_ ) meEvtType_->Reset();
179 
180  if ( meEBDCC_ ) meEBDCC_->Reset();
181 
182  for (int i = 0; i < 2; i++) {
183  if ( meEBdigis_[i] ) meEBdigis_[i]->Reset();
184 
185  if ( meEBhits_[i] ) meEBdigis_[i]->Reset();
186 
187  if ( meEBtpdigis_[i] ) meEBtpdigis_[i]->Reset();
188  }
189 
190  if ( enableEventDisplay_ ) {
191  for (int i = 0; i < 18; i++) {
192  if ( meEvent_[i] ) meEvent_[i]->Reset();
193  }
194  }
195 
196 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * meEBtpdigis_[2]
void Reset(void)
reset ME (ie. contents, errors, etc)
void EcalBarrelMonitorModule::setup ( void  )
protected

Setup.

Definition at line 198 of file EcalBarrelMonitorModule.cc.

References EcalDCCHeaderBlock::BEAMH2, EcalDCCHeaderBlock::BEAMH4, DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookInt(), DQMStore::bookProfile(), EcalDCCHeaderBlock::COSMIC, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, dqmStore_, enableEventDisplay_, MonitorElement::Fill(), EcalDCCHeaderBlock::HALO_GLOBAL, EcalDCCHeaderBlock::HALO_LOCAL, i, init_, EcalDCCHeaderBlock::LASER_DELAY_SCAN, EcalDCCHeaderBlock::LASER_GAP, EcalDCCHeaderBlock::LASER_POWER_SCAN, EcalDCCHeaderBlock::LASER_STD, EcalDCCHeaderBlock::LED_GAP, EcalDCCHeaderBlock::LED_STD, meEBDCC_, meEBdigis_, meEBhits_, meEBtpdigis_, meEvent_, meEvt_, meEvtType_, meRun_, meRunType_, meStatus_, EcalDCCHeaderBlock::MTCC, mergeVDriftHistosByStation::name, EcalDCCHeaderBlock::PEDESTAL_25NS_SCAN, EcalDCCHeaderBlock::PEDESTAL_GAP, EcalDCCHeaderBlock::PEDESTAL_OFFSET_SCAN, EcalDCCHeaderBlock::PEDESTAL_STD, EcalDCCHeaderBlock::PHYSICS_GLOBAL, EcalDCCHeaderBlock::PHYSICS_LOCAL, prefixME_, Numbers::sEB(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), MonitorElement::setResetMe(), AlCaHLTBitMon_QueryRunRegistry::string, DQMStore::tag(), EcalDCCHeaderBlock::TESTPULSE_GAP, EcalDCCHeaderBlock::TESTPULSE_MGPA, and EcalDCCHeaderBlock::TESTPULSE_SCAN_MEM.

Referenced by analyze().

198  {
199 
200  init_ = true;
201 
202  if ( dqmStore_ ) {
203  dqmStore_->setCurrentFolder(prefixME_ + "/EcalInfo");
204 
205  meStatus_ = dqmStore_->bookInt("STATUS");
206 
207  meRun_ = dqmStore_->bookInt("RUN");
208  meEvt_ = dqmStore_->bookInt("EVT");
209 
210  meRunType_ = dqmStore_->bookInt("RUNTYPE");
211  meEvtType_ = dqmStore_->book1D("EVTTYPE", "EVTTYPE", 31, -1., 30.);
212  meEvtType_->setAxisTitle("number of events", 2);
213  meEvtType_->setBinLabel(1, "UNKNOWN", 1);
224  meEvtType_->setBinLabel(2+EcalDCCHeaderBlock::PEDESTAL_OFFSET_SCAN, "PEDESTAL_OFFSET_SCAN", 1);
237  }
238 
239  // unknown
240  if ( meStatus_ ) meStatus_->Fill(-1);
241 
242  if ( meRun_ ) meRun_->Fill(-1);
243  if ( meEvt_ ) meEvt_->Fill(-1);
244 
245  if ( meRunType_ ) meRunType_->Fill(-1);
246 
248 
249  if ( dqmStore_ ) {
250  dqmStore_->setCurrentFolder(prefixME_ + "/EcalInfo");
251 
252  meEBDCC_ = dqmStore_->book1D("EBMM DCC", "EBMM DCC", 36, 1, 37.);
253  for (int i = 0; i < 36; i++) {
254  meEBDCC_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
255  }
256 
257  meEBdigis_[0] = dqmStore_->book1D("EBMM digi number", "EBMM digi number", 100, 0., 3000.);
258 
259  meEBdigis_[1] = dqmStore_->bookProfile("EBMM digi number profile", "EBMM digi number profile", 36, 1, 37., 1700, 0., 1701., "s");
260  for (int i = 0; i < 36; i++) {
261  meEBdigis_[1]->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
262  }
263 
264  meEBhits_[0] = dqmStore_->book1D("EBMM hit number", "EBMM hit number", 100, 0., 3000.);
265 
266  meEBhits_[1] = dqmStore_->bookProfile("EBMM hit number profile", "EBMM hit number profile", 36, 1, 37., 1700, 0., 1701., "s");
267  for (int i = 0; i < 36; i++) {
268  meEBhits_[1]->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
269  }
270 
271  meEBtpdigis_[0] = dqmStore_->book1D("EBMM TP digi number", "EBMM TP digi number", 100, 0., 2449.);
272 
273  meEBtpdigis_[1] = dqmStore_->bookProfile("EBMM TP digi number profile", "EBMM TP digi number profile", 36, 1, 37., 68, 0., 69., "s");
274  for (int i = 0; i < 36; i++) {
275  meEBtpdigis_[1]->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
276  }
277 
278  if ( enableEventDisplay_ ) {
279  dqmStore_->setCurrentFolder(prefixME_ + "/EcalEvent");
280  for (int i = 0; i < 36; i++) {
281  name = "EBMM event " + Numbers::sEB(i+1);
282  meEvent_[i] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
283  meEvent_[i]->setAxisTitle("ieta", 1);
284  meEvent_[i]->setAxisTitle("iphi", 2);
285  dqmStore_->tag(meEvent_[i], i+1);
286  if ( meEvent_[i] ) meEvent_[i]->setResetMe(true);
287  }
288  }
289 
290  }
291 
292 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
static std::string sEB(const unsigned ism)
Definition: Numbers.cc:94
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void Fill(long long x)
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1359
MonitorElement * meEBtpdigis_[2]
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1036
void setResetMe(bool)
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:629
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:850
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434

Member Data Documentation

bool EcalBarrelMonitorModule::debug_
private

Definition at line 79 of file EcalBarrelMonitorModule.h.

Referenced by beginJob(), beginRun(), EcalBarrelMonitorModule(), endJob(), and endRun().

DQMStore* EcalBarrelMonitorModule::dqmStore_
private

Definition at line 83 of file EcalBarrelMonitorModule.h.

Referenced by beginJob(), cleanup(), endJob(), and setup().

edm::InputTag EcalBarrelMonitorModule::EBDigiCollection_
private

Definition at line 74 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), and EcalBarrelMonitorModule().

edm::InputTag EcalBarrelMonitorModule::EcalRawDataCollection_
private

Definition at line 73 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), and EcalBarrelMonitorModule().

edm::InputTag EcalBarrelMonitorModule::EcalRecHitCollection_
private

Definition at line 75 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), and EcalBarrelMonitorModule().

edm::InputTag EcalBarrelMonitorModule::EcalTrigPrimDigiCollection_
private

Definition at line 76 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), and EcalBarrelMonitorModule().

bool EcalBarrelMonitorModule::enableCleanup_
private

Definition at line 87 of file EcalBarrelMonitorModule.h.

Referenced by cleanup(), and EcalBarrelMonitorModule().

bool EcalBarrelMonitorModule::enableEventDisplay_
private
int EcalBarrelMonitorModule::evtNumber_
private

Definition at line 60 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), EcalBarrelMonitorModule(), endJob(), and endRun().

int EcalBarrelMonitorModule::evtType_
private

Definition at line 63 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), and EcalBarrelMonitorModule().

bool EcalBarrelMonitorModule::fixedRunNumber_
private

Definition at line 65 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), and EcalBarrelMonitorModule().

bool EcalBarrelMonitorModule::fixedRunType_
private

Definition at line 67 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), and EcalBarrelMonitorModule().

int EcalBarrelMonitorModule::ievt_
private

Definition at line 71 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), beginJob(), and endJob().

bool EcalBarrelMonitorModule::init_
private

Definition at line 107 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), cleanup(), EcalBarrelMonitorModule(), endJob(), and setup().

bool EcalBarrelMonitorModule::isPhysics_
private

Definition at line 69 of file EcalBarrelMonitorModule.h.

Referenced by analyze().

MonitorElement* EcalBarrelMonitorModule::meEBDCC_
private

Definition at line 99 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), cleanup(), EcalBarrelMonitorModule(), reset(), and setup().

MonitorElement* EcalBarrelMonitorModule::meEBdigis_[2]
private

Definition at line 101 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), cleanup(), EcalBarrelMonitorModule(), reset(), and setup().

MonitorElement* EcalBarrelMonitorModule::meEBhits_[2]
private

Definition at line 102 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), cleanup(), EcalBarrelMonitorModule(), reset(), and setup().

MonitorElement* EcalBarrelMonitorModule::meEBtpdigis_[2]
private

Definition at line 103 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), cleanup(), EcalBarrelMonitorModule(), reset(), and setup().

MonitorElement* EcalBarrelMonitorModule::meEvent_[36]
private

Definition at line 105 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), cleanup(), EcalBarrelMonitorModule(), reset(), and setup().

MonitorElement* EcalBarrelMonitorModule::meEvt_
private
MonitorElement* EcalBarrelMonitorModule::meEvtType_
private

Definition at line 97 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), cleanup(), EcalBarrelMonitorModule(), reset(), and setup().

bool EcalBarrelMonitorModule::mergeRuns_
private

Definition at line 89 of file EcalBarrelMonitorModule.h.

Referenced by beginRun(), and EcalBarrelMonitorModule().

MonitorElement* EcalBarrelMonitorModule::meRun_
private
MonitorElement* EcalBarrelMonitorModule::meRunType_
private

Definition at line 96 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), cleanup(), EcalBarrelMonitorModule(), and setup().

MonitorElement* EcalBarrelMonitorModule::meStatus_
private
std::string EcalBarrelMonitorModule::prefixME_
private

Definition at line 85 of file EcalBarrelMonitorModule.h.

Referenced by beginJob(), cleanup(), EcalBarrelMonitorModule(), endJob(), and setup().

int EcalBarrelMonitorModule::runNumber_
private

Definition at line 59 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), EcalBarrelMonitorModule(), endJob(), and endRun().

int EcalBarrelMonitorModule::runType_
private

Definition at line 62 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), and EcalBarrelMonitorModule().

bool EcalBarrelMonitorModule::verbose_
private

Definition at line 78 of file EcalBarrelMonitorModule.h.

Referenced by analyze(), and EcalBarrelMonitorModule().