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
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze. More...
 
void beginJob (void)
 BeginJob. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Attributes

int dac_
 
edm::InputTag 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::InputTag 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
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 11 of file ESIntegrityTask.h.

Constructor & Destructor Documentation

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

Definition at line 27 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.

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

75  {
76 }

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 267 of file ESIntegrityTask.cc.

References ESDCCHeaderBlock::fedId(), sistrip::extrainfo::gain_, ESKCHIPBlock::getBC(), ESDCCHeaderBlock::getBX(), edm::Event::getByLabel(), 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().

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

78  {
79 
80  ievt_ = 0;
81 
82  if ( dqmStore_ ) {
83  dqmStore_->setCurrentFolder(prefixME_ + "/ESIntegrityTask");
84  dqmStore_->rmdir(prefixME_ + "/ESIntegrityTask");
85  }
86 
87 }
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2535
std::string prefixME_
DQMStore * dqmStore_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void ESIntegrityTask::beginLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup c 
)
protectedvirtual

Begin Lumi.

Reimplemented from edm::EDAnalyzer.

Definition at line 109 of file ESIntegrityTask.cc.

References i, and j.

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

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 89 of file ESIntegrityTask.cc.

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

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

Calculate Data Integrity Fraction.

Definition at line 395 of file ESIntegrityTask.cc.

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

395  {
396 
397  float nValidChannels=0;
398  float nGlobalErrors=0;
399 
400  for (int i=0; i<2; ++i) {
401  for (int j=0; j<2; ++j) {
402  float nValidChannelsES=0;
403  float nGlobalErrorsES = 0;
404  float reportSummaryES = -1;
405  if (!meDIErrors_[i][j]) continue;
406  for (int x=0; x<40; ++x) {
407  for (int y=0; y<40; ++y) {
408  float val = meDIErrors_[i][j]->getBinContent(x+1, y+1);
409  if (fed_[i][j][x][y] == -1) continue;
410  if (ievt_ != 0) nGlobalErrors += val/ievt_;
411  nValidChannels++;
412  if (ievt_ != 0) nGlobalErrorsES += val/ievt_;
413  nValidChannelsES++;
414  }
415  }
416  if (nValidChannelsES != 0) reportSummaryES = 1 - nGlobalErrorsES/nValidChannelsES;
417  meDIFraction_->setBinContent(i+1, j+1, reportSummaryES);
418  }
419  }
420  float reportSummary = -1.0;
421  if (nValidChannels != 0) reportSummary = 1.0 - nGlobalErrors/nValidChannels;
422  meDIFraction_->setBinContent(3,3, reportSummary);
423 }
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 247 of file ESIntegrityTask.cc.

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

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 259 of file ESIntegrityTask.cc.

References edm::cleanup().

259  {
260 
261  LogInfo("ESIntegrityTask") << "analyzed " << ievt_ << " events";
262 
263  if ( enableCleanup_ ) this->cleanup();
264 
265 }
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 125 of file ESIntegrityTask.cc.

125  {
127 }
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 96 of file ESIntegrityTask.cc.

References i, and j.

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

Reset.

Definition at line 129 of file ESIntegrityTask.cc.

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

Setup.

Definition at line 144 of file ESIntegrityTask.cc.

References timingPdfMaker::histo, i, and j.

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

Member Data Documentation

int ESIntegrityTask::dac_
private

Definition at line 89 of file ESIntegrityTask.h.

edm::InputTag ESIntegrityTask::dccCollections_
private

Definition at line 64 of file ESIntegrityTask.h.

bool ESIntegrityTask::doLumiAnalysis_
private

Definition at line 92 of file ESIntegrityTask.h.

DQMStore* ESIntegrityTask::dqmStore_
private

Definition at line 57 of file ESIntegrityTask.h.

int ESIntegrityTask::eCount_
private

Definition at line 89 of file ESIntegrityTask.h.

bool ESIntegrityTask::enableCleanup_
private

Definition at line 61 of file ESIntegrityTask.h.

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

Definition at line 91 of file ESIntegrityTask.h.

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

Definition at line 91 of file ESIntegrityTask.h.

int ESIntegrityTask::firstDAC_
private

Definition at line 90 of file ESIntegrityTask.h.

int ESIntegrityTask::gain_
private

Definition at line 89 of file ESIntegrityTask.h.

int ESIntegrityTask::ievt_
private

Definition at line 55 of file ESIntegrityTask.h.

bool ESIntegrityTask::init_
private

Definition at line 88 of file ESIntegrityTask.h.

int ESIntegrityTask::isPed_
private

Definition at line 90 of file ESIntegrityTask.h.

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

Definition at line 91 of file ESIntegrityTask.h.

edm::InputTag ESIntegrityTask::kchipCollections_
private

Definition at line 65 of file ESIntegrityTask.h.

edm::FileInPath ESIntegrityTask::lookup_
private

Definition at line 86 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meDCCCRCErr_
private

Definition at line 71 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meDCCErr_
private

Definition at line 70 of file ESIntegrityTask.h.

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

Definition at line 82 of file ESIntegrityTask.h.

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

Definition at line 83 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meDIFraction_
private

Definition at line 84 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meEVDR_
private

Definition at line 77 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meFED_
private

Definition at line 68 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meFiberBadStatus_
private

Definition at line 74 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meFiberErrCode_
private

Definition at line 75 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meFiberOff_
private

Definition at line 76 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meGain_
private

Definition at line 67 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meKBC_
private

Definition at line 80 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meKEC_
private

Definition at line 81 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meKF1_
private

Definition at line 78 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meKF2_
private

Definition at line 79 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meOptoBC_
private

Definition at line 73 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meOptoRX_
private

Definition at line 72 of file ESIntegrityTask.h.

bool ESIntegrityTask::mergeRuns_
private

Definition at line 62 of file ESIntegrityTask.h.

MonitorElement* ESIntegrityTask::meSLinkCRCErr_
private

Definition at line 69 of file ESIntegrityTask.h.

int ESIntegrityTask::nDAC_
private

Definition at line 90 of file ESIntegrityTask.h.

int ESIntegrityTask::precision_
private

Definition at line 89 of file ESIntegrityTask.h.

std::string ESIntegrityTask::prefixME_
private

Definition at line 59 of file ESIntegrityTask.h.

int ESIntegrityTask::runNum_
private

Definition at line 89 of file ESIntegrityTask.h.

int ESIntegrityTask::runtype_
private

Definition at line 89 of file ESIntegrityTask.h.

int ESIntegrityTask::seqtype_
private

Definition at line 89 of file ESIntegrityTask.h.

int ESIntegrityTask::vDAC_[5]
private

Definition at line 90 of file ESIntegrityTask.h.