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 Types | Private Attributes
EBRawDataTask Class Reference

#include <EBRawDataTask.h>

Inheritance diagram for EBRawDataTask:
edm::EDAnalyzer

Public Member Functions

 EBRawDataTask (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~EBRawDataTask ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

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
CurrentProcessingContext const * currentContext () const
 

Private Types

enum  activeEVM { TCS, FDLEVM }
 

Private Attributes

float calibrationBX_
 
DQMStoredqmStore_
 
edm::InputTag EcalRawDataCollection_
 
bool enableCleanup_
 
edm::InputTag FEDRawDataCollection_
 
int ievt_
 
bool init_
 
MonitorElementmeEBBunchCrossingDCCErrors_
 
MonitorElementmeEBBunchCrossingFEErrors_
 
MonitorElementmeEBBunchCrossingSRPErrors_
 
MonitorElementmeEBBunchCrossingTCCErrors_
 
MonitorElementmeEBCalibrationEventErrors_
 
MonitorElementmeEBCRCErrors_
 
MonitorElementmeEBEventTypeCalibrationBX_
 
MonitorElementmeEBEventTypePostCalibrationBX_
 
MonitorElementmeEBEventTypePreCalibrationBX_
 
MonitorElementmeEBL1ADCCErrors_
 
MonitorElementmeEBL1AFEErrors_
 
MonitorElementmeEBL1ASRPErrors_
 
MonitorElementmeEBL1ATCCErrors_
 
MonitorElementmeEBOrbitNumberErrors_
 
MonitorElementmeEBRunNumberErrors_
 
MonitorElementmeEBSynchronizationErrorsByLumi_
 
MonitorElementmeEBTriggerTypeErrors_
 
bool mergeRuns_
 
std::string prefixME_
 

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)
 

Detailed Description

Definition at line 20 of file EBRawDataTask.h.

Member Enumeration Documentation

Enumerator
TCS 
FDLEVM 

Definition at line 100 of file EBRawDataTask.h.

Constructor & Destructor Documentation

EBRawDataTask::EBRawDataTask ( const edm::ParameterSet ps)

Constructor.

Definition at line 32 of file EBRawDataTask.cc.

References calibrationBX_, dqmStore_, EcalRawDataCollection_, enableCleanup_, FEDRawDataCollection_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), init_, meEBBunchCrossingDCCErrors_, meEBBunchCrossingFEErrors_, meEBBunchCrossingSRPErrors_, meEBBunchCrossingTCCErrors_, meEBCalibrationEventErrors_, meEBCRCErrors_, meEBEventTypeCalibrationBX_, meEBEventTypePostCalibrationBX_, meEBEventTypePreCalibrationBX_, meEBL1ADCCErrors_, meEBL1AFEErrors_, meEBL1ASRPErrors_, meEBL1ATCCErrors_, meEBOrbitNumberErrors_, meEBRunNumberErrors_, meEBSynchronizationErrorsByLumi_, meEBTriggerTypeErrors_, mergeRuns_, cmsCodeRules.cppFunctionSkipper::operator, and prefixME_.

32  {
33 
34  init_ = false;
35 
37 
38  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
39 
40  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
41 
42  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
43 
44  FEDRawDataCollection_ = ps.getParameter<edm::InputTag>("FEDRawDataCollection");
45  EcalRawDataCollection_ = ps.getParameter<edm::InputTag>("EcalRawDataCollection");
46 
50  meEBCRCErrors_ = 0;
57  meEBL1AFEErrors_ = 0;
63 
65 
66  calibrationBX_ = 3490;
67 
68 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
DQMStore * dqmStore_
Definition: EBRawDataTask.h:66
MonitorElement * meEBSynchronizationErrorsByLumi_
Definition: EBRawDataTask.h:94
MonitorElement * meEBTriggerTypeErrors_
Definition: EBRawDataTask.h:83
MonitorElement * meEBEventTypePreCalibrationBX_
Definition: EBRawDataTask.h:78
MonitorElement * meEBCRCErrors_
Definition: EBRawDataTask.h:77
MonitorElement * meEBCalibrationEventErrors_
Definition: EBRawDataTask.h:84
float calibrationBX_
Definition: EBRawDataTask.h:98
MonitorElement * meEBL1ATCCErrors_
Definition: EBRawDataTask.h:89
MonitorElement * meEBOrbitNumberErrors_
Definition: EBRawDataTask.h:82
MonitorElement * meEBRunNumberErrors_
Definition: EBRawDataTask.h:81
MonitorElement * meEBL1ADCCErrors_
Definition: EBRawDataTask.h:85
MonitorElement * meEBBunchCrossingDCCErrors_
Definition: EBRawDataTask.h:86
MonitorElement * meEBL1ASRPErrors_
Definition: EBRawDataTask.h:91
MonitorElement * meEBEventTypePostCalibrationBX_
Definition: EBRawDataTask.h:80
MonitorElement * meEBBunchCrossingTCCErrors_
Definition: EBRawDataTask.h:90
edm::InputTag EcalRawDataCollection_
Definition: EBRawDataTask.h:75
MonitorElement * meEBL1AFEErrors_
Definition: EBRawDataTask.h:87
edm::InputTag FEDRawDataCollection_
Definition: EBRawDataTask.h:74
MonitorElement * meEBBunchCrossingFEErrors_
Definition: EBRawDataTask.h:88
std::string prefixME_
Definition: EBRawDataTask.h:68
MonitorElement * meEBEventTypeCalibrationBX_
Definition: EBRawDataTask.h:79
MonitorElement * meEBBunchCrossingSRPErrors_
Definition: EBRawDataTask.h:92
EBRawDataTask::~EBRawDataTask ( )
virtual

Destructor.

Definition at line 70 of file EBRawDataTask.cc.

70  {
71 }

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 378 of file EBRawDataTask.cc.

References edm::EventBase::bunchCrossing(), calibrationBX_, EcalDCCHeaderBlock::COSMIC, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, FEDRawData::data(), EcalBarrel, EcalRawDataCollection_, edm::EventBase::experimentType(), FEDRawDataCollection_, MonitorElement::Fill(), edm::Event::getByLabel(), H_BX_MASK, H_L1_MASK, H_ORBITCOUNTER_MASK, H_TTYPE_MASK, i, edm::EventBase::id(), ievt_, init_, ecalpyutils::ism(), Numbers::iSM(), edm::EventBase::isRealData(), FEDHeader::lvl1ID(), MAX_TCC_SIZE, meEBBunchCrossingDCCErrors_, meEBBunchCrossingFEErrors_, meEBBunchCrossingSRPErrors_, meEBBunchCrossingTCCErrors_, meEBCalibrationEventErrors_, meEBCRCErrors_, meEBEventTypeCalibrationBX_, meEBEventTypePostCalibrationBX_, meEBEventTypePreCalibrationBX_, meEBL1ADCCErrors_, meEBL1AFEErrors_, meEBL1ASRPErrors_, meEBL1ATCCErrors_, meEBOrbitNumberErrors_, meEBRunNumberErrors_, meEBSynchronizationErrorsByLumi_, meEBTriggerTypeErrors_, EcalDCCHeaderBlock::MTCC, edm::EventBase::orbitNumber(), EcalDCCHeaderBlock::PHYSICS_GLOBAL, EcalDCCHeaderBlock::PHYSICS_LOCAL, edm::EventID::run(), setup(), FEDRawData::size(), ntuplemaker::status, and Numbers::subDet().

378  {
379 
380  if ( ! init_ ) this->setup();
381 
382  ievt_++;
383 
384  // fill bin 0 with number of events in the lumi
386 
387  int evt_runNumber = e.id().run();
388 
389  int GT_L1A=0, GT_OrbitNumber=0, GT_BunchCrossing=0, GT_TriggerType=0;
390 
391  edm::Handle<FEDRawDataCollection> allFedRawData;
392 
393  int gtFedDataSize = 0;
394 
395  int ECALDCC_L1A_MostFreqId = -1;
396  int ECALDCC_OrbitNumber_MostFreqId = -1;
397  int ECALDCC_BunchCrossing_MostFreqId = -1;
398  int ECALDCC_TriggerType_MostFreqId = -1;
399 
400  if ( e.getByLabel(FEDRawDataCollection_, allFedRawData) ) {
401 
402  // GT FED data
403  const FEDRawData& gtFedData = allFedRawData->FEDData(812);
404 
405  gtFedDataSize = gtFedData.size()/sizeof(uint64_t);
406 
407  if ( gtFedDataSize > 0 ) {
408 
409  FEDHeader header(gtFedData.data());
410 
411 #define H_L1_MASK 0xFFFFFF
412 #define H_ORBITCOUNTER_MASK 0xFFFFFFFF
413 #define H_BX_MASK 0xFFF
414 #define H_TTYPE_MASK 0xF
415 
416  GT_L1A = header.lvl1ID() & H_L1_MASK;
417  GT_OrbitNumber = e.orbitNumber() & H_ORBITCOUNTER_MASK;
418  GT_BunchCrossing = e.bunchCrossing() & H_BX_MASK;
419  GT_TriggerType = e.experimentType() & H_TTYPE_MASK;
420 
421  } else {
422 
423  // use the most frequent among the ECAL FEDs
424 
425  std::map<int,int> ECALDCC_L1A_FreqMap;
426  std::map<int,int> ECALDCC_OrbitNumber_FreqMap;
427  std::map<int,int> ECALDCC_BunchCrossing_FreqMap;
428  std::map<int,int> ECALDCC_TriggerType_FreqMap;
429 
430  int ECALDCC_L1A_MostFreqCounts = 0;
431  int ECALDCC_OrbitNumber_MostFreqCounts = 0;
432  int ECALDCC_BunchCrossing_MostFreqCounts = 0;
433  int ECALDCC_TriggerType_MostFreqCounts = 0;
434 
436 
437  if ( e.getByLabel(EcalRawDataCollection_, dcchs) ) {
438 
439  for ( EcalRawDataCollection::const_iterator dcchItr = dcchs->begin(); dcchItr != dcchs->end(); ++dcchItr ) {
440 
441  if ( Numbers::subDet( *dcchItr ) != EcalBarrel ) continue;
442 
443  int ECALDCC_L1A = dcchItr->getLV1();
444  int ECALDCC_OrbitNumber = dcchItr->getOrbit();
445  int ECALDCC_BunchCrossing = dcchItr->getBX();
446  int ECALDCC_TriggerType = dcchItr->getBasicTriggerType();
447 
448  ++ECALDCC_L1A_FreqMap[ECALDCC_L1A];
449  ++ECALDCC_OrbitNumber_FreqMap[ECALDCC_OrbitNumber];
450  ++ECALDCC_BunchCrossing_FreqMap[ECALDCC_BunchCrossing];
451  ++ECALDCC_TriggerType_FreqMap[ECALDCC_TriggerType];
452 
453  if ( ECALDCC_L1A_FreqMap[ECALDCC_L1A] > ECALDCC_L1A_MostFreqCounts ) {
454  ECALDCC_L1A_MostFreqCounts = ECALDCC_L1A_FreqMap[ECALDCC_L1A];
455  ECALDCC_L1A_MostFreqId = ECALDCC_L1A;
456  }
457 
458  if ( ECALDCC_OrbitNumber_FreqMap[ECALDCC_OrbitNumber] > ECALDCC_OrbitNumber_MostFreqCounts ) {
459  ECALDCC_OrbitNumber_MostFreqCounts = ECALDCC_OrbitNumber_FreqMap[ECALDCC_OrbitNumber];
460  ECALDCC_OrbitNumber_MostFreqId = ECALDCC_OrbitNumber;
461  }
462 
463  if ( ECALDCC_BunchCrossing_FreqMap[ECALDCC_BunchCrossing] > ECALDCC_BunchCrossing_MostFreqCounts ) {
464  ECALDCC_BunchCrossing_MostFreqCounts = ECALDCC_BunchCrossing_FreqMap[ECALDCC_BunchCrossing];
465  ECALDCC_BunchCrossing_MostFreqId = ECALDCC_BunchCrossing;
466  }
467 
468  if ( ECALDCC_TriggerType_FreqMap[ECALDCC_TriggerType] > ECALDCC_TriggerType_MostFreqCounts ) {
469  ECALDCC_TriggerType_MostFreqCounts = ECALDCC_TriggerType_FreqMap[ECALDCC_TriggerType];
470  ECALDCC_TriggerType_MostFreqId = ECALDCC_TriggerType;
471  }
472 
473  }
474 
475  } else {
476  edm::LogWarning("EBRawDataTask") << EcalRawDataCollection_ << " not available";
477  }
478 
479  }
480 
481  // ECAL barrel FEDs
482  int EBFirstFED=610;
483  for(int i=0; i<36; i++) {
484 
485  const FEDRawData& fedData = allFedRawData->FEDData(EBFirstFED+i);
486 
487  int length = fedData.size()/sizeof(uint64_t);
488 
489  if ( length > 0 ) {
490 
491  uint64_t * pData = (uint64_t *)(fedData.data());
492  uint64_t * fedTrailer = pData + (length - 1);
493  bool crcError = (*fedTrailer >> 2 ) & 0x1;
494 
495  if (crcError) meEBCRCErrors_->Fill( i+1 );
496 
497  }
498 
499  }
500 
501  } else {
502  edm::LogWarning("EBRawDataTask") << FEDRawDataCollection_ << " not available";
503  }
504 
506 
507  if ( e.getByLabel(EcalRawDataCollection_, dcchs) ) {
508 
509  for ( EcalRawDataCollection::const_iterator dcchItr = dcchs->begin(); dcchItr != dcchs->end(); ++dcchItr ) {
510 
511  if ( Numbers::subDet( *dcchItr ) != EcalBarrel ) continue;
512 
513  int ism = Numbers::iSM( *dcchItr, EcalBarrel );
514  float xism = ism+0.5;
515 
516  int ECALDCC_runNumber = dcchItr->getRunNumber();
517 
518  int ECALDCC_L1A = dcchItr->getLV1();
519  int ECALDCC_OrbitNumber = dcchItr->getOrbit();
520  int ECALDCC_BunchCrossing = dcchItr->getBX();
521  int ECALDCC_TriggerType = dcchItr->getBasicTriggerType();
522 
523  if ( evt_runNumber != ECALDCC_runNumber ) meEBRunNumberErrors_->Fill( xism );
524 
525  if ( gtFedDataSize > 0 ) {
526 
527  if ( GT_L1A != ECALDCC_L1A ) meEBL1ADCCErrors_->Fill( xism );
528 
529  if ( GT_BunchCrossing != ECALDCC_BunchCrossing ) meEBBunchCrossingDCCErrors_->Fill( xism );
530 
531  if ( GT_TriggerType != ECALDCC_TriggerType ) meEBTriggerTypeErrors_->Fill ( xism );
532 
533  } else {
534 
535  if ( ECALDCC_L1A_MostFreqId != ECALDCC_L1A ) meEBL1ADCCErrors_->Fill( xism );
536 
537  if ( ECALDCC_BunchCrossing_MostFreqId != ECALDCC_BunchCrossing ) meEBBunchCrossingDCCErrors_->Fill( xism );
538 
539  if ( ECALDCC_TriggerType_MostFreqId != ECALDCC_TriggerType ) meEBTriggerTypeErrors_->Fill ( xism );
540 
541  }
542 
543  if ( gtFedDataSize == 0 ) {
544 
545  if ( GT_OrbitNumber != ECALDCC_OrbitNumber ) meEBOrbitNumberErrors_->Fill ( xism );
546 
547  } else {
548 
549  if ( ECALDCC_OrbitNumber_MostFreqId != ECALDCC_OrbitNumber ) meEBOrbitNumberErrors_->Fill ( xism );
550 
551  }
552 
553  // DCC vs. FE,TCC, SRP syncronization
554  const std::vector<short> feBxs = dcchItr->getFEBxs();
555  const std::vector<short> tccBx = dcchItr->getTCCBx();
556  const short srpBx = dcchItr->getSRPBx();
557  const std::vector<short> status = dcchItr->getFEStatus();
558 
559  std::vector<int> BxSynchStatus;
560  BxSynchStatus.reserve((int)feBxs.size());
561 
562  for(int fe=0; fe<(int)feBxs.size(); fe++) {
563  // do not consider desynch errors if the DCC detected them
564  if( ( status[fe] == 10 || status[fe] == 11 )) continue;
565  if(feBxs[fe] != ECALDCC_BunchCrossing && feBxs[fe] != -1 && ECALDCC_BunchCrossing != -1) {
566  meEBBunchCrossingFEErrors_->Fill( xism, 1/(float)feBxs.size() );
567  BxSynchStatus[fe] = 0;
568  } else BxSynchStatus[fe] = 1;
569  }
570 
571  // vector of TCC channels has 4 elements for both EB and EE.
572  // EB uses [0], EE uses [0-3].
573  if(tccBx.size() == MAX_TCC_SIZE) {
574  if(tccBx[0] != ECALDCC_BunchCrossing && tccBx[0] != -1 && ECALDCC_BunchCrossing != -1) meEBBunchCrossingTCCErrors_->Fill( xism );
575  }
576 
577  if(srpBx != ECALDCC_BunchCrossing && srpBx != -1 && ECALDCC_BunchCrossing != -1) meEBBunchCrossingSRPErrors_->Fill( xism );
578 
579  const std::vector<short> feLv1 = dcchItr->getFELv1();
580  const std::vector<short> tccLv1 = dcchItr->getTCCLv1();
581  const short srpLv1 = dcchItr->getSRPLv1();
582 
583  // Lv1 in TCC,SRP,FE are limited to 12 bits(LSB), while in the DCC Lv1 has 24 bits
584  int ECALDCC_L1A_12bit = ECALDCC_L1A & 0xfff;
585  int feLv1Offset = ( e.isRealData() ) ? 1 : 0; // in MC FE Lv1A counter starts from 1, in data from 0
586 
587  for(int fe=0; fe<(int)feLv1.size(); fe++) {
588  // do not consider desynch errors if the DCC detected them
589  if( ( status[fe] == 9 || status[fe] == 11 )) continue;
590  if(feLv1[fe]+feLv1Offset != ECALDCC_L1A_12bit && feLv1[fe] != -1 && ECALDCC_L1A_12bit - 1 != -1) {
591  meEBL1AFEErrors_->Fill( xism, 1/(float)feLv1.size() );
592  meEBSynchronizationErrorsByLumi_->Fill( xism, 1/(float)feLv1.size() );
593  } else if( BxSynchStatus[fe]==0 ) meEBSynchronizationErrorsByLumi_->Fill( xism, 1/(float)feLv1.size() );
594  }
595 
596  // vector of TCC channels has 4 elements for both EB and EE.
597  // EB uses [0], EE uses [0-3].
598  if(tccLv1.size() == MAX_TCC_SIZE) {
599  if(tccLv1[0] != ECALDCC_L1A_12bit && tccLv1[0] != -1 && ECALDCC_L1A_12bit - 1 != -1) meEBL1ATCCErrors_->Fill( xism );
600  }
601 
602  if(srpLv1 != ECALDCC_L1A_12bit && srpLv1 != -1 && ECALDCC_L1A_12bit - 1 != -1) meEBL1ASRPErrors_->Fill( xism );
603 
604  if ( gtFedDataSize == 0 ) {
605 
606  if ( GT_OrbitNumber != ECALDCC_OrbitNumber ) meEBOrbitNumberErrors_->Fill ( xism );
607 
608  } else {
609 
610  if ( ECALDCC_OrbitNumber_MostFreqId != ECALDCC_OrbitNumber ) meEBOrbitNumberErrors_->Fill ( xism );
611 
612  }
613 
614  float evtType = dcchItr->getRunType();
615 
616  if ( evtType < 0 || evtType > 22 ) evtType = -1;
617 
618  if ( ECALDCC_BunchCrossing < calibrationBX_ ) meEBEventTypePreCalibrationBX_->Fill( evtType+0.5, 1./36. );
619  if ( ECALDCC_BunchCrossing == calibrationBX_ ) meEBEventTypeCalibrationBX_->Fill( evtType+0.5, 1./36. );
620  if ( ECALDCC_BunchCrossing > calibrationBX_ ) meEBEventTypePostCalibrationBX_->Fill ( evtType+0.5, 1./36. );
621 
622  if ( ECALDCC_BunchCrossing != calibrationBX_ ) {
623  if ( evtType != EcalDCCHeaderBlock::COSMIC &&
624  evtType != EcalDCCHeaderBlock::MTCC &&
629  evtType != -1 ) meEBCalibrationEventErrors_->Fill( xism );
630  } else {
631  if ( evtType == EcalDCCHeaderBlock::COSMIC ||
632  evtType == EcalDCCHeaderBlock::MTCC ||
637  }
638 
639  }
640 
641  } else {
642  edm::LogWarning("EBRawDataTask") << EcalRawDataCollection_ << " not available";
643  }
644 
645 }
RunNumber_t run() const
Definition: EventID.h:42
int i
Definition: DBlmapReader.cc:9
MonitorElement * meEBSynchronizationErrorsByLumi_
Definition: EBRawDataTask.h:94
MonitorElement * meEBTriggerTypeErrors_
Definition: EBRawDataTask.h:83
MonitorElement * meEBEventTypePreCalibrationBX_
Definition: EBRawDataTask.h:78
MonitorElement * meEBCRCErrors_
Definition: EBRawDataTask.h:77
MonitorElement * meEBCalibrationEventErrors_
Definition: EBRawDataTask.h:84
float calibrationBX_
Definition: EBRawDataTask.h:98
std::vector< T >::const_iterator const_iterator
int bunchCrossing() const
Definition: EventBase.h:62
MonitorElement * meEBL1ATCCErrors_
Definition: EBRawDataTask.h:89
MonitorElement * meEBOrbitNumberErrors_
Definition: EBRawDataTask.h:82
bool isRealData() const
Definition: EventBase.h:60
MonitorElement * meEBRunNumberErrors_
Definition: EBRawDataTask.h:81
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
MonitorElement * meEBL1ADCCErrors_
Definition: EBRawDataTask.h:85
MonitorElement * meEBBunchCrossingDCCErrors_
Definition: EBRawDataTask.h:86
void Fill(long long x)
MonitorElement * meEBL1ASRPErrors_
Definition: EBRawDataTask.h:91
static int iSM(const int ism, const EcalSubdetector subdet)
Definition: Numbers.cc:222
MonitorElement * meEBEventTypePostCalibrationBX_
Definition: EBRawDataTask.h:80
MonitorElement * meEBBunchCrossingTCCErrors_
Definition: EBRawDataTask.h:90
edm::InputTag EcalRawDataCollection_
Definition: EBRawDataTask.h:75
MonitorElement * meEBL1AFEErrors_
Definition: EBRawDataTask.h:87
#define H_ORBITCOUNTER_MASK
int orbitNumber() const
Definition: EventBase.h:63
edm::InputTag FEDRawDataCollection_
Definition: EBRawDataTask.h:74
#define H_L1_MASK
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
#define H_BX_MASK
MonitorElement * meEBBunchCrossingFEErrors_
Definition: EBRawDataTask.h:88
unsigned long long uint64_t
Definition: Time.h:15
edm::EventID id() const
Definition: EventBase.h:56
MonitorElement * meEBEventTypeCalibrationBX_
Definition: EBRawDataTask.h:79
edm::EventAuxiliary::ExperimentType experimentType() const
Definition: EventBase.h:61
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:29
#define MAX_TCC_SIZE
MonitorElement * meEBBunchCrossingSRPErrors_
Definition: EBRawDataTask.h:92
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:136
int lvl1ID()
Level-1 event number generated by the TTC system.
Definition: FEDHeader.cc:22
tuple status
Definition: ntuplemaker.py:245
void setup(void)
Setup.
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
#define H_TTYPE_MASK
void EBRawDataTask::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 73 of file EBRawDataTask.cc.

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

73  {
74 
75  ievt_ = 0;
76 
77  if ( dqmStore_ ) {
78  dqmStore_->setCurrentFolder(prefixME_ + "/EBRawDataTask");
79  dqmStore_->rmdir(prefixME_ + "/EBRawDataTask");
80  }
81 
82 }
DQMStore * dqmStore_
Definition: EBRawDataTask.h:66
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2311
std::string prefixME_
Definition: EBRawDataTask.h:68
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
void EBRawDataTask::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
protectedvirtual

BeginLuminosityBlock.

Reimplemented from edm::EDAnalyzer.

Definition at line 84 of file EBRawDataTask.cc.

References meEBSynchronizationErrorsByLumi_, and MonitorElement::Reset().

84  {
85 
87 
88 }
MonitorElement * meEBSynchronizationErrorsByLumi_
Definition: EBRawDataTask.h:94
void Reset(void)
reset ME (ie. contents, errors, etc)
void EBRawDataTask::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 90 of file EBRawDataTask.cc.

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

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

Cleanup.

Definition at line 303 of file EBRawDataTask.cc.

References dqmStore_, MonitorElement::getName(), init_, meEBBunchCrossingDCCErrors_, meEBBunchCrossingFEErrors_, meEBBunchCrossingSRPErrors_, meEBBunchCrossingTCCErrors_, meEBCalibrationEventErrors_, meEBCRCErrors_, meEBEventTypeCalibrationBX_, meEBEventTypePostCalibrationBX_, meEBEventTypePreCalibrationBX_, meEBL1ADCCErrors_, meEBL1AFEErrors_, meEBL1ASRPErrors_, meEBL1ATCCErrors_, meEBOrbitNumberErrors_, meEBRunNumberErrors_, meEBSynchronizationErrorsByLumi_, meEBTriggerTypeErrors_, prefixME_, DQMStore::removeElement(), and DQMStore::setCurrentFolder().

Referenced by endJob().

303  {
304 
305  if ( ! init_ ) return;
306 
307  if ( dqmStore_ ) {
308  dqmStore_->setCurrentFolder(prefixME_ + "/EBRawDataTask");
309 
312 
315 
318 
320  meEBCRCErrors_ = 0;
321 
324 
327 
330 
333 
335  meEBL1ADCCErrors_ = 0;
336 
339 
341  meEBL1AFEErrors_ = 0;
342 
345 
347  meEBL1ATCCErrors_ = 0;
348 
351 
353  meEBL1ASRPErrors_ = 0;
354 
357 
360 
361  }
362 
363  init_ = false;
364 
365 }
const std::string & getName(void) const
get name of ME
DQMStore * dqmStore_
Definition: EBRawDataTask.h:66
MonitorElement * meEBSynchronizationErrorsByLumi_
Definition: EBRawDataTask.h:94
MonitorElement * meEBTriggerTypeErrors_
Definition: EBRawDataTask.h:83
MonitorElement * meEBEventTypePreCalibrationBX_
Definition: EBRawDataTask.h:78
MonitorElement * meEBCRCErrors_
Definition: EBRawDataTask.h:77
MonitorElement * meEBCalibrationEventErrors_
Definition: EBRawDataTask.h:84
MonitorElement * meEBL1ATCCErrors_
Definition: EBRawDataTask.h:89
MonitorElement * meEBOrbitNumberErrors_
Definition: EBRawDataTask.h:82
MonitorElement * meEBRunNumberErrors_
Definition: EBRawDataTask.h:81
MonitorElement * meEBL1ADCCErrors_
Definition: EBRawDataTask.h:85
MonitorElement * meEBBunchCrossingDCCErrors_
Definition: EBRawDataTask.h:86
MonitorElement * meEBL1ASRPErrors_
Definition: EBRawDataTask.h:91
MonitorElement * meEBEventTypePostCalibrationBX_
Definition: EBRawDataTask.h:80
MonitorElement * meEBBunchCrossingTCCErrors_
Definition: EBRawDataTask.h:90
void removeElement(const std::string &name)
Definition: DQMStore.cc:2353
MonitorElement * meEBL1AFEErrors_
Definition: EBRawDataTask.h:87
MonitorElement * meEBBunchCrossingFEErrors_
Definition: EBRawDataTask.h:88
std::string prefixME_
Definition: EBRawDataTask.h:68
MonitorElement * meEBEventTypeCalibrationBX_
Definition: EBRawDataTask.h:79
MonitorElement * meEBBunchCrossingSRPErrors_
Definition: EBRawDataTask.h:92
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
void EBRawDataTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 370 of file EBRawDataTask.cc.

References cleanup(), enableCleanup_, and ievt_.

370  {
371 
372  edm::LogInfo("EBRawDataTask") << "analyzed " << ievt_ << " events";
373 
374  if ( enableCleanup_ ) this->cleanup();
375 
376 }
void cleanup(void)
Cleanup.
void EBRawDataTask::endLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
protectedvirtual

EndLuminosityBlock.

Reimplemented from edm::EDAnalyzer.

Definition at line 367 of file EBRawDataTask.cc.

367  {
368 }
void EBRawDataTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 98 of file EBRawDataTask.cc.

98  {
99 
100 }
void EBRawDataTask::reset ( void  )
protected

Reset.

Definition at line 102 of file EBRawDataTask.cc.

References meEBBunchCrossingDCCErrors_, meEBBunchCrossingFEErrors_, meEBBunchCrossingSRPErrors_, meEBBunchCrossingTCCErrors_, meEBCalibrationEventErrors_, meEBCRCErrors_, meEBEventTypeCalibrationBX_, meEBEventTypePostCalibrationBX_, meEBEventTypePreCalibrationBX_, meEBL1ADCCErrors_, meEBL1AFEErrors_, meEBL1ASRPErrors_, meEBL1ATCCErrors_, meEBOrbitNumberErrors_, meEBRunNumberErrors_, meEBSynchronizationErrorsByLumi_, meEBTriggerTypeErrors_, and MonitorElement::Reset().

Referenced by beginRun().

102  {
103 
121 
122 }
MonitorElement * meEBSynchronizationErrorsByLumi_
Definition: EBRawDataTask.h:94
MonitorElement * meEBTriggerTypeErrors_
Definition: EBRawDataTask.h:83
MonitorElement * meEBEventTypePreCalibrationBX_
Definition: EBRawDataTask.h:78
MonitorElement * meEBCRCErrors_
Definition: EBRawDataTask.h:77
MonitorElement * meEBCalibrationEventErrors_
Definition: EBRawDataTask.h:84
MonitorElement * meEBL1ATCCErrors_
Definition: EBRawDataTask.h:89
MonitorElement * meEBOrbitNumberErrors_
Definition: EBRawDataTask.h:82
MonitorElement * meEBRunNumberErrors_
Definition: EBRawDataTask.h:81
MonitorElement * meEBL1ADCCErrors_
Definition: EBRawDataTask.h:85
MonitorElement * meEBBunchCrossingDCCErrors_
Definition: EBRawDataTask.h:86
MonitorElement * meEBL1ASRPErrors_
Definition: EBRawDataTask.h:91
MonitorElement * meEBEventTypePostCalibrationBX_
Definition: EBRawDataTask.h:80
MonitorElement * meEBBunchCrossingTCCErrors_
Definition: EBRawDataTask.h:90
MonitorElement * meEBL1AFEErrors_
Definition: EBRawDataTask.h:87
MonitorElement * meEBBunchCrossingFEErrors_
Definition: EBRawDataTask.h:88
MonitorElement * meEBEventTypeCalibrationBX_
Definition: EBRawDataTask.h:79
MonitorElement * meEBBunchCrossingSRPErrors_
Definition: EBRawDataTask.h:92
void Reset(void)
reset ME (ie. contents, errors, etc)
void EBRawDataTask::setup ( void  )
protected

Setup.

Definition at line 124 of file EBRawDataTask.cc.

References EcalDCCHeaderBlock::BEAMH2, EcalDCCHeaderBlock::BEAMH4, DQMStore::book1D(), EcalDCCHeaderBlock::COSMIC, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, dqmStore_, 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, meEBBunchCrossingDCCErrors_, meEBBunchCrossingFEErrors_, meEBBunchCrossingSRPErrors_, meEBBunchCrossingTCCErrors_, meEBCalibrationEventErrors_, meEBCRCErrors_, meEBEventTypeCalibrationBX_, meEBEventTypePostCalibrationBX_, meEBEventTypePreCalibrationBX_, meEBL1ADCCErrors_, meEBL1AFEErrors_, meEBL1ASRPErrors_, meEBL1ATCCErrors_, meEBOrbitNumberErrors_, meEBRunNumberErrors_, meEBSynchronizationErrorsByLumi_, meEBTriggerTypeErrors_, 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::setBinLabel(), DQMStore::setCurrentFolder(), MonitorElement::setLumiFlag(), EcalDCCHeaderBlock::TESTPULSE_GAP, EcalDCCHeaderBlock::TESTPULSE_MGPA, and EcalDCCHeaderBlock::TESTPULSE_SCAN_MEM.

Referenced by analyze().

124  {
125 
126  init_ = true;
127 
128  std::string name;
129 
130  if ( dqmStore_ ) {
131  dqmStore_->setCurrentFolder(prefixME_ + "/EBRawDataTask");
132 
133  name = "EBRDT event type pre calibration BX";
134  meEBEventTypePreCalibrationBX_ = dqmStore_->book1D(name, name, 31, -1., 30.);
159 
160  name = "EBRDT event type calibration BX";
161  meEBEventTypeCalibrationBX_ = dqmStore_->book1D(name, name, 31, -1., 30.);
162  meEBEventTypeCalibrationBX_->setBinLabel(1, "UNKNOWN", 1);
186 
187  name = "EBRDT event type post calibration BX";
188  meEBEventTypePostCalibrationBX_ = dqmStore_->book1D(name, name, 31, -1., 30.);
213 
214  name = "EBRDT CRC errors";
215  meEBCRCErrors_ = dqmStore_->book1D(name, name, 36, 1, 37);
216  for (int i = 0; i < 36; i++) {
218  }
219 
220  name = "EBRDT run number errors";
221  meEBRunNumberErrors_ = dqmStore_->book1D(name, name, 36, 1, 37);
222  for (int i = 0; i < 36; i++) {
224  }
225 
226  name = "EBRDT orbit number errors";
227  meEBOrbitNumberErrors_ = dqmStore_->book1D(name, name, 36, 1, 37);
228  for (int i = 0; i < 36; i++) {
230  }
231 
232  name = "EBRDT trigger type errors";
233  meEBTriggerTypeErrors_ = dqmStore_->book1D(name, name, 36, 1, 37);
234  for (int i = 0; i < 36; i++) {
236  }
237 
238  name = "EBRDT calibration event errors";
239  meEBCalibrationEventErrors_ = dqmStore_->book1D(name, name, 36, 1, 37);
240  for (int i = 0; i < 36; i++) {
242  }
243 
244  name = "EBRDT L1A DCC errors";
245  meEBL1ADCCErrors_ = dqmStore_->book1D(name, name, 36, 1, 37);
246  for (int i = 0; i < 36; i++) {
248  }
249 
250  name = "EBRDT bunch crossing DCC errors";
251  meEBBunchCrossingDCCErrors_ = dqmStore_->book1D(name, name, 36, 1, 37);
252  for (int i = 0; i < 36; i++) {
254  }
255 
256  name = "EBRDT L1A FE errors";
257  meEBL1AFEErrors_ = dqmStore_->book1D(name, name, 36, 1, 37);
258  for (int i = 0; i < 36; i++) {
260  }
261 
262  name = "EBRDT bunch crossing FE errors";
263  meEBBunchCrossingFEErrors_ = dqmStore_->book1D(name, name, 36, 1, 37);
264  for (int i = 0; i < 36; i++) {
266  }
267 
268  name = "EBRDT L1A TCC errors";
269  meEBL1ATCCErrors_ = dqmStore_->book1D(name, name, 36, 1, 37);
270  for (int i = 0; i < 36; i++) {
272  }
273 
274  name = "EBRDT bunch crossing TCC errors";
275  meEBBunchCrossingTCCErrors_ = dqmStore_->book1D(name, name, 36, 1, 37);
276  for (int i = 0; i < 36; i++) {
278  }
279 
280  name = "EBRDT L1A SRP errors";
281  meEBL1ASRPErrors_ = dqmStore_->book1D(name, name, 36, 1, 37);
282  for (int i = 0; i < 36; i++) {
284  }
285 
286  name = "EBRDT bunch crossing SRP errors";
287  meEBBunchCrossingSRPErrors_ = dqmStore_->book1D(name, name, 36, 1, 37);
288  for (int i = 0; i < 36; i++) {
290  }
291 
292  name = "EBRDT FE synchronization errors by lumi";
293  meEBSynchronizationErrorsByLumi_ = dqmStore_->book1D(name, name, 36, 1, 37);
295  for (int i = 0; i < 36; i++) {
297  }
298 
299  }
300 
301 }
int i
Definition: DBlmapReader.cc:9
static std::string sEB(const int ism)
Definition: Numbers.cc:87
DQMStore * dqmStore_
Definition: EBRawDataTask.h:66
MonitorElement * meEBSynchronizationErrorsByLumi_
Definition: EBRawDataTask.h:94
MonitorElement * meEBTriggerTypeErrors_
Definition: EBRawDataTask.h:83
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
MonitorElement * meEBEventTypePreCalibrationBX_
Definition: EBRawDataTask.h:78
MonitorElement * meEBCRCErrors_
Definition: EBRawDataTask.h:77
MonitorElement * meEBCalibrationEventErrors_
Definition: EBRawDataTask.h:84
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 * meEBL1ATCCErrors_
Definition: EBRawDataTask.h:89
MonitorElement * meEBOrbitNumberErrors_
Definition: EBRawDataTask.h:82
MonitorElement * meEBRunNumberErrors_
Definition: EBRawDataTask.h:81
MonitorElement * meEBL1ADCCErrors_
Definition: EBRawDataTask.h:85
MonitorElement * meEBBunchCrossingDCCErrors_
Definition: EBRawDataTask.h:86
MonitorElement * meEBL1ASRPErrors_
Definition: EBRawDataTask.h:91
MonitorElement * meEBEventTypePostCalibrationBX_
Definition: EBRawDataTask.h:80
MonitorElement * meEBBunchCrossingTCCErrors_
Definition: EBRawDataTask.h:90
MonitorElement * meEBL1AFEErrors_
Definition: EBRawDataTask.h:87
MonitorElement * meEBBunchCrossingFEErrors_
Definition: EBRawDataTask.h:88
std::string prefixME_
Definition: EBRawDataTask.h:68
MonitorElement * meEBEventTypeCalibrationBX_
Definition: EBRawDataTask.h:79
MonitorElement * meEBBunchCrossingSRPErrors_
Definition: EBRawDataTask.h:92
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232

Member Data Documentation

float EBRawDataTask::calibrationBX_
private

Definition at line 98 of file EBRawDataTask.h.

Referenced by analyze(), and EBRawDataTask().

DQMStore* EBRawDataTask::dqmStore_
private

Definition at line 66 of file EBRawDataTask.h.

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

edm::InputTag EBRawDataTask::EcalRawDataCollection_
private

Definition at line 75 of file EBRawDataTask.h.

Referenced by analyze(), and EBRawDataTask().

bool EBRawDataTask::enableCleanup_
private

Definition at line 70 of file EBRawDataTask.h.

Referenced by EBRawDataTask(), and endJob().

edm::InputTag EBRawDataTask::FEDRawDataCollection_
private

Definition at line 74 of file EBRawDataTask.h.

Referenced by analyze(), and EBRawDataTask().

int EBRawDataTask::ievt_
private

Definition at line 64 of file EBRawDataTask.h.

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

bool EBRawDataTask::init_
private

Definition at line 96 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBBunchCrossingDCCErrors_
private

Definition at line 86 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBBunchCrossingFEErrors_
private

Definition at line 88 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBBunchCrossingSRPErrors_
private

Definition at line 92 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBBunchCrossingTCCErrors_
private

Definition at line 90 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBCalibrationEventErrors_
private

Definition at line 84 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBCRCErrors_
private

Definition at line 77 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBEventTypeCalibrationBX_
private

Definition at line 79 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBEventTypePostCalibrationBX_
private

Definition at line 80 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBEventTypePreCalibrationBX_
private

Definition at line 78 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBL1ADCCErrors_
private

Definition at line 85 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBL1AFEErrors_
private

Definition at line 87 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBL1ASRPErrors_
private

Definition at line 91 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBL1ATCCErrors_
private

Definition at line 89 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBOrbitNumberErrors_
private

Definition at line 82 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBRunNumberErrors_
private

Definition at line 81 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBSynchronizationErrorsByLumi_
private

Definition at line 94 of file EBRawDataTask.h.

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

MonitorElement* EBRawDataTask::meEBTriggerTypeErrors_
private

Definition at line 83 of file EBRawDataTask.h.

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

bool EBRawDataTask::mergeRuns_
private

Definition at line 72 of file EBRawDataTask.h.

Referenced by beginRun(), and EBRawDataTask().

std::string EBRawDataTask::prefixME_
private

Definition at line 68 of file EBRawDataTask.h.

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