CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
< L1GctHFBitCountsCollection
data_
 
edm::Handle
< L1GctHFBitCountsCollection
emu_
 
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.

18  :
19  data_(data),
20  emu_(emu),
21  mbxparams_(mbxparams)
22 {
23 
24 }
GctErrorAnalyzerMBxInfo mbxparams_
edm::Handle< L1GctHFBitCountsCollection > emu_
edm::Handle< L1GctHFBitCountsCollection > data_
compareBitCounts::~compareBitCounts ( )

Definition at line 26 of file compareBitCounts.cc.

26  {
27  //anything need to be destructed?
28 }

Member Function Documentation

bool compareBitCounts::doCompare ( TH1I *  errorFlag_hist_)

Definition at line 30 of file compareBitCounts.cc.

References data_, emu_, GctErrorAnalyzerMBxInfo::EmuTrigBx, GctErrorAnalyzerMBxInfo::GCTTrigBx, i, j, relval_2017::k, mbxparams_, and NUM_GCT_RINGS.

Referenced by GctErrorAnalyzer::analyze().

30  {
31 
32  bool errorFlag=0;
33 
34  for(unsigned int i=0;i < data_->size(); i++) {
35  //check that we are looking at the triggered Bx in the data
36  if(data_->at(i).bx() != mbxparams_.GCTTrigBx) continue;
37 
38  for(unsigned int j=0; j < emu_->size(); j++) {
39  //now check that we are looking at the corresponding triggered Bx in the emulator
40  if(emu_->at(j).bx() != mbxparams_.EmuTrigBx) continue;
41 
42  for(unsigned int k=0; k < NUM_GCT_RINGS; k++) {
43  //now that we are on the right Bxs for data and emulator, check all the ring bitcounts match
44  if(data_->at(i).bitCount(k) == emu_->at(j).bitCount(k)) {
45  errorFlag_hist_->Fill(0); //i.e. the two match
46  } else {
47  errorFlag_hist_->Fill(1);
48  errorFlag=1;
49  }
50  }
51  }
52  }
53 
54  return errorFlag;
55 
56 }
int i
Definition: DBlmapReader.cc:9
GctErrorAnalyzerMBxInfo mbxparams_
edm::Handle< L1GctHFBitCountsCollection > emu_
int j
Definition: DBlmapReader.cc:9
const unsigned int NUM_GCT_RINGS
edm::Handle< L1GctHFBitCountsCollection > data_

Member Data Documentation

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

Definition at line 31 of file compareBitCounts.h.

Referenced by doCompare().

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

Definition at line 31 of file compareBitCounts.h.

Referenced by doCompare().

GctErrorAnalyzerMBxInfo compareBitCounts::mbxparams_
private

Definition at line 32 of file compareBitCounts.h.

Referenced by doCompare().