CMS 3D CMS Logo

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

#include <CTPPSDiamondDigi.h>

Public Member Functions

 CTPPSDiamondDigi ()
 
 CTPPSDiamondDigi (unsigned int ledgt_, unsigned int tedgt_, unsigned int threvolt, bool mhit_, unsigned short hptdcerror_)
 
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_)) {}

◆ 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)) {}

◆ ~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.

36 { return hptdcerror; }

References hptdcerror.

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

◆ leadingEdge()

unsigned int CTPPSDiamondDigi::leadingEdge ( ) const
inline

Return digi values number.

Definition at line 28 of file CTPPSDiamondDigi.h.

28 { return ledgt; }

References ledgt.

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

◆ multipleHit()

bool CTPPSDiamondDigi::multipleHit ( ) const
inline

Definition at line 34 of file CTPPSDiamondDigi.h.

34 { return mhit; }

References mhit.

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

◆ 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.

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 }

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

◆ setHPTDCErrorFlags()

void CTPPSDiamondDigi::setHPTDCErrorFlags ( const HPTDCErrorFlags hptdcerror_)
inline

Definition at line 43 of file CTPPSDiamondDigi.h.

43 { hptdcerror = hptdcerror_; }

References hptdcerror.

◆ setLeadingEdge()

void CTPPSDiamondDigi::setLeadingEdge ( unsigned int  ledgt_)
inline

Set digi values.

Definition at line 39 of file CTPPSDiamondDigi.h.

39 { ledgt = ledgt_; }

References ledgt.

◆ setMultipleHit()

void CTPPSDiamondDigi::setMultipleHit ( bool  mhit_)
inline

Definition at line 42 of file CTPPSDiamondDigi.h.

42 { mhit = mhit_; }

References mhit.

◆ setThresholdVoltage()

void CTPPSDiamondDigi::setThresholdVoltage ( unsigned int  threvolt_)
inline

Definition at line 41 of file CTPPSDiamondDigi.h.

41 { threvolt = threvolt_; }

References threvolt.

◆ setTrailingEdge()

void CTPPSDiamondDigi::setTrailingEdge ( unsigned int  tedgt_)
inline

Definition at line 40 of file CTPPSDiamondDigi.h.

40 { tedgt = tedgt_; }

References tedgt.

◆ thresholdVoltage()

unsigned int CTPPSDiamondDigi::thresholdVoltage ( ) const
inline

Definition at line 32 of file CTPPSDiamondDigi.h.

32 { return threvolt; }

References threvolt.

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

◆ trailingEdge()

unsigned int CTPPSDiamondDigi::trailingEdge ( ) const
inline

Definition at line 30 of file CTPPSDiamondDigi.h.

30 { return tedgt; }

References tedgt.

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

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().

CTPPSDiamondDigi::tedgt
unsigned int tedgt
Definition: CTPPSDiamondDigi.h:49
CTPPSDiamondDigi::mhit
bool mhit
Definition: CTPPSDiamondDigi.h:53
HPTDCErrorFlags::errorFlag
unsigned short errorFlag() const
Definition: HPTDCErrorFlags.h:72
CTPPSDiamondDigi::threvolt
unsigned int threvolt
Definition: CTPPSDiamondDigi.h:51
CTPPSDiamondDigi::multipleHit
bool multipleHit() const
Definition: CTPPSDiamondDigi.h:34
HPTDCErrorFlags
Definition: HPTDCErrorFlags.h:15
CTPPSDiamondDigi::thresholdVoltage
unsigned int thresholdVoltage() const
Definition: CTPPSDiamondDigi.h:32
CTPPSDiamondDigi::leadingEdge
unsigned int leadingEdge() const
Return digi values number.
Definition: CTPPSDiamondDigi.h:28
CTPPSDiamondDigi::ledgt
unsigned int ledgt
Definition: CTPPSDiamondDigi.h:47
CTPPSDiamondDigi::trailingEdge
unsigned int trailingEdge() const
Definition: CTPPSDiamondDigi.h:30
CTPPSDiamondDigi::hptdcerror
HPTDCErrorFlags hptdcerror
Definition: CTPPSDiamondDigi.h:54
CTPPSDiamondDigi::hptdcErrorFlags
HPTDCErrorFlags hptdcErrorFlags() const
Definition: CTPPSDiamondDigi.h:36