CMS 3D CMS Logo

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

#include <CTPPSDiamondDigi.h>

Public Member Functions

 CTPPSDiamondDigi (unsigned int ledgt_, unsigned int tedgt_, unsigned int threvolt, bool mhit_, unsigned short hptdcerror_)
 
 CTPPSDiamondDigi ()
 
HPTDCErrorFlags hptdcErrorFlags () const
 
unsigned int leadingEdge () const
 Return digi values number. More...
 
bool multipleHit () const
 
bool operator== (const CTPPSDiamondDigi &digi) const
 Digis are equal if they are have same ledt and tedt, threshold voltage, multihit flag, hptdcerror flags. More...
 
void setHPTDCErrorFlags (const HPTDCErrorFlags &hptdcerror_)
 
void setLeadingEdge (unsigned int ledgt_)
 Set digi values. More...
 
void setMultipleHit (bool mhit_)
 
void setThresholdVoltage (unsigned int threvolt_)
 
void setTrailingEdge (unsigned int tedgt_)
 
unsigned int thresholdVoltage () const
 
unsigned int trailingEdge () const
 
 ~CTPPSDiamondDigi ()
 

Private Attributes

HPTDCErrorFlags hptdcerror
 
unsigned int ledgt
 
bool mhit
 
unsigned int tedgt
 
unsigned int threvolt
 

Detailed Description

Digi Class for CTPPS Timing Detector

Author
Seyed Mohsen Etesami March 2016

Definition at line 16 of file CTPPSDiamondDigi.h.

Constructor & Destructor Documentation

◆ CTPPSDiamondDigi() [1/2]

CTPPSDiamondDigi::CTPPSDiamondDigi ( unsigned int  ledgt_,
unsigned int  tedgt_,
unsigned int  threvolt,
bool  mhit_,
unsigned short  hptdcerror_ 
)

Definition at line 11 of file CTPPSDiamondDigi.cc.

13  : ledgt(ledgt_), tedgt(tedgt_), threvolt(threvolt_), mhit(mhit_), hptdcerror(HPTDCErrorFlags(hptdcerror_)) {}
unsigned int ledgt
unsigned int tedgt
unsigned int threvolt
HPTDCErrorFlags hptdcerror

◆ CTPPSDiamondDigi() [2/2]

CTPPSDiamondDigi::CTPPSDiamondDigi ( )

Definition at line 15 of file CTPPSDiamondDigi.cc.

15 : ledgt(0), tedgt(0), threvolt(0), mhit(false), hptdcerror(HPTDCErrorFlags(0)) {}
unsigned int ledgt
unsigned int tedgt
unsigned int threvolt
HPTDCErrorFlags hptdcerror

◆ ~CTPPSDiamondDigi()

CTPPSDiamondDigi::~CTPPSDiamondDigi ( )
inline

Definition at line 21 of file CTPPSDiamondDigi.h.

21 {};

Member Function Documentation

◆ hptdcErrorFlags()

HPTDCErrorFlags CTPPSDiamondDigi::hptdcErrorFlags ( ) const
inline

Definition at line 36 of file CTPPSDiamondDigi.h.

References hptdcerror.

Referenced by operator<<(), and operator==().

36 { return hptdcerror; }
HPTDCErrorFlags hptdcerror

◆ leadingEdge()

unsigned int CTPPSDiamondDigi::leadingEdge ( ) const
inline

Return digi values number.

Definition at line 28 of file CTPPSDiamondDigi.h.

References ledgt.

Referenced by operator<<(), and operator==().

28 { return ledgt; }
unsigned int ledgt

◆ multipleHit()

bool CTPPSDiamondDigi::multipleHit ( ) const
inline

Definition at line 34 of file CTPPSDiamondDigi.h.

References mhit.

Referenced by operator<<(), and operator==().

34 { return mhit; }

◆ operator==()

bool CTPPSDiamondDigi::operator== ( const CTPPSDiamondDigi digi) const

Digis are equal if they are have same ledt and tedt, threshold voltage, multihit flag, hptdcerror flags.

Definition at line 18 of file CTPPSDiamondDigi.cc.

References HPTDCErrorFlags::errorFlag(), hptdcerror, hptdcErrorFlags(), leadingEdge(), ledgt, mhit, multipleHit(), tedgt, thresholdVoltage(), threvolt, and trailingEdge().

18  {
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
unsigned int tedgt
HPTDCErrorFlags hptdcErrorFlags() const
unsigned int threvolt
HPTDCErrorFlags hptdcerror
bool multipleHit() const

◆ setHPTDCErrorFlags()

void CTPPSDiamondDigi::setHPTDCErrorFlags ( const HPTDCErrorFlags hptdcerror_)
inline

Definition at line 43 of file CTPPSDiamondDigi.h.

References hptdcerror.

43 { hptdcerror = hptdcerror_; }
HPTDCErrorFlags hptdcerror

◆ setLeadingEdge()

void CTPPSDiamondDigi::setLeadingEdge ( unsigned int  ledgt_)
inline

Set digi values.

Definition at line 39 of file CTPPSDiamondDigi.h.

References ledgt.

39 { ledgt = ledgt_; }
unsigned int ledgt

◆ setMultipleHit()

void CTPPSDiamondDigi::setMultipleHit ( bool  mhit_)
inline

Definition at line 42 of file CTPPSDiamondDigi.h.

References mhit.

42 { mhit = mhit_; }

◆ setThresholdVoltage()

void CTPPSDiamondDigi::setThresholdVoltage ( unsigned int  threvolt_)
inline

Definition at line 41 of file CTPPSDiamondDigi.h.

References threvolt.

41 { threvolt = threvolt_; }
unsigned int threvolt

◆ setTrailingEdge()

void CTPPSDiamondDigi::setTrailingEdge ( unsigned int  tedgt_)
inline

Definition at line 40 of file CTPPSDiamondDigi.h.

References tedgt.

40 { tedgt = tedgt_; }
unsigned int tedgt

◆ thresholdVoltage()

unsigned int CTPPSDiamondDigi::thresholdVoltage ( ) const
inline

Definition at line 32 of file CTPPSDiamondDigi.h.

References threvolt.

Referenced by operator<<(), and operator==().

32 { return threvolt; }
unsigned int threvolt

◆ trailingEdge()

unsigned int CTPPSDiamondDigi::trailingEdge ( ) const
inline

Definition at line 30 of file CTPPSDiamondDigi.h.

References tedgt.

Referenced by operator<<(), and operator==().

30 { return tedgt; }
unsigned int tedgt

Member Data Documentation

◆ hptdcerror

HPTDCErrorFlags CTPPSDiamondDigi::hptdcerror
private

Definition at line 54 of file CTPPSDiamondDigi.h.

Referenced by hptdcErrorFlags(), operator==(), and setHPTDCErrorFlags().

◆ ledgt

unsigned int CTPPSDiamondDigi::ledgt
private

Definition at line 47 of file CTPPSDiamondDigi.h.

Referenced by leadingEdge(), operator==(), and setLeadingEdge().

◆ mhit

bool CTPPSDiamondDigi::mhit
private

Definition at line 53 of file CTPPSDiamondDigi.h.

Referenced by multipleHit(), operator==(), and setMultipleHit().

◆ tedgt

unsigned int CTPPSDiamondDigi::tedgt
private

Definition at line 49 of file CTPPSDiamondDigi.h.

Referenced by operator==(), setTrailingEdge(), and trailingEdge().

◆ threvolt

unsigned int CTPPSDiamondDigi::threvolt
private

Definition at line 51 of file CTPPSDiamondDigi.h.

Referenced by operator==(), setThresholdVoltage(), and thresholdVoltage().