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 | Static Private Attributes
EBIntegrityTask Class Reference

#include <EBIntegrityTask.h>

Inheritance diagram for EBIntegrityTask:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 EBIntegrityTask (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~EBIntegrityTask ()
 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)
 BeginJob. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup)
 BeginLuminosityBlock. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void cleanup (void)
 Cleanup. More...
 
void endJob (void)
 EndJob. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup)
 EndLuminosityBlock. More...
 
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

DQMStoredqmStore_
 
edm::InputTag EBDetIdCollection0_
 
edm::InputTag EBDetIdCollection1_
 
edm::InputTag EBDetIdCollection2_
 
edm::InputTag EBDetIdCollection3_
 
edm::InputTag EBDetIdCollection4_
 
edm::InputTag EcalElectronicsIdCollection1_
 
edm::InputTag EcalElectronicsIdCollection2_
 
edm::InputTag EcalElectronicsIdCollection3_
 
edm::InputTag EcalElectronicsIdCollection4_
 
edm::InputTag EcalElectronicsIdCollection5_
 
edm::InputTag EcalElectronicsIdCollection6_
 
bool enableCleanup_
 
int ievt_
 
bool init_
 
MonitorElementmeIntegrityChId [36]
 
MonitorElementmeIntegrityDCCSize
 
MonitorElementmeIntegrityErrorsByLumi
 
MonitorElementmeIntegrityGain [36]
 
MonitorElementmeIntegrityGainSwitch [36]
 
MonitorElementmeIntegrityMemChId [36]
 
MonitorElementmeIntegrityMemGain [36]
 
MonitorElementmeIntegrityMemTTBlockSize [36]
 
MonitorElementmeIntegrityMemTTId [36]
 
MonitorElementmeIntegrityTTBlockSize [36]
 
MonitorElementmeIntegrityTTId [36]
 
bool mergeRuns_
 
std::string prefixME_
 
std::string subfolder_
 

Static Private Attributes

static const int chMemAbscissa [25]
 
static const int chMemOrdinate [25]
 

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 EBIntegrityTask.h.

Constructor & Destructor Documentation

EBIntegrityTask::EBIntegrityTask ( const edm::ParameterSet ps)

Constructor.

Definition at line 28 of file EBIntegrityTask.cc.

References dqmStore_, EBDetIdCollection0_, EBDetIdCollection1_, EBDetIdCollection2_, EBDetIdCollection3_, EcalElectronicsIdCollection1_, EcalElectronicsIdCollection2_, EcalElectronicsIdCollection3_, EcalElectronicsIdCollection4_, EcalElectronicsIdCollection5_, EcalElectronicsIdCollection6_, enableCleanup_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, init_, meIntegrityChId, meIntegrityDCCSize, meIntegrityErrorsByLumi, meIntegrityGain, meIntegrityGainSwitch, meIntegrityMemChId, meIntegrityMemGain, meIntegrityMemTTBlockSize, meIntegrityMemTTId, meIntegrityTTBlockSize, meIntegrityTTId, mergeRuns_, cppFunctionSkipper::operator, prefixME_, AlCaHLTBitMon_QueryRunRegistry::string, and subfolder_.

28  {
29 
30  init_ = false;
31 
33 
34  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
35 
36  subfolder_ = ps.getUntrackedParameter<std::string>("subfolder", "");
37 
38  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
39 
40  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
41 
42  EBDetIdCollection0_ = ps.getParameter<edm::InputTag>("EBDetIdCollection0");
43  EBDetIdCollection1_ = ps.getParameter<edm::InputTag>("EBDetIdCollection1");
44  EBDetIdCollection2_ = ps.getParameter<edm::InputTag>("EBDetIdCollection2");
45  EBDetIdCollection3_ = ps.getParameter<edm::InputTag>("EBDetIdCollection3");
46  EcalElectronicsIdCollection1_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection1");
47  EcalElectronicsIdCollection2_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection2");
48  EcalElectronicsIdCollection3_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection3");
49  EcalElectronicsIdCollection4_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection4");
50  EcalElectronicsIdCollection5_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection5");
51  EcalElectronicsIdCollection6_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection6");
52 
54  for (int i = 0; i < 36; i++) {
55  meIntegrityGain[i] = 0;
56  meIntegrityChId[i] = 0;
58  meIntegrityTTId[i] = 0;
60  meIntegrityMemChId[i] = 0;
61  meIntegrityMemGain[i] = 0;
62  meIntegrityMemTTId[i] = 0;
64  }
66 
67 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
std::string subfolder_
MonitorElement * meIntegrityTTBlockSize[36]
MonitorElement * meIntegrityMemTTBlockSize[36]
edm::InputTag EBDetIdCollection2_
edm::InputTag EBDetIdCollection3_
MonitorElement * meIntegrityGainSwitch[36]
MonitorElement * meIntegrityMemGain[36]
MonitorElement * meIntegrityGain[36]
std::string prefixME_
MonitorElement * meIntegrityErrorsByLumi
MonitorElement * meIntegrityMemTTId[36]
DQMStore * dqmStore_
edm::InputTag EBDetIdCollection1_
MonitorElement * meIntegrityMemChId[36]
edm::InputTag EcalElectronicsIdCollection6_
edm::InputTag EcalElectronicsIdCollection4_
MonitorElement * meIntegrityTTId[36]
edm::InputTag EBDetIdCollection0_
edm::InputTag EcalElectronicsIdCollection5_
edm::InputTag EcalElectronicsIdCollection3_
edm::InputTag EcalElectronicsIdCollection1_
MonitorElement * meIntegrityDCCSize
MonitorElement * meIntegrityChId[36]
edm::InputTag EcalElectronicsIdCollection2_
EBIntegrityTask::~EBIntegrityTask ( )
virtual

Destructor.

Definition at line 70 of file EBIntegrityTask.cc.

70  {
71 
72 }

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 343 of file EBIntegrityTask.cc.

References chMemAbscissa, chMemOrdinate, EBDetIdCollection0_, EBDetIdCollection1_, EBDetIdCollection2_, EBDetIdCollection3_, EcalBarrel, EcalElectronicsIdCollection1_, EcalElectronicsIdCollection2_, EcalElectronicsIdCollection3_, EcalElectronicsIdCollection4_, EcalElectronicsIdCollection5_, EcalElectronicsIdCollection6_, MonitorElement::Fill(), edm::Event::getByLabel(), EBDetId::ic(), ievt_, init_, ecalpyutils::ism(), Numbers::iSM(), meIntegrityChId, meIntegrityDCCSize, meIntegrityErrorsByLumi, meIntegrityGain, meIntegrityGainSwitch, meIntegrityMemChId, meIntegrityMemGain, meIntegrityMemTTBlockSize, meIntegrityMemTTId, meIntegrityTTBlockSize, meIntegrityTTId, setup(), and Numbers::subDet().

343  {
344 
345  if ( ! init_ ) this->setup();
346 
347  ievt_++;
348 
349  // fill bin 0 with number of events in the lumi
351 
353 
354  if ( e.getByLabel(EBDetIdCollection0_, ids0) ) {
355 
356  for ( EBDetIdCollection::const_iterator idItr = ids0->begin(); idItr != ids0->end(); ++idItr ) {
357 
358  int ism = Numbers::iSM( *idItr );
359 
360  float xism = ism + 0.5;
361 
363 
364  }
365 
366  } else {
367 
368 // edm::LogWarning("EBIntegrityTask") << EBDetIdCollection0_ << " not available";
369 
370  }
371 
373 
374  if ( e.getByLabel(EBDetIdCollection1_, ids1) ) {
375 
376  for ( EBDetIdCollection::const_iterator idItr = ids1->begin(); idItr != ids1->end(); ++idItr ) {
377 
378  EBDetId id = (*idItr);
379 
380  int ic = id.ic();
381  int ie = (ic-1)/20 + 1;
382  int ip = (ic-1)%20 + 1;
383 
384  int ism = Numbers::iSM( id );
385  float xism = ism + 0.5;
386 
387  float xie = ie - 0.5;
388  float xip = ip - 0.5;
389 
390  if ( meIntegrityGain[ism-1] ) meIntegrityGain[ism-1]->Fill(xie, xip);
391  if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xism, 1./1700.);
392 
393  }
394 
395  } else {
396 
397  edm::LogWarning("EBIntegrityTask") << EBDetIdCollection1_ << " not available";
398 
399  }
400 
402 
403  if ( e.getByLabel(EBDetIdCollection2_, ids2) ) {
404 
405  for ( EBDetIdCollection::const_iterator idItr = ids2->begin(); idItr != ids2->end(); ++idItr ) {
406 
407  EBDetId id = (*idItr);
408 
409  int ic = id.ic();
410  int ie = (ic-1)/20 + 1;
411  int ip = (ic-1)%20 + 1;
412 
413  int ism = Numbers::iSM( id );
414  float xism = ism + 0.5;
415 
416  float xie = ie - 0.5;
417  float xip = ip - 0.5;
418 
419  if ( meIntegrityChId[ism-1] ) meIntegrityChId[ism-1]->Fill(xie, xip);
420  if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xism, 1./1700.);
421 
422  }
423 
424  } else {
425 
426  edm::LogWarning("EBIntegrityTask") << EBDetIdCollection2_ << " not available";
427 
428  }
429 
431 
432  if ( e.getByLabel(EBDetIdCollection3_, ids3) ) {
433 
434  for ( EBDetIdCollection::const_iterator idItr = ids3->begin(); idItr != ids3->end(); ++idItr ) {
435 
436  EBDetId id = (*idItr);
437 
438  int ic = id.ic();
439  int ie = (ic-1)/20 + 1;
440  int ip = (ic-1)%20 + 1;
441 
442  int ism = Numbers::iSM( id );
443  float xism = ism + 0.5;
444 
445  float xie = ie - 0.5;
446  float xip = ip - 0.5;
447 
448  if ( meIntegrityGainSwitch[ism-1] ) meIntegrityGainSwitch[ism-1]->Fill(xie, xip);
449  if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xism, 1./1700.);
450 
451  }
452 
453  } else {
454 
455  edm::LogWarning("EBIntegrityTask") << EBDetIdCollection3_ << " not available";
456 
457  }
458 
460 
461  if ( e.getByLabel(EcalElectronicsIdCollection1_, ids4) ) {
462 
463  for ( EcalElectronicsIdCollection::const_iterator idItr = ids4->begin(); idItr != ids4->end(); ++idItr ) {
464 
465  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
466 
467  int itt = idItr->towerId();
468 
469  int iet = (itt-1)/4 + 1;
470  int ipt = (itt-1)%4 + 1;
471 
472  int ismt = Numbers::iSM( *idItr );
473  float xismt = ismt + 0.5;
474 
475  float xiet = iet - 0.5;
476  float xipt = ipt - 0.5;
477 
478  if ( meIntegrityTTId[ismt-1] ) meIntegrityTTId[ismt-1]->Fill(xiet, xipt);
480 
481  }
482 
483  } else {
484 
485  edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection1_ << " not available";
486 
487  }
488 
490 
491  if ( e.getByLabel(EcalElectronicsIdCollection2_, ids5) ) {
492 
493  for ( EcalElectronicsIdCollection::const_iterator idItr = ids5->begin(); idItr != ids5->end(); ++idItr ) {
494 
495  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
496 
497  int itt = idItr->towerId();
498 
499  int iet = (itt-1)/4 + 1;
500  int ipt = (itt-1)%4 + 1;
501 
502  int ismt = Numbers::iSM( *idItr );
503  float xismt = ismt + 0.5;
504 
505  float xiet = iet - 0.5;
506  float xipt = ipt - 0.5;
507 
508  if ( meIntegrityTTBlockSize[ismt-1] ) meIntegrityTTBlockSize[ismt-1]->Fill(xiet, xipt);
510 
511  }
512 
513  } else {
514 
515  edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection2_ << " not available";
516 
517  }
518 
520 
521  if ( e.getByLabel(EcalElectronicsIdCollection3_, ids6) ) {
522 
523  for ( EcalElectronicsIdCollection::const_iterator idItr = ids6->begin(); idItr != ids6->end(); ++idItr ) {
524 
525  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
526 
527  int ism = Numbers::iSM( *idItr );
528 
529  int itt = idItr->towerId();
530  float iTt = itt + 0.5 - 69;
531 
532  if ( meIntegrityMemTTId[ism-1] ) meIntegrityMemTTId[ism-1]->Fill(iTt,0);
533 
534  }
535 
536  } else {
537 
538  edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection3_ << " not available";
539 
540  }
541 
543 
544  if ( e.getByLabel(EcalElectronicsIdCollection4_, ids7) ) {
545 
546  for ( EcalElectronicsIdCollection::const_iterator idItr = ids7->begin(); idItr != ids7->end(); ++idItr ) {
547 
548  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
549 
550  int ism = Numbers::iSM( *idItr );
551 
552  int itt = idItr->towerId();
553  float iTt = itt + 0.5 - 69;
554 
555  if ( meIntegrityMemTTBlockSize[ism-1] ) meIntegrityMemTTBlockSize[ism-1]->Fill(iTt,0);
556 
557  }
558 
559  } else {
560 
561  edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection4_ << " not available";
562 
563  }
564 
566 
567  if ( e.getByLabel(EcalElectronicsIdCollection5_, ids8) ) {
568 
569  for ( EcalElectronicsIdCollection::const_iterator idItr = ids8->begin(); idItr != ids8->end(); ++idItr ) {
570 
571  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
572 
573  int ism = Numbers::iSM( *idItr );
574 
575  int chid = idItr->channelId();
576  int ie = EBIntegrityTask::chMemAbscissa[chid-1];
577  int ip = EBIntegrityTask::chMemOrdinate[chid-1];
578 
579  int itt = idItr->towerId();
580  ie += (itt-69)*5;
581 
582  float xie = ie - 0.5;
583  float xip = ip - 0.5;
584 
585  if ( meIntegrityMemChId[ism-1] ) meIntegrityMemChId[ism-1]->Fill(xie,xip);
586 
587  }
588 
589  } else {
590 
591  edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection5_ << " not available";
592 
593  }
594 
596 
597  if ( e.getByLabel(EcalElectronicsIdCollection6_, ids9) ) {
598 
599  for ( EcalElectronicsIdCollection::const_iterator idItr = ids9->begin(); idItr != ids9->end(); ++idItr ) {
600 
601  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
602 
603  int ism = Numbers::iSM( *idItr );
604 
605  int chid = idItr->channelId();
606  int ie = EBIntegrityTask::chMemAbscissa[chid-1];
607  int ip = EBIntegrityTask::chMemOrdinate[chid-1];
608 
609  int itt = idItr->towerId();
610  ie += (itt-69)*5;
611 
612  float xie = ie - 0.5;
613  float xip = ip - 0.5;
614 
615  if ( meIntegrityMemGain[ism-1] ) meIntegrityMemGain[ism-1]->Fill(xie,xip);
616 
617  }
618 
619  } else {
620 
621  edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection6_ << " not available";
622 
623  }
624 
625 }// end analyze
MonitorElement * meIntegrityTTBlockSize[36]
MonitorElement * meIntegrityMemTTBlockSize[36]
edm::InputTag EBDetIdCollection2_
edm::InputTag EBDetIdCollection3_
MonitorElement * meIntegrityGainSwitch[36]
MonitorElement * meIntegrityMemGain[36]
static const int chMemAbscissa[25]
void Fill(long long x)
MonitorElement * meIntegrityGain[36]
void setup(void)
Setup.
MonitorElement * meIntegrityErrorsByLumi
MonitorElement * meIntegrityMemTTId[36]
edm::InputTag EBDetIdCollection1_
MonitorElement * meIntegrityMemChId[36]
edm::InputTag EcalElectronicsIdCollection6_
edm::InputTag EcalElectronicsIdCollection4_
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
MonitorElement * meIntegrityTTId[36]
edm::InputTag EBDetIdCollection0_
static const int chMemOrdinate[25]
edm::InputTag EcalElectronicsIdCollection5_
edm::InputTag EcalElectronicsIdCollection3_
edm::InputTag EcalElectronicsIdCollection1_
MonitorElement * meIntegrityDCCSize
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:246
MonitorElement * meIntegrityChId[36]
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:145
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
std::vector< T >::const_iterator const_iterator
Definition: EDCollection.h:20
edm::InputTag EcalElectronicsIdCollection2_
void EBIntegrityTask::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 74 of file EBIntegrityTask.cc.

References dqmStore_, ievt_, prefixME_, DQMStore::rmdir(), DQMStore::setCurrentFolder(), and subfolder_.

74  {
75 
76  ievt_ = 0;
77 
78  if ( dqmStore_ ) {
79  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask");
80  if(subfolder_.size())
81  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/" + subfolder_);
82  dqmStore_->rmdir(prefixME_ + "/EBIntegrityTask");
83  }
84 
85 }
std::string subfolder_
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2535
std::string prefixME_
DQMStore * dqmStore_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void EBIntegrityTask::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
protectedvirtual

BeginLuminosityBlock.

Reimplemented from edm::EDAnalyzer.

Definition at line 87 of file EBIntegrityTask.cc.

References meIntegrityErrorsByLumi, and MonitorElement::Reset().

87  {
88 
90 
91 }
MonitorElement * meIntegrityErrorsByLumi
void Reset(void)
reset ME (ie. contents, errors, etc)
void EBIntegrityTask::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 96 of file EBIntegrityTask.cc.

References Numbers::initGeometry(), mergeRuns_, and reset().

96  {
97 
98  Numbers::initGeometry(c, false);
99 
100  if ( ! mergeRuns_ ) this->reset();
101 
102 }
void reset(void)
Reset.
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
Definition: Numbers.cc:50
void EBIntegrityTask::cleanup ( void  )
protected

Cleanup.

Definition at line 256 of file EBIntegrityTask.cc.

References dir, dqmStore_, MonitorElement::getName(), i, init_, meIntegrityChId, meIntegrityDCCSize, meIntegrityErrorsByLumi, meIntegrityGain, meIntegrityGainSwitch, meIntegrityMemChId, meIntegrityMemGain, meIntegrityMemTTBlockSize, meIntegrityMemTTId, meIntegrityTTBlockSize, meIntegrityTTId, prefixME_, DQMStore::removeElement(), DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and subfolder_.

Referenced by endJob().

256  {
257 
258  if ( ! init_ ) return;
259 
260  if ( dqmStore_ ) {
262 
263  dir = prefixME_ + "/EBIntegrityTask";
264  if(subfolder_.size())
265  dir += "/" + subfolder_;
266 
267  dqmStore_->setCurrentFolder(dir + "");
268 
270  meIntegrityDCCSize = 0;
271 
274 
275  dqmStore_->setCurrentFolder(dir + "/Gain");
276  for (int i = 0; i < 36; i++) {
277  if ( meIntegrityGain[i] ) dqmStore_->removeElement( meIntegrityGain[i]->getName() );
278  meIntegrityGain[i] = 0;
279  }
280 
281  dqmStore_->setCurrentFolder(dir + "/ChId");
282  for (int i = 0; i < 36; i++) {
283  if ( meIntegrityChId[i] ) dqmStore_->removeElement( meIntegrityChId[i]->getName() );
284  meIntegrityChId[i] = 0;
285  }
286 
287  dqmStore_->setCurrentFolder(dir + "/GainSwitch");
288  for (int i = 0; i < 36; i++) {
291  }
292 
293  dqmStore_->setCurrentFolder(dir + "/TTId");
294  for (int i = 0; i < 36; i++) {
295  if ( meIntegrityTTId[i] ) dqmStore_->removeElement( meIntegrityTTId[i]->getName() );
296  meIntegrityTTId[i] = 0;
297  }
298 
299  dqmStore_->setCurrentFolder(dir + "/TTBlockSize");
300  for (int i = 0; i < 36; i++) {
303  }
304 
305  dqmStore_->setCurrentFolder(dir + "/MemChId");
306  for (int i = 0; i < 36; i++) {
307  if ( meIntegrityMemChId[i] ) dqmStore_->removeElement( meIntegrityMemChId[i]->getName() );
308  meIntegrityMemChId[i] = 0;
309  }
310 
311  dqmStore_->setCurrentFolder(dir + "/MemGain");
312  for (int i = 0; i < 36; i++) {
313  if ( meIntegrityMemGain[i] ) dqmStore_->removeElement( meIntegrityMemGain[i]->getName() );
314  meIntegrityMemGain[i] = 0;
315  }
316 
317  dqmStore_->setCurrentFolder(dir + "/MemTTId");
318  for (int i = 0; i < 36; i++) {
319  if ( meIntegrityMemTTId[i] ) dqmStore_->removeElement( meIntegrityMemTTId[i]->getName() );
320  meIntegrityMemTTId[i] = 0;
321  }
322 
323  dqmStore_->setCurrentFolder(dir + "/MemSize");
324  for (int i = 0; i < 36; i++) {
327  }
328 
329  }
330 
331  init_ = false;
332 
333 }
const std::string & getName(void) const
get name of ME
int i
Definition: DBlmapReader.cc:9
std::string subfolder_
MonitorElement * meIntegrityTTBlockSize[36]
MonitorElement * meIntegrityMemTTBlockSize[36]
MonitorElement * meIntegrityGainSwitch[36]
MonitorElement * meIntegrityMemGain[36]
MonitorElement * meIntegrityGain[36]
std::string prefixME_
MonitorElement * meIntegrityErrorsByLumi
MonitorElement * meIntegrityMemTTId[36]
void removeElement(const std::string &name)
Definition: DQMStore.cc:2577
DQMStore * dqmStore_
MonitorElement * meIntegrityMemChId[36]
MonitorElement * meIntegrityTTId[36]
MonitorElement * meIntegrityDCCSize
MonitorElement * meIntegrityChId[36]
dbl *** dir
Definition: mlp_gen.cc:35
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void EBIntegrityTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 335 of file EBIntegrityTask.cc.

References cleanup(), enableCleanup_, and ievt_.

335  {
336 
337  edm::LogInfo("EBIntegrityTask") << "analyzed " << ievt_ << " events";
338 
339  if ( enableCleanup_ ) this->cleanup();
340 
341 }
void cleanup(void)
Cleanup.
void EBIntegrityTask::endLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
protectedvirtual

EndLuminosityBlock.

Reimplemented from edm::EDAnalyzer.

Definition at line 93 of file EBIntegrityTask.cc.

93  {
94 }
void EBIntegrityTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 104 of file EBIntegrityTask.cc.

104  {
105 
106 }
void EBIntegrityTask::reset ( void  )
protected

Reset.

Definition at line 108 of file EBIntegrityTask.cc.

References i, meIntegrityChId, meIntegrityDCCSize, meIntegrityErrorsByLumi, meIntegrityGain, meIntegrityGainSwitch, meIntegrityMemChId, meIntegrityMemGain, meIntegrityMemTTBlockSize, meIntegrityMemTTId, meIntegrityTTBlockSize, meIntegrityTTId, and MonitorElement::Reset().

Referenced by beginRun().

108  {
109 
111  for (int i = 0; i < 36; i++) {
113  if ( meIntegrityChId[i] ) meIntegrityChId[i]->Reset();
115  if ( meIntegrityTTId[i] ) meIntegrityTTId[i]->Reset();
121  }
123 
124 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * meIntegrityTTBlockSize[36]
MonitorElement * meIntegrityMemTTBlockSize[36]
MonitorElement * meIntegrityGainSwitch[36]
MonitorElement * meIntegrityMemGain[36]
MonitorElement * meIntegrityGain[36]
MonitorElement * meIntegrityErrorsByLumi
MonitorElement * meIntegrityMemTTId[36]
MonitorElement * meIntegrityMemChId[36]
MonitorElement * meIntegrityTTId[36]
MonitorElement * meIntegrityDCCSize
MonitorElement * meIntegrityChId[36]
void Reset(void)
reset ME (ie. contents, errors, etc)
void EBIntegrityTask::setup ( void  )
protected

Setup.

Definition at line 126 of file EBIntegrityTask.cc.

References DQMStore::book1D(), DQMStore::book2D(), dir, dqmStore_, i, init_, meIntegrityChId, meIntegrityDCCSize, meIntegrityErrorsByLumi, meIntegrityGain, meIntegrityGainSwitch, meIntegrityMemChId, meIntegrityMemGain, meIntegrityMemTTBlockSize, meIntegrityMemTTId, meIntegrityTTBlockSize, meIntegrityTTId, mergeVDriftHistosByStation::name, prefixME_, Numbers::sEB(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), MonitorElement::setLumiFlag(), AlCaHLTBitMon_QueryRunRegistry::string, subfolder_, and DQMStore::tag().

Referenced by analyze().

126  {
127 
128  init_ = true;
129 
132 
133  if ( dqmStore_ ) {
134 
135  dir = prefixME_ + "/EBIntegrityTask";
136  if(subfolder_.size())
137  dir += "/" + subfolder_;
138 
140 
141  // checking when number of towers in data different than expected from header
142  name = "EBIT DCC size error";
143  meIntegrityDCCSize = dqmStore_->book1D(name, name, 36, 1., 37.);
144  for (int i = 0; i < 36; i++) {
146  }
147 
148  // checking the number of integrity errors in each DCC for each lumi
149  // crystal integrity error is weighted by 1/1700
150  // tower integrity error is weighted by 1/68
151  // bin 0 contains the number of processed events in the lumi (for normalization)
152  name = "EBIT weighted integrity errors by lumi";
153  meIntegrityErrorsByLumi = dqmStore_->book1D(name, name, 36, 1., 37.);
155  for (int i = 0; i < 36; i++) {
157  }
158 
159  // checking when the gain is 0
160  dqmStore_->setCurrentFolder(dir + "/Gain");
161  for (int i = 0; i < 36; i++) {
162  name = "EBIT gain " + Numbers::sEB(i+1);
163  meIntegrityGain[i] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
164  meIntegrityGain[i]->setAxisTitle("ieta", 1);
165  meIntegrityGain[i]->setAxisTitle("iphi", 2);
166  dqmStore_->tag(meIntegrityGain[i], i+1);
167  }
168 
169  // checking when channel has unexpected or invalid ID
170  dqmStore_->setCurrentFolder(dir + "/ChId");
171  for (int i = 0; i < 36; i++) {
172  name = "EBIT ChId " + Numbers::sEB(i+1);
173  meIntegrityChId[i] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
174  meIntegrityChId[i]->setAxisTitle("ieta", 1);
175  meIntegrityChId[i]->setAxisTitle("iphi", 2);
176  dqmStore_->tag(meIntegrityChId[i], i+1);
177  }
178 
179  // checking when channel has unexpected or invalid ID
180  dqmStore_->setCurrentFolder(dir + "/GainSwitch");
181  for (int i = 0; i < 36; i++) {
182  name = "EBIT gain switch " + Numbers::sEB(i+1);
183  meIntegrityGainSwitch[i] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
184  meIntegrityGainSwitch[i]->setAxisTitle("ieta", 1);
185  meIntegrityGainSwitch[i]->setAxisTitle("iphi", 2);
187  }
188 
189  // checking when trigger tower has unexpected or invalid ID
190  dqmStore_->setCurrentFolder(dir + "/TTId");
191  for (int i = 0; i < 36; i++) {
192  name = "EBIT TTId " + Numbers::sEB(i+1);
193  meIntegrityTTId[i] = dqmStore_->book2D(name, name, 17, 0., 17., 4, 0., 4.);
194  meIntegrityTTId[i]->setAxisTitle("ieta'", 1);
195  meIntegrityTTId[i]->setAxisTitle("iphi'", 2);
196  dqmStore_->tag(meIntegrityTTId[i], i+1);
197  }
198 
199  // checking when trigger tower has unexpected or invalid size
200  dqmStore_->setCurrentFolder(dir + "/TTBlockSize");
201  for (int i = 0; i < 36; i++) {
202  name = "EBIT TTBlockSize " + Numbers::sEB(i+1);
203  meIntegrityTTBlockSize[i] = dqmStore_->book2D(name, name, 17, 0., 17., 4, 0., 4.);
204  meIntegrityTTBlockSize[i]->setAxisTitle("ieta'", 1);
205  meIntegrityTTBlockSize[i]->setAxisTitle("iphi'", 2);
207  }
208 
209  // checking when mem channels have unexpected ID
210  dqmStore_->setCurrentFolder(dir + "/MemChId");
211  for (int i = 0; i < 36; i++) {
212  name = "EBIT MemChId " + Numbers::sEB(i+1);
213  meIntegrityMemChId[i] = dqmStore_->book2D(name, name, 10, 0., 10., 5, 0., 5.);
214  meIntegrityMemChId[i]->setAxisTitle("pseudo-strip", 1);
215  meIntegrityMemChId[i]->setAxisTitle("channel", 2);
217  }
218 
219  // checking when mem samples have second bit encoding the gain different from 0
220  // note: strictly speaking, this does not corrupt the mem sample gain value (since only first bit is considered)
221  // but indicates that data are not completely correct
222  dqmStore_->setCurrentFolder(dir + "/MemGain");
223  for (int i = 0; i < 36; i++) {
224  name = "EBIT MemGain " + Numbers::sEB(i+1);
225  meIntegrityMemGain[i] = dqmStore_->book2D(name, name, 10, 0., 10., 5, 0., 5.);
226  meIntegrityMemGain[i]->setAxisTitle("pseudo-strip", 1);
227  meIntegrityMemGain[i]->setAxisTitle("channel", 2);
229  }
230 
231  // checking when mem tower block has unexpected ID
232  dqmStore_->setCurrentFolder(dir + "/MemTTId");
233  for (int i = 0; i < 36; i++) {
234  name = "EBIT MemTTId " + Numbers::sEB(i+1);
235  meIntegrityMemTTId[i] = dqmStore_->book2D(name, name, 2, 0., 2., 1, 0., 1.);
236  meIntegrityMemTTId[i]->setAxisTitle("pseudo-strip", 1);
237  meIntegrityMemTTId[i]->setAxisTitle("channel", 2);
239  }
240 
241  // checking when mem tower block has invalid size
242  dqmStore_->setCurrentFolder(dir + "/MemSize");
243  for (int i = 0; i < 36; i++) {
244  name = "EBIT MemSize " + Numbers::sEB(i+1);
245  meIntegrityMemTTBlockSize[i] = dqmStore_->book2D(name, name, 2, 0., 2., 1, 0., 1.);
246  meIntegrityMemTTBlockSize[i]->setAxisTitle("pseudo-strip", 1);
247  meIntegrityMemTTBlockSize[i]->setAxisTitle("pseudo-strip", 1);
248  meIntegrityMemTTBlockSize[i]->setAxisTitle("channel", 2);
250  }
251 
252  }
253 
254 }
int i
Definition: DBlmapReader.cc:9
std::string subfolder_
MonitorElement * meIntegrityTTBlockSize[36]
MonitorElement * meIntegrityMemTTBlockSize[36]
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)
MonitorElement * meIntegrityGainSwitch[36]
MonitorElement * meIntegrityMemGain[36]
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1359
MonitorElement * meIntegrityGain[36]
std::string prefixME_
MonitorElement * meIntegrityErrorsByLumi
MonitorElement * meIntegrityMemTTId[36]
DQMStore * dqmStore_
MonitorElement * meIntegrityMemChId[36]
MonitorElement * meIntegrityTTId[36]
MonitorElement * meIntegrityDCCSize
MonitorElement * meIntegrityChId[36]
dbl *** dir
Definition: mlp_gen.cc:35
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
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

const int EBIntegrityTask::chMemAbscissa
staticprivate
Initial value:
= {
1, 1, 1, 1, 1,
2, 2, 2, 2, 2,
3, 3, 3, 3, 3,
4, 4, 4, 4, 4,
5, 5, 5, 5, 5
}

Definition at line 103 of file EBIntegrityTask.h.

Referenced by analyze().

const int EBIntegrityTask::chMemOrdinate
staticprivate
Initial value:
= {
1, 2, 3, 4, 5,
5, 4, 3, 2, 1,
1, 2, 3, 4, 5,
5, 4, 3, 2, 1,
1, 2, 3, 4, 5
}

Definition at line 104 of file EBIntegrityTask.h.

Referenced by analyze().

DQMStore* EBIntegrityTask::dqmStore_
private

Definition at line 67 of file EBIntegrityTask.h.

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

edm::InputTag EBIntegrityTask::EBDetIdCollection0_
private

Definition at line 77 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EBDetIdCollection1_
private

Definition at line 78 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EBDetIdCollection2_
private

Definition at line 79 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EBDetIdCollection3_
private

Definition at line 80 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EBDetIdCollection4_
private

Definition at line 81 of file EBIntegrityTask.h.

edm::InputTag EBIntegrityTask::EcalElectronicsIdCollection1_
private

Definition at line 82 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EcalElectronicsIdCollection2_
private

Definition at line 83 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EcalElectronicsIdCollection3_
private

Definition at line 84 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EcalElectronicsIdCollection4_
private

Definition at line 85 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EcalElectronicsIdCollection5_
private

Definition at line 86 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EcalElectronicsIdCollection6_
private

Definition at line 87 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

bool EBIntegrityTask::enableCleanup_
private

Definition at line 73 of file EBIntegrityTask.h.

Referenced by EBIntegrityTask(), and endJob().

int EBIntegrityTask::ievt_
private

Definition at line 65 of file EBIntegrityTask.h.

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

bool EBIntegrityTask::init_
private

Definition at line 101 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityChId[36]
private

Definition at line 89 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityDCCSize
private

Definition at line 98 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityErrorsByLumi
private

Definition at line 99 of file EBIntegrityTask.h.

Referenced by analyze(), beginLuminosityBlock(), cleanup(), EBIntegrityTask(), reset(), and setup().

MonitorElement* EBIntegrityTask::meIntegrityGain[36]
private

Definition at line 90 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityGainSwitch[36]
private

Definition at line 91 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityMemChId[36]
private

Definition at line 94 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityMemGain[36]
private

Definition at line 95 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityMemTTBlockSize[36]
private

Definition at line 97 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityMemTTId[36]
private

Definition at line 96 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityTTBlockSize[36]
private

Definition at line 93 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityTTId[36]
private

Definition at line 92 of file EBIntegrityTask.h.

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

bool EBIntegrityTask::mergeRuns_
private

Definition at line 75 of file EBIntegrityTask.h.

Referenced by beginRun(), and EBIntegrityTask().

std::string EBIntegrityTask::prefixME_
private

Definition at line 69 of file EBIntegrityTask.h.

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

std::string EBIntegrityTask::subfolder_
private

Definition at line 71 of file EBIntegrityTask.h.

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