CMS 3D CMS Logo

CTPPSDiamondDigi.cc
Go to the documentation of this file.
1 
8 
9 using namespace std;
10 
12  unsigned int ledgt_, unsigned int tedgt_, unsigned int threvolt_, bool mhit_, unsigned short hptdcerror_)
13  : ledgt(ledgt_), tedgt(tedgt_), threvolt(threvolt_), mhit(mhit_), hptdcerror(HPTDCErrorFlags(hptdcerror_)) {}
14 
15 CTPPSDiamondDigi::CTPPSDiamondDigi() : ledgt(0), tedgt(0), threvolt(0), mhit(false), hptdcerror(HPTDCErrorFlags(0)) {}
16 
17 // Comparison
19  if (ledgt != digi.leadingEdge() || tedgt != digi.trailingEdge() || threvolt != digi.thresholdVoltage() ||
20  mhit != digi.multipleHit() || hptdcerror.errorFlag() != digi.hptdcErrorFlags().errorFlag())
21  return false;
22  else
23  return true;
24 }
unsigned int thresholdVoltage() const
unsigned int leadingEdge() const
Return digi values number.
unsigned int trailingEdge() const
unsigned int ledgt
unsigned short errorFlag() const
bool operator==(const CTPPSDiamondDigi &digi) const
Digis are equal if they are have same ledt and tedt, threshold voltage, multihit flag, hptdcerror flags.
unsigned int tedgt
HPTDCErrorFlags hptdcErrorFlags() const
unsigned int threvolt
HPTDCErrorFlags hptdcerror
bool multipleHit() const