CMS 3D CMS Logo

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

#include <TotemTimingEventInfo.h>

Public Member Functions

unsigned int getBunchNumber () const
 
uint16_t getChannelMap () const
 
unsigned int getEventNumber () const
 
unsigned int getHardwareBoardId () const
 
unsigned int getHardwareChannelId () const
 
unsigned int getHardwareId () const
 Return digi values number. More...
 
unsigned int getHardwareSampicId () const
 
unsigned int getL1ALatency () const
 
unsigned int getL1ATimestamp () const
 
unsigned int getNumberOfSamples () const
 
unsigned int getOffsetOfSamples () const
 
unsigned int getOrbitNumber () const
 
uint8_t getPLLInfo () const
 
bool operator== (const TotemTimingEventInfo &eventInfo) const
 Digis are equal if they have all the same values, NOT checking the samples! More...
 
void setBunchNumber (const uint16_t bunchNumber)
 
void setChannelMap (const uint16_t channelMap)
 
void setEventNumber (const uint32_t eventNumber)
 
void setHardwareBoardId (const unsigned int boardId)
 
void setHardwareChannelId (const unsigned int channelId)
 
void setHardwareId (const uint8_t hwId)
 
void setHardwareSampicId (const unsigned int sampicId)
 
void setL1ALatency (const uint16_t l1ALatency)
 
void setL1ATimestamp (const uint64_t l1ATimestamp)
 
void setNumberOfSamples (const uint8_t numberOfSamples)
 
void setOffsetOfSamples (const uint8_t offsetOfSamples)
 
void setOrbitNumber (const uint32_t orbitNumber)
 
void setPLLInfo (const uint8_t pllInfo)
 
 TotemTimingEventInfo (const uint8_t hwId, const uint64_t l1ATimestamp, const uint16_t bunchNumber, const uint32_t orbitNumber, const uint32_t eventNumber, const uint16_t channelMap, const uint16_t l1ALatency, const uint8_t numberOfSamples, const uint8_t offsetOfSamples, const uint8_t pllInfo)
 
 TotemTimingEventInfo (const TotemTimingEventInfo &eventInfo)
 
 TotemTimingEventInfo ()
 
 ~TotemTimingEventInfo ()
 

Private Attributes

uint16_t bunchNumber_
 
uint16_t channelMap_
 
uint32_t eventNumber_
 
uint8_t hwId_
 
uint16_t l1ALatency_
 
uint64_t l1ATimestamp_
 
uint8_t numberOfSamples_
 
uint8_t offsetOfSamples_
 
uint32_t orbitNumber_
 
uint8_t pllInfo_
 

Detailed Description

Event Info Class for CTPPS Timing Detector

Author
Mirko Berretti
Nicola Minafra
Laurent Forthomme
Date
March 2018

Definition at line 17 of file TotemTimingEventInfo.h.

Constructor & Destructor Documentation

TotemTimingEventInfo::TotemTimingEventInfo ( const uint8_t  hwId,
const uint64_t  l1ATimestamp,
const uint16_t  bunchNumber,
const uint32_t  orbitNumber,
const uint32_t  eventNumber,
const uint16_t  channelMap,
const uint16_t  l1ALatency,
const uint8_t  numberOfSamples,
const uint8_t  offsetOfSamples,
const uint8_t  pllInfo 
)

Definition at line 9 of file TotemTimingEventInfo.cc.

12  :
13  hwId_( hwId ), l1ATimestamp_( l1ATimestamp ),
14  bunchNumber_( bunchNumber ), orbitNumber_( orbitNumber ), eventNumber_( eventNumber ),
15  channelMap_( channelMap ), l1ALatency_( l1ALatency ),
16  numberOfSamples_( numberOfSamples ), offsetOfSamples_( offsetOfSamples ), pllInfo_( pllInfo )
17 {}
TotemTimingEventInfo::TotemTimingEventInfo ( const TotemTimingEventInfo eventInfo)
TotemTimingEventInfo::TotemTimingEventInfo ( )
TotemTimingEventInfo::~TotemTimingEventInfo ( )
inline

Definition at line 23 of file TotemTimingEventInfo.h.

References operator==().

23 {};

Member Function Documentation

unsigned int TotemTimingEventInfo::getBunchNumber ( ) const
inline

Definition at line 56 of file TotemTimingEventInfo.h.

References bunchNumber_.

Referenced by operator<<().

57  {
58  return bunchNumber_;
59  }
uint16_t TotemTimingEventInfo::getChannelMap ( ) const
inline

Definition at line 71 of file TotemTimingEventInfo.h.

References channelMap_.

Referenced by operator<<().

72  {
73  return channelMap_;
74  }
unsigned int TotemTimingEventInfo::getEventNumber ( ) const
inline

Definition at line 66 of file TotemTimingEventInfo.h.

References eventNumber_.

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

67  {
68  return eventNumber_;
69  }
unsigned int TotemTimingEventInfo::getHardwareBoardId ( ) const
inline

Definition at line 36 of file TotemTimingEventInfo.h.

References hwId_.

Referenced by operator<<().

37  {
38  return ( hwId_ & 0xE0 ) >> 5;
39  }
unsigned int TotemTimingEventInfo::getHardwareChannelId ( ) const
inline

Definition at line 46 of file TotemTimingEventInfo.h.

References hwId_.

Referenced by operator<<().

47  {
48  return ( hwId_ & 0x0F );
49  }
unsigned int TotemTimingEventInfo::getHardwareId ( ) const
inline

Return digi values number.

Hardware Id formatted as: bits 0-3 Channel Id, bit 4 Sampic Id, bits 5-7 Digitizer Board Id

Definition at line 31 of file TotemTimingEventInfo.h.

References hwId_.

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

32  {
33  return hwId_;
34  }
unsigned int TotemTimingEventInfo::getHardwareSampicId ( ) const
inline

Definition at line 41 of file TotemTimingEventInfo.h.

References hwId_.

Referenced by operator<<().

42  {
43  return ( hwId_ & 0x10 ) >> 4;
44  }
unsigned int TotemTimingEventInfo::getL1ALatency ( ) const
inline

Definition at line 76 of file TotemTimingEventInfo.h.

References l1ALatency_.

Referenced by TotemTimingConversions::getTimeOfFirstSample(), and operator<<().

77  {
78  return l1ALatency_;
79  }
unsigned int TotemTimingEventInfo::getL1ATimestamp ( ) const
inline

Definition at line 51 of file TotemTimingEventInfo.h.

References l1ATimestamp_.

Referenced by TotemTimingConversions::getTimeOfFirstSample(), operator<(), and operator<<().

52  {
53  return l1ATimestamp_;
54  }
unsigned int TotemTimingEventInfo::getNumberOfSamples ( ) const
inline

Definition at line 81 of file TotemTimingEventInfo.h.

References numberOfSamples_.

Referenced by operator<<().

82  {
83  return numberOfSamples_;
84  }
unsigned int TotemTimingEventInfo::getOffsetOfSamples ( ) const
inline
unsigned int TotemTimingEventInfo::getOrbitNumber ( ) const
inline

Definition at line 61 of file TotemTimingEventInfo.h.

References orbitNumber_.

Referenced by operator<<().

62  {
63  return orbitNumber_;
64  }
uint8_t TotemTimingEventInfo::getPLLInfo ( ) const
inline

Definition at line 91 of file TotemTimingEventInfo.h.

References pllInfo_.

Referenced by operator<<().

92  {
93  return pllInfo_;
94  }
bool TotemTimingEventInfo::operator== ( const TotemTimingEventInfo eventInfo) const

Digis are equal if they have all the same values, NOT checking the samples!

Definition at line 35 of file TotemTimingEventInfo.cc.

References bunchNumber_, channelMap_, eventNumber_, hwId_, l1ALatency_, l1ATimestamp_, numberOfSamples_, offsetOfSamples_, orbitNumber_, and pllInfo_.

Referenced by ~TotemTimingEventInfo().

36 {
37  if ( hwId_ != eventInfo.hwId_
38  || l1ATimestamp_ != eventInfo.l1ATimestamp_
39  || bunchNumber_ != eventInfo.bunchNumber_
40  || orbitNumber_ != eventInfo.orbitNumber_
41  || eventNumber_ != eventInfo.eventNumber_
42  || channelMap_ != eventInfo.channelMap_
43  || l1ALatency_ != eventInfo.l1ALatency_
44  || numberOfSamples_ != eventInfo.numberOfSamples_
45  || offsetOfSamples_ != eventInfo.offsetOfSamples_
46  || pllInfo_ != eventInfo.pllInfo_
47  ) return false;
48  return true;
49 }
void TotemTimingEventInfo::setBunchNumber ( const uint16_t  bunchNumber)
inline

Definition at line 126 of file TotemTimingEventInfo.h.

References bunchNumber_.

127  {
128  bunchNumber_ = bunchNumber;
129  }
void TotemTimingEventInfo::setChannelMap ( const uint16_t  channelMap)
inline

Definition at line 141 of file TotemTimingEventInfo.h.

References channelMap_.

142  {
143  channelMap_ = channelMap;
144  }
void TotemTimingEventInfo::setEventNumber ( const uint32_t  eventNumber)
inline

Definition at line 136 of file TotemTimingEventInfo.h.

References eventNumber_.

137  {
138  eventNumber_ = eventNumber;
139  }
void TotemTimingEventInfo::setHardwareBoardId ( const unsigned int  boardId)
inline

Definition at line 103 of file TotemTimingEventInfo.h.

References hwId_.

104  {
105  hwId_ &= 0x1F; // Set board bits to 0
106  hwId_ |= ( ( boardId & 0x07 ) << 5 ) & 0xE0;
107  }
void TotemTimingEventInfo::setHardwareChannelId ( const unsigned int  channelId)
inline

Definition at line 115 of file TotemTimingEventInfo.h.

References hwId_.

116  {
117  hwId_ &= 0xF0; // set Sampic bit to 0
118  hwId_ |= ( channelId & 0x0F ) & 0x0F;
119  }
void TotemTimingEventInfo::setHardwareId ( const uint8_t  hwId)
inline

Set digi values Hardware Id formatted as: bits 0-3 Channel Id, bit 4 Sampic Id, bits 5-7 Digitizer Board Id

Definition at line 98 of file TotemTimingEventInfo.h.

References hwId_.

99  {
100  hwId_ = hwId;
101  }
void TotemTimingEventInfo::setHardwareSampicId ( const unsigned int  sampicId)
inline

Definition at line 109 of file TotemTimingEventInfo.h.

References hwId_.

110  {
111  hwId_ &= 0xEF; // set Sampic bit to 0
112  hwId_ |= ( ( sampicId & 0x01 ) << 4 ) & 0x10;
113  }
void TotemTimingEventInfo::setL1ALatency ( const uint16_t  l1ALatency)
inline

Definition at line 146 of file TotemTimingEventInfo.h.

References l1ALatency_.

147  {
148  l1ALatency_ = l1ALatency;
149  }
void TotemTimingEventInfo::setL1ATimestamp ( const uint64_t  l1ATimestamp)
inline

Definition at line 121 of file TotemTimingEventInfo.h.

References l1ATimestamp_.

122  {
123  l1ATimestamp_ = l1ATimestamp;
124  }
void TotemTimingEventInfo::setNumberOfSamples ( const uint8_t  numberOfSamples)
inline

Definition at line 151 of file TotemTimingEventInfo.h.

References numberOfSamples, and numberOfSamples_.

void TotemTimingEventInfo::setOffsetOfSamples ( const uint8_t  offsetOfSamples)
inline

Definition at line 156 of file TotemTimingEventInfo.h.

References offsetOfSamples_.

157  {
158  offsetOfSamples_ = offsetOfSamples;
159  }
void TotemTimingEventInfo::setOrbitNumber ( const uint32_t  orbitNumber)
inline

Definition at line 131 of file TotemTimingEventInfo.h.

References orbitNumber_.

132  {
133  orbitNumber_ = orbitNumber;
134  }
void TotemTimingEventInfo::setPLLInfo ( const uint8_t  pllInfo)
inline

Definition at line 161 of file TotemTimingEventInfo.h.

References pllInfo_.

162  {
163  pllInfo_ = pllInfo;
164  }

Member Data Documentation

uint16_t TotemTimingEventInfo::bunchNumber_
private

Definition at line 169 of file TotemTimingEventInfo.h.

Referenced by getBunchNumber(), operator==(), and setBunchNumber().

uint16_t TotemTimingEventInfo::channelMap_
private

Definition at line 172 of file TotemTimingEventInfo.h.

Referenced by getChannelMap(), operator==(), and setChannelMap().

uint32_t TotemTimingEventInfo::eventNumber_
private

Definition at line 171 of file TotemTimingEventInfo.h.

Referenced by getEventNumber(), operator==(), and setEventNumber().

uint8_t TotemTimingEventInfo::hwId_
private
uint16_t TotemTimingEventInfo::l1ALatency_
private

Definition at line 173 of file TotemTimingEventInfo.h.

Referenced by getL1ALatency(), operator==(), and setL1ALatency().

uint64_t TotemTimingEventInfo::l1ATimestamp_
private

Definition at line 168 of file TotemTimingEventInfo.h.

Referenced by getL1ATimestamp(), operator==(), and setL1ATimestamp().

uint8_t TotemTimingEventInfo::numberOfSamples_
private

Definition at line 174 of file TotemTimingEventInfo.h.

Referenced by getNumberOfSamples(), operator==(), and setNumberOfSamples().

uint8_t TotemTimingEventInfo::offsetOfSamples_
private

Definition at line 175 of file TotemTimingEventInfo.h.

Referenced by getOffsetOfSamples(), operator==(), and setOffsetOfSamples().

uint32_t TotemTimingEventInfo::orbitNumber_
private

Definition at line 170 of file TotemTimingEventInfo.h.

Referenced by getOrbitNumber(), operator==(), and setOrbitNumber().

uint8_t TotemTimingEventInfo::pllInfo_
private

Definition at line 176 of file TotemTimingEventInfo.h.

Referenced by getPLLInfo(), operator==(), and setPLLInfo().