CMS 3D CMS Logo

compareBitCounts.cc
Go to the documentation of this file.
4 
7  const GctErrorAnalyzerMBxInfo &mbxparams)
8  : data_(data), emu_(emu), mbxparams_(mbxparams) {}
9 
11  //anything need to be destructed?
12 }
13 
14 bool compareBitCounts::doCompare(TH1I *errorFlag_hist_) {
15  bool errorFlag = false;
16 
17  for (unsigned int i = 0; i < data_->size(); i++) {
18  //check that we are looking at the triggered Bx in the data
19  if (data_->at(i).bx() != mbxparams_.GCTTrigBx)
20  continue;
21 
22  for (unsigned int j = 0; j < emu_->size(); j++) {
23  //now check that we are looking at the corresponding triggered Bx in the emulator
24  if (emu_->at(j).bx() != mbxparams_.EmuTrigBx)
25  continue;
26 
27  for (unsigned int k = 0; k < NUM_GCT_RINGS; k++) {
28  //now that we are on the right Bxs for data and emulator, check all the ring bitcounts match
29  if (data_->at(i).bitCount(k) == emu_->at(j).bitCount(k)) {
30  errorFlag_hist_->Fill(0); //i.e. the two match
31  } else {
32  errorFlag_hist_->Fill(1);
33  errorFlag = true;
34  }
35  }
36  }
37  }
38 
39  return errorFlag;
40 }
GctErrorAnalyzerMBxInfo mbxparams_
compareBitCounts(const edm::Handle< L1GctHFBitCountsCollection > &data, const edm::Handle< L1GctHFBitCountsCollection > &emu, const GctErrorAnalyzerMBxInfo &mbxparams)
edm::Handle< L1GctHFBitCountsCollection > emu_
const unsigned int NUM_GCT_RINGS
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
edm::Handle< L1GctHFBitCountsCollection > data_
bool doCompare(TH1I *errorFlag_hist_)