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 ( 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) {}
GctErrorAnalyzerMBxInfo mbxparams_
edm::Handle< L1GctHFBitCountsCollection > emu_
edm::Handle< L1GctHFBitCountsCollection > data_
compareBitCounts::~compareBitCounts ( )

Definition at line 23 of file compareBitCounts.cc.

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

Member Function Documentation

bool compareBitCounts::doCompare ( TH1I *  errorFlag_hist_)

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

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 }
GctErrorAnalyzerMBxInfo mbxparams_
edm::Handle< L1GctHFBitCountsCollection > emu_
const unsigned int NUM_GCT_RINGS
edm::Handle< L1GctHFBitCountsCollection > data_

Member Data Documentation

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

Definition at line 33 of file compareBitCounts.h.

Referenced by doCompare().

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

Definition at line 33 of file compareBitCounts.h.

Referenced by doCompare().

GctErrorAnalyzerMBxInfo compareBitCounts::mbxparams_
private

Definition at line 34 of file compareBitCounts.h.

Referenced by doCompare().