CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
compareBitCounts Class Reference

#include <compareBitCounts.h>

Public Member Functions

 compareBitCounts (const edm::Handle< L1GctHFBitCountsCollection > &data, const edm::Handle< L1GctHFBitCountsCollection > &emu, const GctErrorAnalyzerMBxInfo &mbxparams)
 
bool doCompare (TH1I *errorFlag_hist_)
 
 ~compareBitCounts ()
 

Private Attributes

edm::Handle< L1GctHFBitCountsCollectiondata_
 
edm::Handle< L1GctHFBitCountsCollectionemu_
 
GctErrorAnalyzerMBxInfo mbxparams_
 

Detailed Description

Definition at line 23 of file compareBitCounts.h.

Constructor & Destructor Documentation

◆ compareBitCounts()

compareBitCounts::compareBitCounts ( const edm::Handle< L1GctHFBitCountsCollection > &  data,
const edm::Handle< L1GctHFBitCountsCollection > &  emu,
const GctErrorAnalyzerMBxInfo mbxparams 
)

Definition at line 18 of file compareBitCounts.cc.

21  : data_(data), emu_(emu), mbxparams_(mbxparams) {}

◆ ~compareBitCounts()

compareBitCounts::~compareBitCounts ( )

Definition at line 23 of file compareBitCounts.cc.

23  {
24  //anything need to be destructed?
25 }

Member Function Documentation

◆ doCompare()

bool compareBitCounts::doCompare ( TH1I *  errorFlag_hist_)

Definition at line 27 of file compareBitCounts.cc.

27  {
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 }

References data_, emu_, GctErrorAnalyzerMBxInfo::EmuTrigBx, GctErrorAnalyzerMBxInfo::GCTTrigBx, mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, mbxparams_, and NUM_GCT_RINGS.

Referenced by GctErrorAnalyzer::analyze().

Member Data Documentation

◆ data_

edm::Handle<L1GctHFBitCountsCollection> compareBitCounts::data_
private

Definition at line 33 of file compareBitCounts.h.

Referenced by doCompare().

◆ emu_

edm::Handle<L1GctHFBitCountsCollection> compareBitCounts::emu_
private

Definition at line 33 of file compareBitCounts.h.

Referenced by doCompare().

◆ mbxparams_

GctErrorAnalyzerMBxInfo compareBitCounts::mbxparams_
private

Definition at line 34 of file compareBitCounts.h.

Referenced by doCompare().

mps_fire.i
i
Definition: mps_fire.py:355
NUM_GCT_RINGS
const unsigned int NUM_GCT_RINGS
Definition: GctErrorAnalyzerDefinitions.h:10
compareBitCounts::emu_
edm::Handle< L1GctHFBitCountsCollection > emu_
Definition: compareBitCounts.h:33
compareBitCounts::mbxparams_
GctErrorAnalyzerMBxInfo mbxparams_
Definition: compareBitCounts.h:34
dqmdumpme.k
k
Definition: dqmdumpme.py:60
GctErrorAnalyzerMBxInfo::GCTTrigBx
int GCTTrigBx
Definition: GctErrorAnalyzerDefinitions.h:16
GctErrorAnalyzerMBxInfo::EmuTrigBx
int EmuTrigBx
Definition: GctErrorAnalyzerDefinitions.h:15
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
compareBitCounts::data_
edm::Handle< L1GctHFBitCountsCollection > data_
Definition: compareBitCounts.h:33