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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) 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::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::EDGetTokenT
< EBDetIdCollection
EBDetIdCollection1_
 
edm::EDGetTokenT
< EBDetIdCollection
EBDetIdCollection2_
 
edm::EDGetTokenT
< EBDetIdCollection
EBDetIdCollection3_
 
edm::EDGetTokenT
< EBDetIdCollection
EBDetIdCollection4_
 
edm::EDGetTokenT
< EcalElectronicsIdCollection
EcalElectronicsIdCollection1_
 
edm::EDGetTokenT
< EcalElectronicsIdCollection
EcalElectronicsIdCollection2_
 
edm::EDGetTokenT
< EcalElectronicsIdCollection
EcalElectronicsIdCollection3_
 
edm::EDGetTokenT
< EcalElectronicsIdCollection
EcalElectronicsIdCollection4_
 
edm::EDGetTokenT
< EcalElectronicsIdCollection
EcalElectronicsIdCollection5_
 
edm::EDGetTokenT
< EcalElectronicsIdCollection
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
 
- 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 24 of file EBIntegrityTask.cc.

References dqmStore_, 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_.

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

Destructor.

Definition at line 65 of file EBIntegrityTask.cc.

65  {
66 
67 }

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 338 of file EBIntegrityTask.cc.

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

338  {
339 
340  if ( ! init_ ) this->setup();
341 
342  ievt_++;
343 
344  // fill bin 0 with number of events in the lumi
346 
348 
349  if ( e.getByToken(EBDetIdCollection1_, ids1) ) {
350 
351  for ( EBDetIdCollection::const_iterator idItr = ids1->begin(); idItr != ids1->end(); ++idItr ) {
352 
353  EBDetId id = (*idItr);
354 
355  int ic = id.ic();
356  int ie = (ic-1)/20 + 1;
357  int ip = (ic-1)%20 + 1;
358 
359  int ism = Numbers::iSM( id );
360  float xism = ism + 0.5;
361 
362  float xie = ie - 0.5;
363  float xip = ip - 0.5;
364 
365  if ( meIntegrityGain[ism-1] ) meIntegrityGain[ism-1]->Fill(xie, xip);
366  if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xism, 1./1700.);
367 
368  }
369 
370  } else {
371 
372  edm::LogWarning("EBIntegrityTask") << "EBDetIdCollection1 not available";
373 
374  }
375 
377 
378  if ( e.getByToken(EBDetIdCollection2_, ids2) ) {
379 
380  for ( EBDetIdCollection::const_iterator idItr = ids2->begin(); idItr != ids2->end(); ++idItr ) {
381 
382  EBDetId id = (*idItr);
383 
384  int ic = id.ic();
385  int ie = (ic-1)/20 + 1;
386  int ip = (ic-1)%20 + 1;
387 
388  int ism = Numbers::iSM( id );
389  float xism = ism + 0.5;
390 
391  float xie = ie - 0.5;
392  float xip = ip - 0.5;
393 
394  if ( meIntegrityChId[ism-1] ) meIntegrityChId[ism-1]->Fill(xie, xip);
395  if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xism, 1./1700.);
396 
397  }
398 
399  } else {
400 
401  edm::LogWarning("EBIntegrityTask") << "EBDetIdCollection2 not available";
402 
403  }
404 
406 
407  if ( e.getByToken(EBDetIdCollection3_, ids3) ) {
408 
409  for ( EBDetIdCollection::const_iterator idItr = ids3->begin(); idItr != ids3->end(); ++idItr ) {
410 
411  EBDetId id = (*idItr);
412 
413  int ic = id.ic();
414  int ie = (ic-1)/20 + 1;
415  int ip = (ic-1)%20 + 1;
416 
417  int ism = Numbers::iSM( id );
418  float xism = ism + 0.5;
419 
420  float xie = ie - 0.5;
421  float xip = ip - 0.5;
422 
423  if ( meIntegrityGainSwitch[ism-1] ) meIntegrityGainSwitch[ism-1]->Fill(xie, xip);
424  if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xism, 1./1700.);
425 
426  }
427 
428  } else {
429 
430  edm::LogWarning("EBIntegrityTask") << "EBDetIdCollection3 not available";
431 
432  }
433 
435 
436  if ( e.getByToken(EcalElectronicsIdCollection1_, ids4) ) {
437 
438  for ( EcalElectronicsIdCollection::const_iterator idItr = ids4->begin(); idItr != ids4->end(); ++idItr ) {
439 
440  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
441 
442  int itt = idItr->towerId();
443 
444  int iet = (itt-1)/4 + 1;
445  int ipt = (itt-1)%4 + 1;
446 
447  int ismt = Numbers::iSM( *idItr );
448  float xismt = ismt + 0.5;
449 
450  float xiet = iet - 0.5;
451  float xipt = ipt - 0.5;
452 
453  if ( meIntegrityTTId[ismt-1] ) meIntegrityTTId[ismt-1]->Fill(xiet, xipt);
455 
456  }
457 
458  } else {
459 
460  edm::LogWarning("EBIntegrityTask") << "EcalElectronicsIdCollection1 not available";
461 
462  }
463 
465 
466  if ( e.getByToken(EcalElectronicsIdCollection2_, ids5) ) {
467 
468  for ( EcalElectronicsIdCollection::const_iterator idItr = ids5->begin(); idItr != ids5->end(); ++idItr ) {
469 
470  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
471 
472  int itt = idItr->towerId();
473 
474  int iet = (itt-1)/4 + 1;
475  int ipt = (itt-1)%4 + 1;
476 
477  int ismt = Numbers::iSM( *idItr );
478  float xismt = ismt + 0.5;
479 
480  float xiet = iet - 0.5;
481  float xipt = ipt - 0.5;
482 
483  if ( meIntegrityTTBlockSize[ismt-1] ) meIntegrityTTBlockSize[ismt-1]->Fill(xiet, xipt);
485 
486  }
487 
488  } else {
489 
490  edm::LogWarning("EBIntegrityTask") << "EcalElectronicsIdCollection2 not available";
491 
492  }
493 
495 
496  if ( e.getByToken(EcalElectronicsIdCollection3_, ids6) ) {
497 
498  for ( EcalElectronicsIdCollection::const_iterator idItr = ids6->begin(); idItr != ids6->end(); ++idItr ) {
499 
500  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
501 
502  int ism = Numbers::iSM( *idItr );
503 
504  int itt = idItr->towerId();
505  float iTt = itt + 0.5 - 69;
506 
507  if ( meIntegrityMemTTId[ism-1] ) meIntegrityMemTTId[ism-1]->Fill(iTt,0);
508 
509  }
510 
511  } else {
512 
513  edm::LogWarning("EBIntegrityTask") << "EcalElectronicsIdCollection3 not available";
514 
515  }
516 
518 
519  if ( e.getByToken(EcalElectronicsIdCollection4_, ids7) ) {
520 
521  for ( EcalElectronicsIdCollection::const_iterator idItr = ids7->begin(); idItr != ids7->end(); ++idItr ) {
522 
523  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
524 
525  int ism = Numbers::iSM( *idItr );
526 
527  int itt = idItr->towerId();
528  float iTt = itt + 0.5 - 69;
529 
530  if ( meIntegrityMemTTBlockSize[ism-1] ) meIntegrityMemTTBlockSize[ism-1]->Fill(iTt,0);
531 
532  }
533 
534  } else {
535 
536  edm::LogWarning("EBIntegrityTask") << "EcalElectronicsIdCollection4 not available";
537 
538  }
539 
541 
542  if ( e.getByToken(EcalElectronicsIdCollection5_, ids8) ) {
543 
544  for ( EcalElectronicsIdCollection::const_iterator idItr = ids8->begin(); idItr != ids8->end(); ++idItr ) {
545 
546  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
547 
548  int ism = Numbers::iSM( *idItr );
549 
550  int chid = idItr->channelId();
551  int ie = EBIntegrityTask::chMemAbscissa[chid-1];
552  int ip = EBIntegrityTask::chMemOrdinate[chid-1];
553 
554  int itt = idItr->towerId();
555  ie += (itt-69)*5;
556 
557  float xie = ie - 0.5;
558  float xip = ip - 0.5;
559 
560  if ( meIntegrityMemChId[ism-1] ) meIntegrityMemChId[ism-1]->Fill(xie,xip);
561 
562  }
563 
564  } else {
565 
566  edm::LogWarning("EBIntegrityTask") << "EcalElectronicsIdCollection5 not available";
567 
568  }
569 
571 
572  if ( e.getByToken(EcalElectronicsIdCollection6_, ids9) ) {
573 
574  for ( EcalElectronicsIdCollection::const_iterator idItr = ids9->begin(); idItr != ids9->end(); ++idItr ) {
575 
576  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
577 
578  int ism = Numbers::iSM( *idItr );
579 
580  int chid = idItr->channelId();
581  int ie = EBIntegrityTask::chMemAbscissa[chid-1];
582  int ip = EBIntegrityTask::chMemOrdinate[chid-1];
583 
584  int itt = idItr->towerId();
585  ie += (itt-69)*5;
586 
587  float xie = ie - 0.5;
588  float xip = ip - 0.5;
589 
590  if ( meIntegrityMemGain[ism-1] ) meIntegrityMemGain[ism-1]->Fill(xie,xip);
591 
592  }
593 
594  } else {
595 
596  edm::LogWarning("EBIntegrityTask") << "EcalElectronicsIdCollection6 not available";
597 
598  }
599 
600 }// end analyze
edm::EDGetTokenT< EBDetIdCollection > EBDetIdCollection2_
edm::EDGetTokenT< EBDetIdCollection > EBDetIdCollection1_
edm::EDGetTokenT< EBDetIdCollection > EBDetIdCollection3_
MonitorElement * meIntegrityTTBlockSize[36]
MonitorElement * meIntegrityMemTTBlockSize[36]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
MonitorElement * meIntegrityGainSwitch[36]
edm::EDGetTokenT< EcalElectronicsIdCollection > EcalElectronicsIdCollection6_
MonitorElement * meIntegrityMemGain[36]
static const int chMemAbscissa[25]
edm::EDGetTokenT< EcalElectronicsIdCollection > EcalElectronicsIdCollection4_
void Fill(long long x)
MonitorElement * meIntegrityGain[36]
void setup(void)
Setup.
MonitorElement * meIntegrityErrorsByLumi
MonitorElement * meIntegrityMemTTId[36]
edm::EDGetTokenT< EcalElectronicsIdCollection > EcalElectronicsIdCollection2_
MonitorElement * meIntegrityMemChId[36]
int ic() const
get ECAL/crystal number inside SM
Definition: EBDetId.cc:46
MonitorElement * meIntegrityTTId[36]
edm::EDGetTokenT< EcalElectronicsIdCollection > EcalElectronicsIdCollection1_
static const int chMemOrdinate[25]
edm::EDGetTokenT< EcalElectronicsIdCollection > EcalElectronicsIdCollection3_
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:243
edm::EDGetTokenT< EcalElectronicsIdCollection > EcalElectronicsIdCollection5_
MonitorElement * meIntegrityChId[36]
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:142
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
std::vector< EBDetId >::const_iterator const_iterator
Definition: EDCollection.h:19
void EBIntegrityTask::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 69 of file EBIntegrityTask.cc.

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

69  {
70 
71  ievt_ = 0;
72 
73  if ( dqmStore_ ) {
74  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask");
75  if(subfolder_.size())
76  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/" + subfolder_);
77  dqmStore_->rmdir(prefixME_ + "/EBIntegrityTask");
78  }
79 
80 }
std::string subfolder_
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2730
std::string prefixME_
DQMStore * dqmStore_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
void EBIntegrityTask::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
protectedvirtual

BeginLuminosityBlock.

Reimplemented from edm::EDAnalyzer.

Definition at line 82 of file EBIntegrityTask.cc.

References meIntegrityErrorsByLumi, and MonitorElement::Reset().

82  {
83 
85 
86 }
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 91 of file EBIntegrityTask.cc.

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

91  {
92 
93  Numbers::initGeometry(c, false);
94 
95  if ( ! mergeRuns_ ) this->reset();
96 
97 }
void reset(void)
Reset.
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
Definition: Numbers.cc:47
void EBIntegrityTask::cleanup ( void  )
protected

Cleanup.

Definition at line 251 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().

251  {
252 
253  if ( ! init_ ) return;
254 
255  if ( dqmStore_ ) {
257 
258  dir = prefixME_ + "/EBIntegrityTask";
259  if(subfolder_.size())
260  dir += "/" + subfolder_;
261 
262  dqmStore_->setCurrentFolder(dir + "");
263 
265  meIntegrityDCCSize = 0;
266 
269 
270  dqmStore_->setCurrentFolder(dir + "/Gain");
271  for (int i = 0; i < 36; i++) {
272  if ( meIntegrityGain[i] ) dqmStore_->removeElement( meIntegrityGain[i]->getName() );
273  meIntegrityGain[i] = 0;
274  }
275 
276  dqmStore_->setCurrentFolder(dir + "/ChId");
277  for (int i = 0; i < 36; i++) {
278  if ( meIntegrityChId[i] ) dqmStore_->removeElement( meIntegrityChId[i]->getName() );
279  meIntegrityChId[i] = 0;
280  }
281 
282  dqmStore_->setCurrentFolder(dir + "/GainSwitch");
283  for (int i = 0; i < 36; i++) {
286  }
287 
288  dqmStore_->setCurrentFolder(dir + "/TTId");
289  for (int i = 0; i < 36; i++) {
290  if ( meIntegrityTTId[i] ) dqmStore_->removeElement( meIntegrityTTId[i]->getName() );
291  meIntegrityTTId[i] = 0;
292  }
293 
294  dqmStore_->setCurrentFolder(dir + "/TTBlockSize");
295  for (int i = 0; i < 36; i++) {
298  }
299 
300  dqmStore_->setCurrentFolder(dir + "/MemChId");
301  for (int i = 0; i < 36; i++) {
302  if ( meIntegrityMemChId[i] ) dqmStore_->removeElement( meIntegrityMemChId[i]->getName() );
303  meIntegrityMemChId[i] = 0;
304  }
305 
306  dqmStore_->setCurrentFolder(dir + "/MemGain");
307  for (int i = 0; i < 36; i++) {
308  if ( meIntegrityMemGain[i] ) dqmStore_->removeElement( meIntegrityMemGain[i]->getName() );
309  meIntegrityMemGain[i] = 0;
310  }
311 
312  dqmStore_->setCurrentFolder(dir + "/MemTTId");
313  for (int i = 0; i < 36; i++) {
314  if ( meIntegrityMemTTId[i] ) dqmStore_->removeElement( meIntegrityMemTTId[i]->getName() );
315  meIntegrityMemTTId[i] = 0;
316  }
317 
318  dqmStore_->setCurrentFolder(dir + "/MemSize");
319  for (int i = 0; i < 36; i++) {
322  }
323 
324  }
325 
326  init_ = false;
327 
328 }
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:2772
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:584
void EBIntegrityTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 330 of file EBIntegrityTask.cc.

References cleanup(), enableCleanup_, and ievt_.

330  {
331 
332  edm::LogInfo("EBIntegrityTask") << "analyzed " << ievt_ << " events";
333 
334  if ( enableCleanup_ ) this->cleanup();
335 
336 }
void cleanup(void)
Cleanup.
void EBIntegrityTask::endLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
protectedvirtual

EndLuminosityBlock.

Reimplemented from edm::EDAnalyzer.

Definition at line 88 of file EBIntegrityTask.cc.

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

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 99 of file EBIntegrityTask.cc.

99  {
100 
101 }
void EBIntegrityTask::reset ( void  )
protected

Reset.

Definition at line 103 of file EBIntegrityTask.cc.

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

Referenced by beginRun().

103  {
104 
106  for (int i = 0; i < 36; i++) {
108  if ( meIntegrityChId[i] ) meIntegrityChId[i]->Reset();
110  if ( meIntegrityTTId[i] ) meIntegrityTTId[i]->Reset();
116  }
118 
119 }
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 121 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().

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

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 102 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 103 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::EDGetTokenT<EBDetIdCollection> EBIntegrityTask::EBDetIdCollection1_
private

Definition at line 77 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::EDGetTokenT<EBDetIdCollection> EBIntegrityTask::EBDetIdCollection2_
private

Definition at line 78 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::EDGetTokenT<EBDetIdCollection> EBIntegrityTask::EBDetIdCollection3_
private

Definition at line 79 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::EDGetTokenT<EBDetIdCollection> EBIntegrityTask::EBDetIdCollection4_
private

Definition at line 80 of file EBIntegrityTask.h.

edm::EDGetTokenT<EcalElectronicsIdCollection> EBIntegrityTask::EcalElectronicsIdCollection1_
private

Definition at line 81 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::EDGetTokenT<EcalElectronicsIdCollection> EBIntegrityTask::EcalElectronicsIdCollection2_
private

Definition at line 82 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::EDGetTokenT<EcalElectronicsIdCollection> EBIntegrityTask::EcalElectronicsIdCollection3_
private

Definition at line 83 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::EDGetTokenT<EcalElectronicsIdCollection> EBIntegrityTask::EcalElectronicsIdCollection4_
private

Definition at line 84 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::EDGetTokenT<EcalElectronicsIdCollection> EBIntegrityTask::EcalElectronicsIdCollection5_
private

Definition at line 85 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::EDGetTokenT<EcalElectronicsIdCollection> EBIntegrityTask::EcalElectronicsIdCollection6_
private

Definition at line 86 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 100 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityChId[36]
private

Definition at line 88 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityDCCSize
private

Definition at line 97 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityErrorsByLumi
private

Definition at line 98 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityGain[36]
private

Definition at line 89 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityGainSwitch[36]
private

Definition at line 90 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityMemChId[36]
private

Definition at line 93 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityMemGain[36]
private

Definition at line 94 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityMemTTBlockSize[36]
private

Definition at line 96 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityMemTTId[36]
private

Definition at line 95 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityTTBlockSize[36]
private

Definition at line 92 of file EBIntegrityTask.h.

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

MonitorElement* EBIntegrityTask::meIntegrityTTId[36]
private

Definition at line 91 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().