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 15 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 5 of file compareBitCounts.cc.

8  : data_(data), emu_(emu), mbxparams_(mbxparams) {}
GctErrorAnalyzerMBxInfo mbxparams_
edm::Handle< L1GctHFBitCountsCollection > emu_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
edm::Handle< L1GctHFBitCountsCollection > data_

◆ ~compareBitCounts()

compareBitCounts::~compareBitCounts ( )

Definition at line 10 of file compareBitCounts.cc.

10  {
11  //anything need to be destructed?
12 }

Member Function Documentation

◆ doCompare()

bool compareBitCounts::doCompare ( TH1I *  errorFlag_hist_)

Definition at line 14 of file compareBitCounts.cc.

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

Referenced by GctErrorAnalyzer::analyze().

14  {
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_
edm::Handle< L1GctHFBitCountsCollection > emu_
const unsigned int NUM_GCT_RINGS
edm::Handle< L1GctHFBitCountsCollection > data_

Member Data Documentation

◆ data_

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

Definition at line 25 of file compareBitCounts.h.

Referenced by doCompare().

◆ emu_

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

Definition at line 25 of file compareBitCounts.h.

Referenced by doCompare().

◆ mbxparams_

GctErrorAnalyzerMBxInfo compareBitCounts::mbxparams_
private

Definition at line 26 of file compareBitCounts.h.

Referenced by doCompare().