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
ESIntegrityTask Class Reference

#include <ESIntegrityTask.h>

Inheritance diagram for ESIntegrityTask:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 ESIntegrityTask (const edm::ParameterSet &ps)
 
virtual ~ESIntegrityTask ()
 
- 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 &lumi, const edm::EventSetup &c)
 Begin Lumi. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void calculateDIFraction (void)
 Calculate Data Integrity Fraction. More...
 
void cleanup (void)
 Cleanup. More...
 
void endJob (void)
 EndJob. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &lumi, const edm::EventSetup &c)
 End Lumi. 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

int dac_
 
edm::EDGetTokenT
< ESRawDataCollection
dccCollections_
 
bool doLumiAnalysis_
 
DQMStoredqmStore_
 
int eCount_
 
bool enableCleanup_
 
int fed_ [2][2][40][40]
 
int fiber_ [2][2][40][40]
 
int firstDAC_
 
int gain_
 
int ievt_
 
bool init_
 
int isPed_
 
int kchip_ [2][2][40][40]
 
edm::EDGetTokenT
< ESLocalRawDataCollection
kchipCollections_
 
edm::FileInPath lookup_
 
MonitorElementmeDCCCRCErr_
 
MonitorElementmeDCCErr_
 
MonitorElementmeDIErrors_ [2][2]
 
MonitorElementmeDIErrorsLS_ [2][2]
 
MonitorElementmeDIFraction_
 
MonitorElementmeEVDR_
 
MonitorElementmeFED_
 
MonitorElementmeFiberBadStatus_
 
MonitorElementmeFiberErrCode_
 
MonitorElementmeFiberOff_
 
MonitorElementmeGain_
 
MonitorElementmeKBC_
 
MonitorElementmeKEC_
 
MonitorElementmeKF1_
 
MonitorElementmeKF2_
 
MonitorElementmeOptoBC_
 
MonitorElementmeOptoRX_
 
bool mergeRuns_
 
MonitorElementmeSLinkCRCErr_
 
int nDAC_
 
int precision_
 
std::string prefixME_
 
int runNum_
 
int runtype_
 
int seqtype_
 
int vDAC_ [5]
 

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 13 of file ESIntegrityTask.h.

Constructor & Destructor Documentation

ESIntegrityTask::ESIntegrityTask ( const edm::ParameterSet ps)

Definition at line 26 of file ESIntegrityTask.cc.

References gather_cfg::cout, mergeVDriftHistosByStation::file, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, j, gen::k, m, cppFunctionSkipper::operator, and detailsBasic3DVector::z.

26  {
27 
28  init_ = false;
29 
31 
32  prefixME_ = ps.getUntrackedParameter<string>("prefixME", "");
33  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
34  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
35  lookup_ = ps.getUntrackedParameter<FileInPath>("LookupTable");
36 
37  dccCollections_ = consumes<ESRawDataCollection>(ps.getParameter<InputTag>("ESDCCCollections"));
38  kchipCollections_ = consumes<ESLocalRawDataCollection>(ps.getParameter<InputTag>("ESKChipCollections"));
39 
40  doLumiAnalysis_ = ps.getParameter<bool>("DoLumiAnalysis");
41 
42  // read in look-up table
43  for (int i=0; i<2; ++i)
44  for (int j=0; j<2; ++j)
45  for (int k=0; k<40; ++k)
46  for (int m=0; m<40; ++m) {
47  fed_[i][j][k][m] = -1;
48  kchip_[i][j][k][m] = -1;
49  fiber_[i][j][k][m] = -1;
50  }
51 
52  int nLines_, z, iz, ip, ix, iy, fed, kchip, pace, bundle, fiber, optorx;
53  ifstream file;
54  file.open(lookup_.fullPath().c_str());
55  if( file.is_open() ) {
56 
57  file >> nLines_;
58 
59  for (int i=0; i<nLines_; ++i) {
60  file>> iz >> ip >> ix >> iy >> fed >> kchip >> pace >> bundle >> fiber >> optorx;
61 
62  z = (iz==-1) ? 2:iz;
63  fed_[z-1][ip-1][ix-1][iy-1] = fed;
64  kchip_[z-1][ip-1][ix-1][iy-1] = kchip;
65  fiber_[z-1][ip-1][ix-1][iy-1] = (fiber-1)+(optorx-1)*12;
66  }
67  }
68  else {
69  cout<<"ESIntegrityTask : Look up table file can not be found in "<<lookup_.fullPath().c_str()<<endl;
70  }
71 
72 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< ESRawDataCollection > dccCollections_
float float float z
int fed_[2][2][40][40]
int fiber_[2][2][40][40]
int j
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< ESLocalRawDataCollection > kchipCollections_
int k[5][pyjets_maxn]
std::string prefixME_
edm::FileInPath lookup_
tuple cout
Definition: gather_cfg.py:121
std::string fullPath() const
Definition: FileInPath.cc:171
DQMStore * dqmStore_
int kchip_[2][2][40][40]
ESIntegrityTask::~ESIntegrityTask ( )
virtual

Definition at line 74 of file ESIntegrityTask.cc.

74  {
75 }

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 266 of file ESIntegrityTask.cc.

References ESDCCHeaderBlock::fedId(), sistrip::extrainfo::gain_, ESKCHIPBlock::getBC(), ESDCCHeaderBlock::getBX(), edm::Event::getByToken(), ESDCCHeaderBlock::getDAC(), ESDCCHeaderBlock::getDCCErrors(), ESKCHIPBlock::getEC(), ESDCCHeaderBlock::getFEChannelStatus(), ESKCHIPBlock::getFlag1(), ESKCHIPBlock::getFlag2(), ESDCCHeaderBlock::getGain(), ESKCHIPBlock::getOptoBC(), ESDCCHeaderBlock::getOptoBC0(), ESDCCHeaderBlock::getOptoBC1(), ESDCCHeaderBlock::getOptoBC2(), ESKCHIPBlock::getOptoEC(), ESDCCHeaderBlock::getOptoRX0(), ESDCCHeaderBlock::getOptoRX1(), ESDCCHeaderBlock::getOptoRX2(), ESDCCHeaderBlock::getPrecision(), ESDCCHeaderBlock::getRunType(), ESDCCHeaderBlock::getSeqType(), i, ESKCHIPBlock::id(), j, and HcalObjRepresent::setup().

266  {
267 
268  if ( ! init_ ) this->setup();
269 
270  ievt_++;
271 
274 
275  // Fill # of events
276  meDCCErr_->Fill(575, 2, 1);
277  meDCCCRCErr_->Fill(575, 2, 1);
278  meOptoRX_->Fill(575, 2, 1);
279  meOptoBC_->Fill(575, 2, 1);
280  meFiberBadStatus_->Fill(575, 36, 1);
281  meFiberOff_->Fill(575, 36, 1);
282  meEVDR_->Fill(575, 36, 1);
283 
284  // # of DI errors
285  Double_t nDIErr[56][36];
286  for (int i=0; i<56; ++i)
287  for (int j=0; j<36; ++j)
288  nDIErr[i][j] = 0;
289 
290  // DCC
291  vector<int> fiberStatus;
292  if ( e.getByToken(dccCollections_, dccs) ) {
293 
294  for (ESRawDataCollection::const_iterator dccItr = dccs->begin(); dccItr != dccs->end(); ++dccItr) {
295  ESDCCHeaderBlock dcc = (*dccItr);
296 
297  meFED_->Fill(dcc.fedId());
298 
299  meDCCErr_->Fill(dcc.fedId(), dcc.getDCCErrors());
300 
301  // SLink CRC error
302  if (dcc.getDCCErrors() == 101) {
303  meSLinkCRCErr_->Fill(dcc.fedId());
304  for (int j=0; j<36; ++j) nDIErr[dcc.fedId()-520][j]++;
305  }
306 
307  if (dcc.getOptoRX0() == 129) {
308  meOptoRX_->Fill(dcc.fedId(), 0);
309  if (((dcc.getOptoBC0()-15) & 0x0fff) != dcc.getBX()) meOptoBC_->Fill(dcc.fedId(), 0);
310  }
311  if (dcc.getOptoRX1() == 129) {
312  meOptoRX_->Fill(dcc.fedId(), 1);
313  if (((dcc.getOptoBC1()-15) & 0x0fff) != dcc.getBX()) meOptoBC_->Fill(dcc.fedId(), 1);
314  }
315  if (dcc.getOptoRX2() == 129) {
316  meOptoRX_->Fill(dcc.fedId(), 2);
317  if (((dcc.getOptoBC2()-15) & 0x0fff) != dcc.getBX()) meOptoBC_->Fill(dcc.fedId(), 2);
318  }
319 
320  if (dcc.getOptoRX0() == 128) {
321  meDCCCRCErr_->Fill(dcc.fedId(), 0);
322  for (int j=0; j<12; ++j) nDIErr[dcc.fedId()-520][j]++;
323  }
324  if (dcc.getOptoRX1() == 128) {
325  meDCCCRCErr_->Fill(dcc.fedId(), 1);
326  for (int j=12; j<24; ++j) nDIErr[dcc.fedId()-520][j]++;
327  }
328  if (dcc.getOptoRX2() == 128) {
329  meDCCCRCErr_->Fill(dcc.fedId(), 2);
330  for (int j=24; j<36; ++j) nDIErr[dcc.fedId()-520][j]++;
331  }
332 
333  fiberStatus = dcc.getFEChannelStatus();
334 
335  for (unsigned int i=0; i<fiberStatus.size(); ++i) {
336  if (fiberStatus[i]==4 || fiberStatus[i]==8 || fiberStatus[i]==10 || fiberStatus[i]==11 || fiberStatus[i]==12) {
337  meFiberBadStatus_->Fill(dcc.fedId(), i+1, 1);
338  meFiberErrCode_->Fill(fiberStatus[i]);
339  nDIErr[dcc.fedId()-520][i]++;
340  }
341  if (fiberStatus[i]==7)
342  meFiberOff_->Fill(dcc.fedId(), i+1, 1);
343  if (fiberStatus[i]==6) {
344  meFiberErrCode_->Fill(fiberStatus[i]);
345  meEVDR_->Fill(dcc.fedId(), i+1, 1);
346  }
347  }
348 
349  runtype_ = dcc.getRunType();
350  seqtype_ = dcc.getSeqType();
351  dac_ = dcc.getDAC();
352  gain_ = dcc.getGain();
353  precision_ = dcc.getPrecision();
354 
355  meGain_->Fill(gain_);
356  }
357  } else {
358  LogWarning("ESIntegrityTask") << "dccCollections not available";
359  }
360 
361  // KCHIP's
362  if ( e.getByToken(kchipCollections_, kchips) ) {
363 
364  for (ESLocalRawDataCollection::const_iterator kItr = kchips->begin(); kItr != kchips->end(); ++kItr) {
365 
366  ESKCHIPBlock kchip = (*kItr);
367 
368  meKF1_->Fill(kchip.id(), kchip.getFlag1());
369  meKF2_->Fill(kchip.id(), kchip.getFlag2());
370  if (kchip.getBC() != kchip.getOptoBC()) meKBC_->Fill(kchip.id());
371  if (kchip.getEC() != kchip.getOptoEC()) meKEC_->Fill(kchip.id());
372  }
373  } else {
374  LogWarning("ESIntegrityTask") << "kchipCollections not available";
375  }
376 
377  // Fill # of DI errors
378  for (int iz=0; iz<2; ++iz)
379  for (int ip=0; ip<2; ++ip)
380  for (int ix=0; ix<40; ++ix)
381  for (int iy=0; iy<40; ++iy) {
382 
383  if (fed_[iz][ip][ix][iy] == -1) continue;
384 
385  if (nDIErr[fed_[iz][ip][ix][iy]-520][fiber_[iz][ip][ix][iy]] > 0)
386  meDIErrors_[iz][ip]->Fill(ix+1, iy+1, 1);
387 
388  }
389 
390 }
MonitorElement * meGain_
int getOptoBC2() const
int getGain() const
int i
Definition: DBlmapReader.cc:9
MonitorElement * meDCCErr_
const int & id() const
Definition: ESKCHIPBlock.h:15
MonitorElement * meKEC_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
MonitorElement * meDCCCRCErr_
MonitorElement * meFED_
std::vector< ESDCCHeaderBlock >::const_iterator const_iterator
int getEC() const
Definition: ESKCHIPBlock.h:36
int getOptoRX0() const
MonitorElement * meFiberBadStatus_
edm::EDGetTokenT< ESRawDataCollection > dccCollections_
MonitorElement * meFiberOff_
int getOptoRX1() const
int getFlag1() const
Definition: ESKCHIPBlock.h:39
int getBC() const
Definition: ESKCHIPBlock.h:35
int fed_[2][2][40][40]
int getOptoBC1() const
const std::vector< int > & getFEChannelStatus() const
void Fill(long long x)
int getBX() const
MonitorElement * meKF1_
int getRunType() const
int fiber_[2][2][40][40]
MonitorElement * meDIErrors_[2][2]
MonitorElement * meOptoRX_
MonitorElement * meFiberErrCode_
int getFlag2() const
Definition: ESKCHIPBlock.h:40
int j
Definition: DBlmapReader.cc:9
int getSeqType() const
edm::EDGetTokenT< ESLocalRawDataCollection > kchipCollections_
int getOptoEC() const
Definition: ESKCHIPBlock.h:38
int getOptoBC0() const
MonitorElement * meEVDR_
int getPrecision() const
MonitorElement * meKF2_
int getDCCErrors() const
int getDAC() const
int getOptoBC() const
Definition: ESKCHIPBlock.h:37
void setup(void)
Setup.
const int fedId() const
int getOptoRX2() const
MonitorElement * meSLinkCRCErr_
MonitorElement * meOptoBC_
MonitorElement * meKBC_
void ESIntegrityTask::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 77 of file ESIntegrityTask.cc.

77  {
78 
79  ievt_ = 0;
80 
81  if ( dqmStore_ ) {
82  dqmStore_->setCurrentFolder(prefixME_ + "/ESIntegrityTask");
83  dqmStore_->rmdir(prefixME_ + "/ESIntegrityTask");
84  }
85 
86 }
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 ESIntegrityTask::beginLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup c 
)
protectedvirtual

Begin Lumi.

Reimplemented from edm::EDAnalyzer.

Definition at line 108 of file ESIntegrityTask.cc.

References i, and j.

108  {
109 
110  LogInfo("ESIntegrityTask") << "analyzed " << ievt_ << " events";
111  // In case of Lumi based analysis SoftReset the Integrity histogram
112  if (doLumiAnalysis_) {
113  for (int i=0; i<2; ++i) {
114  for (int j=0; j<2; ++j) {
115  if (meDIErrors_[i][j]) {
117  }
118  }
119  }
120  ievt_ = 0;
121  }
122 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * meDIErrors_[2][2]
int j
Definition: DBlmapReader.cc:9
void softReset(MonitorElement *me)
Definition: DQMStore.cc:2934
DQMStore * dqmStore_
void ESIntegrityTask::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 88 of file ESIntegrityTask.cc.

References reset(), and HcalObjRepresent::setup().

88  {
89 
90  if ( ! init_ ) this->setup();
91  if ( ! mergeRuns_ ) this->reset();
92 
93 }
void reset(void)
Reset.
void setup(void)
Setup.
void ESIntegrityTask::calculateDIFraction ( void  )
protected

Calculate Data Integrity Fraction.

Definition at line 394 of file ESIntegrityTask.cc.

References i, j, x, and detailsBasic3DVector::y.

394  {
395 
396  float nValidChannels=0;
397  float nGlobalErrors=0;
398 
399  for (int i=0; i<2; ++i) {
400  for (int j=0; j<2; ++j) {
401  float nValidChannelsES=0;
402  float nGlobalErrorsES = 0;
403  float reportSummaryES = -1;
404  if (!meDIErrors_[i][j]) continue;
405  for (int x=0; x<40; ++x) {
406  for (int y=0; y<40; ++y) {
407  float val = meDIErrors_[i][j]->getBinContent(x+1, y+1);
408  if (fed_[i][j][x][y] == -1) continue;
409  if (ievt_ != 0) nGlobalErrors += val/ievt_;
410  nValidChannels++;
411  if (ievt_ != 0) nGlobalErrorsES += val/ievt_;
412  nValidChannelsES++;
413  }
414  }
415  if (nValidChannelsES != 0) reportSummaryES = 1 - nGlobalErrorsES/nValidChannelsES;
416  meDIFraction_->setBinContent(i+1, j+1, reportSummaryES);
417  }
418  }
419  float reportSummary = -1.0;
420  if (nValidChannels != 0) reportSummary = 1.0 - nGlobalErrors/nValidChannels;
421  meDIFraction_->setBinContent(3,3, reportSummary);
422 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * meDIFraction_
int fed_[2][2][40][40]
MonitorElement * meDIErrors_[2][2]
int j
Definition: DBlmapReader.cc:9
double getBinContent(int binx) const
get content of bin (1-D)
Definition: DDAxes.h:10
void ESIntegrityTask::cleanup ( void  )
protected

Cleanup.

Definition at line 246 of file ESIntegrityTask.cc.

246  {
247 
248  if ( ! init_ ) return;
249 
250  if ( dqmStore_ ) {
251 
252  }
253 
254  init_ = false;
255 
256 }
DQMStore * dqmStore_
void ESIntegrityTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 258 of file ESIntegrityTask.cc.

References edm::cleanup().

258  {
259 
260  LogInfo("ESIntegrityTask") << "analyzed " << ievt_ << " events";
261 
262  if ( enableCleanup_ ) this->cleanup();
263 
264 }
void cleanup(void)
Cleanup.
void ESIntegrityTask::endLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup c 
)
protectedvirtual

End Lumi.

Reimplemented from edm::EDAnalyzer.

Definition at line 124 of file ESIntegrityTask.cc.

124  {
126 }
void calculateDIFraction(void)
Calculate Data Integrity Fraction.
void ESIntegrityTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 95 of file ESIntegrityTask.cc.

References i, and j.

95  {
96  // In case of Lumi based analysis Disable SoftReset from Integrity histogram to get full statistics
97  if (doLumiAnalysis_) {
98  for (int i=0; i<2; ++i) {
99  for (int j=0; j<2; ++j) {
100  if (meDIErrors_[i][j]) {
102  }
103  }
104  }
105  }
106 }
int i
Definition: DBlmapReader.cc:9
void disableSoftReset(MonitorElement *me)
Definition: DQMStore.cc:2942
MonitorElement * meDIErrors_[2][2]
int j
Definition: DBlmapReader.cc:9
DQMStore * dqmStore_
void ESIntegrityTask::reset ( void  )
protected

Reset.

Definition at line 128 of file ESIntegrityTask.cc.

128  {
129  /*
130  if ( meFED_ ) meFED_->Reset();
131  if ( meGain_ ) meGain_->Reset();
132  if ( meDCCErr_ ) meDCCErr_->Reset();
133  if ( meOptoRX_ ) meOptoRX_->Reset();
134  if ( meOptoBC_ ) meOptoBC_->Reset();
135  if ( meFiberStatus_ ) meFiberStatus_->Reset();
136  if ( meKF1_ ) meKF1_->Reset();
137  if ( meKF2_ ) meKF2_->Reset();
138  if ( meKBC_ ) meKBC_->Reset();
139  if ( meKEC_ ) meKEC_->Reset();
140  */
141 }
void ESIntegrityTask::setup ( void  )
protected

Setup.

Definition at line 143 of file ESIntegrityTask.cc.

References timingPdfMaker::histo, i, and j.

143  {
144 
145  init_ = true;
146 
147  char histo[200];
148 
149  if (dqmStore_) {
150  dqmStore_->setCurrentFolder(prefixME_ + "/ESIntegrityTask");
151 
152  sprintf(histo, "ES FEDs used for data taking");
153  meFED_ = dqmStore_->book1D(histo, histo, 56, 519.5, 575.5);
154  meFED_->setAxisTitle("ES FED", 1);
155  meFED_->setAxisTitle("Num of Events", 2);
156 
157  sprintf(histo, "ES Gain used for data taking");
158  meGain_ = dqmStore_->book1D(histo, histo, 2, -0.5, 1.5);
159  meGain_->setAxisTitle("ES Gain", 1);
160  meGain_->setAxisTitle("Num of Events", 2);
161 
162  sprintf(histo, "ES DCC Error codes");
163  meDCCErr_ = dqmStore_->book2D(histo, histo, 56, 519.5, 575.5, 6, -0.5, 5.5);
164  meDCCErr_->setAxisTitle("ES FED", 1);
165  meDCCErr_->setAxisTitle("ES DCC Error code", 2);
166 
167  sprintf(histo, "ES SLink CRC Errors");
168  meSLinkCRCErr_ = dqmStore_->book1D(histo, histo, 56, 519.5, 575.5);
169  meSLinkCRCErr_->setAxisTitle("ES FED", 1);
170  meSLinkCRCErr_->setAxisTitle("Num of Events", 2);
171 
172  sprintf(histo, "ES DCC CRC Errors");
173  meDCCCRCErr_ = dqmStore_->book2D(histo, histo, 56, 519.5, 575.5, 3, -0.5, 2.5);
174  meDCCCRCErr_->setAxisTitle("ES FED", 1);
175  meDCCCRCErr_->setAxisTitle("ES OptoRX", 2);
176 
177  sprintf(histo, "ES OptoRX used for data taking");
178  meOptoRX_ = dqmStore_->book2D(histo, histo, 56, 519.5, 575.5, 3, -0.5, 2.5);
179  meOptoRX_->setAxisTitle("ES FED", 1);
180  meOptoRX_->setAxisTitle("ES OptoRX", 2);
181 
182  sprintf(histo, "ES OptoRX BC mismatch");
183  meOptoBC_ = dqmStore_->book2D(histo, histo, 56, 519.5, 575.5, 3, -0.5, 2.5);
184  meOptoBC_->setAxisTitle("ES FED", 1);
185  meOptoBC_->setAxisTitle("ES OptoRX", 2);
186 
187  sprintf(histo, "ES Fiber Bad Status");
188  meFiberBadStatus_ = dqmStore_->book2D(histo, histo, 56, 519.5, 575.5, 36, 0.5, 36.5);
189  meFiberBadStatus_->setAxisTitle("ES FED", 1);
190  meFiberBadStatus_->setAxisTitle("Fiber Number", 2);
191 
192  sprintf(histo, "ES Fiber Error Code");
193  meFiberErrCode_ = dqmStore_->book1D(histo, histo, 17, -0.5, 16.5);
194  meFiberErrCode_->setAxisTitle("Fiber Error Code", 1);
195 
196  sprintf(histo, "ES Fiber Off");
197 
198  meFiberOff_ = dqmStore_->book2D(histo, histo, 56, 519.5, 575.5, 36, 0.5, 36.5);
199  meFiberOff_->setAxisTitle("ES FED", 1);
200  meFiberOff_->setAxisTitle("Fiber Number", 2);
201 
202  sprintf(histo, "ES Warning Event Dropped");
203  meEVDR_ = dqmStore_->book2D(histo, histo, 56, 519.5, 575.5, 36, 0.5, 36.5);
204  meEVDR_->setAxisTitle("ES FED", 1);
205  meEVDR_->setAxisTitle("Fiber Number", 2);
206 
207  sprintf(histo, "ES KChip Flag 1 Error codes");
208  meKF1_ = dqmStore_->book2D(histo, histo, 1550, -0.5, 1549.5, 16, -0.5, 15.5);
209  meKF1_->setAxisTitle("ES KChip", 1);
210  meKF1_->setAxisTitle("ES KChip F1 Error Code ", 2);
211 
212  sprintf(histo, "ES KChip Flag 2 Error codes");
213  meKF2_ = dqmStore_->book2D(histo, histo, 1550, -0.5, 1549.5, 16, -0.5, 15.5);
214  meKF2_->setAxisTitle("ES KChip", 1);
215  meKF2_->setAxisTitle("ES KChip F1 Error Code ", 2);
216 
217  sprintf(histo, "ES KChip BC mismatch with OptoRX");
218  meKBC_ = dqmStore_->book1D(histo, histo, 1550, -0.5, 1549.5);
219  meKBC_->setAxisTitle("ES KChip", 1);
220  meKBC_->setAxisTitle("Num of BC mismatch", 2);
221 
222  sprintf(histo, "ES KChip EC mismatch with OptoRX");
223  meKEC_ = dqmStore_->book1D(histo, histo, 1550, -0.5, 1549.5);
224  meKEC_->setAxisTitle("ES KChip", 1);
225  meKEC_->setAxisTitle("Num of EC mismatch", 2);
226 
227  for (int i=0; i<2; ++i)
228  for (int j=0; j<2; ++j) {
229  int iz = (i==0)? 1:-1;
230  sprintf(histo, "ES Integrity Errors Z %d P %d", iz, j+1);
231  meDIErrors_[i][j] = dqmStore_->book2D(histo, histo, 40, 0.5, 40.5, 40, 0.5, 40.5);
232  meDIErrors_[i][j]->setAxisTitle("Si X", 1);
233  meDIErrors_[i][j]->setAxisTitle("Si Y", 2);
234  }
235 
236  if (doLumiAnalysis_) {
237  sprintf(histo, "ES Good Channel Fraction");
238  meDIFraction_ = dqmStore_->book2D(histo, histo, 3, 1.0, 3.0, 3, 1.0, 3.0);
240  }
241  }
242 
243 
244 }
MonitorElement * meGain_
int i
Definition: DBlmapReader.cc:9
MonitorElement * meDCCErr_
MonitorElement * meKEC_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
MonitorElement * meDIFraction_
MonitorElement * meDCCCRCErr_
MonitorElement * meFED_
MonitorElement * meFiberBadStatus_
MonitorElement * meFiberOff_
MonitorElement * meKF1_
MonitorElement * meDIErrors_[2][2]
MonitorElement * meOptoRX_
MonitorElement * meFiberErrCode_
int j
Definition: DBlmapReader.cc:9
std::string prefixME_
MonitorElement * meEVDR_
MonitorElement * meKF2_
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
MonitorElement * meSLinkCRCErr_
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
MonitorElement * meOptoBC_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
DQMStore * dqmStore_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
MonitorElement * meKBC_

Member Data Documentation

int ESIntegrityTask::dac_
private

Definition at line 91 of file ESIntegrityTask.h.

edm::EDGetTokenT<ESRawDataCollection> ESIntegrityTask::dccCollections_
private

Definition at line 66 of file ESIntegrityTask.h.

bool ESIntegrityTask::doLumiAnalysis_
private

Definition at line 94 of file ESIntegrityTask.h.

DQMStore* ESIntegrityTask::dqmStore_
private

Definition at line 59 of file ESIntegrityTask.h.

int ESIntegrityTask::eCount_
private

Definition at line 91 of file ESIntegrityTask.h.

bool ESIntegrityTask::enableCleanup_
private

Definition at line 63 of file ESIntegrityTask.h.

int ESIntegrityTask::fed_[2][2][40][40]
private

Definition at line 93 of file ESIntegrityTask.h.

int ESIntegrityTask::fiber_[2][2][40][40]
private

Definition at line 93 of file ESIntegrityTask.h.

int ESIntegrityTask::firstDAC_
private

Definition at line 92 of file ESIntegrityTask.h.

int ESIntegrityTask::gain_
private

Definition at line 91 of file ESIntegrityTask.h.

int ESIntegrityTask::ievt_
private

Definition at line 57 of file ESIntegrityTask.h.

bool ESIntegrityTask::init_
private

Definition at line 90 of file ESIntegrityTask.h.

int ESIntegrityTask::isPed_
private

Definition at line 92 of file ESIntegrityTask.h.

int ESIntegrityTask::kchip_[2][2][40][40]
private

Definition at line 93 of file ESIntegrityTask.h.

edm::EDGetTokenT<ESLocalRawDataCollection> ESIntegrityTask::kchipCollections_
private

Definition at line 67 of file ESIntegrityTask.h.

edm::FileInPath ESIntegrityTask::lookup_
private

Definition at line 88 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meDCCCRCErr_
private

Definition at line 73 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meDCCErr_
private

Definition at line 72 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meDIErrors_[2][2]
private

Definition at line 84 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meDIErrorsLS_[2][2]
private

Definition at line 85 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meDIFraction_
private

Definition at line 86 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meEVDR_
private

Definition at line 79 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meFED_
private

Definition at line 70 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meFiberBadStatus_
private

Definition at line 76 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meFiberErrCode_
private

Definition at line 77 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meFiberOff_
private

Definition at line 78 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meGain_
private

Definition at line 69 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meKBC_
private

Definition at line 82 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meKEC_
private

Definition at line 83 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meKF1_
private

Definition at line 80 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meKF2_
private

Definition at line 81 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meOptoBC_
private

Definition at line 75 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meOptoRX_
private

Definition at line 74 of file ESIntegrityTask.h.

bool ESIntegrityTask::mergeRuns_
private

Definition at line 64 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meSLinkCRCErr_
private

Definition at line 71 of file ESIntegrityTask.h.

int ESIntegrityTask::nDAC_
private

Definition at line 92 of file ESIntegrityTask.h.

int ESIntegrityTask::precision_
private

Definition at line 91 of file ESIntegrityTask.h.

std::string ESIntegrityTask::prefixME_
private

Definition at line 61 of file ESIntegrityTask.h.

int ESIntegrityTask::runNum_
private

Definition at line 91 of file ESIntegrityTask.h.

int ESIntegrityTask::runtype_
private

Definition at line 91 of file ESIntegrityTask.h.

int ESIntegrityTask::seqtype_
private

Definition at line 91 of file ESIntegrityTask.h.

int ESIntegrityTask::vDAC_[5]
private

Definition at line 92 of file ESIntegrityTask.h.