CMS 3D CMS Logo

compareBitCounts.cc
Go to the documentation of this file.
4 
7 
10 
12 
14 
15 #include "FWCore/ServiceRegistry/interface/Service.h" // Framework services
16 #include "CommonTools/UtilAlgos/interface/TFileService.h" // Framework service for histograms
17 
20  const GctErrorAnalyzerMBxInfo &mbxparams)
21  : data_(data), emu_(emu), mbxparams_(mbxparams) {}
22 
24  //anything need to be destructed?
25 }
26 
27 bool compareBitCounts::doCompare(TH1I *errorFlag_hist_) {
28  bool errorFlag = false;
29 
30  for (unsigned int i = 0; i < data_->size(); i++) {
31  //check that we are looking at the triggered Bx in the data
32  if (data_->at(i).bx() != mbxparams_.GCTTrigBx)
33  continue;
34 
35  for (unsigned int j = 0; j < emu_->size(); j++) {
36  //now check that we are looking at the corresponding triggered Bx in the emulator
37  if (emu_->at(j).bx() != mbxparams_.EmuTrigBx)
38  continue;
39 
40  for (unsigned int k = 0; k < NUM_GCT_RINGS; k++) {
41  //now that we are on the right Bxs for data and emulator, check all the ring bitcounts match
42  if (data_->at(i).bitCount(k) == emu_->at(j).bitCount(k)) {
43  errorFlag_hist_->Fill(0); //i.e. the two match
44  } else {
45  errorFlag_hist_->Fill(1);
46  errorFlag = true;
47  }
48  }
49  }
50  }
51 
52  return errorFlag;
53 }
mps_fire.i
i
Definition: mps_fire.py:355
L1GctCollections.h
compareBitCounts::compareBitCounts
compareBitCounts(const edm::Handle< L1GctHFBitCountsCollection > &data, const edm::Handle< L1GctHFBitCountsCollection > &emu, const GctErrorAnalyzerMBxInfo &mbxparams)
Definition: compareBitCounts.cc:18
NUM_GCT_RINGS
const unsigned int NUM_GCT_RINGS
Definition: GctErrorAnalyzerDefinitions.h:10
EDAnalyzer.h
edm::Handle< L1GctHFBitCountsCollection >
compareBitCounts::emu_
edm::Handle< L1GctHFBitCountsCollection > emu_
Definition: compareBitCounts.h:33
compareBitCounts::mbxparams_
GctErrorAnalyzerMBxInfo mbxparams_
Definition: compareBitCounts.h:34
MakerMacros.h
compareBitCounts.h
Service.h
dqmdumpme.k
k
Definition: dqmdumpme.py:60
TFileService.h
Event.h
compareBitCounts::~compareBitCounts
~compareBitCounts()
Definition: compareBitCounts.cc:23
L1CaloCollections.h
GctErrorAnalyzerMBxInfo::GCTTrigBx
int GCTTrigBx
Definition: GctErrorAnalyzerDefinitions.h:16
compareBitCounts::doCompare
bool doCompare(TH1I *errorFlag_hist_)
Definition: compareBitCounts.cc:27
InputTag.h
GctErrorAnalyzerMBxInfo::EmuTrigBx
int EmuTrigBx
Definition: GctErrorAnalyzerDefinitions.h:15
Frameworkfwd.h
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
ParameterSet.h
GctErrorAnalyzerMBxInfo
Definition: GctErrorAnalyzerDefinitions.h:13
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
compareBitCounts::data_
edm::Handle< L1GctHFBitCountsCollection > data_
Definition: compareBitCounts.h:33