CMS 3D CMS Logo

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

#include <TotemTimingEventInfo.h>

Public Member Functions

unsigned int bunchNumber () const
 
uint16_t channelMap () const
 
unsigned int eventNumber () const
 
unsigned int hardwareBoardId () const
 
unsigned int hardwareChannelId () const
 
unsigned int hardwareId () const
 Return digi values number. More...
 
unsigned int hardwareSampicId () const
 
unsigned int l1ALatency () const
 
unsigned int l1ATimestamp () const
 
unsigned int numberOfSamples () const
 
unsigned int offsetOfSamples () const
 
bool operator== (const TotemTimingEventInfo &eventInfo) const
 Digis are equal if they have all the same values, NOT checking the samples! More...
 
unsigned int orbitNumber () const
 
uint8_t pllInfo () const
 
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.

19  : hwId_(hwId),
28  pllInfo_(pllInfo) {}
unsigned int offsetOfSamples() const
unsigned int l1ALatency() const
unsigned int l1ATimestamp() const
unsigned int numberOfSamples() const
unsigned int eventNumber() const
uint8_t pllInfo() const
unsigned int bunchNumber() const
unsigned int orbitNumber() const
uint16_t channelMap() const
TotemTimingEventInfo::TotemTimingEventInfo ( const TotemTimingEventInfo eventInfo)
TotemTimingEventInfo::TotemTimingEventInfo ( )
TotemTimingEventInfo::~TotemTimingEventInfo ( )
inline

Definition at line 31 of file TotemTimingEventInfo.h.

References operator==().

31 {};

Member Function Documentation

unsigned int TotemTimingEventInfo::bunchNumber ( ) const
inline

Definition at line 49 of file TotemTimingEventInfo.h.

References bunchNumber_.

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

49 { return bunchNumber_; }
uint16_t TotemTimingEventInfo::channelMap ( ) const
inline

Definition at line 55 of file TotemTimingEventInfo.h.

References channelMap_.

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

55 { return channelMap_; }
unsigned int TotemTimingEventInfo::eventNumber ( ) const
inline
unsigned int TotemTimingEventInfo::hardwareBoardId ( ) const
inline

Definition at line 41 of file TotemTimingEventInfo.h.

References hwId_.

Referenced by operator<<().

41 { return (hwId_ & 0xE0) >> 5; }
unsigned int TotemTimingEventInfo::hardwareChannelId ( ) const
inline

Definition at line 45 of file TotemTimingEventInfo.h.

References hwId_.

Referenced by operator<<().

45 { return (hwId_ & 0x0F); }
unsigned int TotemTimingEventInfo::hardwareId ( ) 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 39 of file TotemTimingEventInfo.h.

References hwId_.

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

39 { return hwId_; }
unsigned int TotemTimingEventInfo::hardwareSampicId ( ) const
inline

Definition at line 43 of file TotemTimingEventInfo.h.

References hwId_.

Referenced by operator<<().

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

Definition at line 57 of file TotemTimingEventInfo.h.

References l1ALatency_.

Referenced by operator<<(), setL1ALatency(), and TotemTimingConversions::timeOfFirstSample().

57 { return l1ALatency_; }
unsigned int TotemTimingEventInfo::l1ATimestamp ( ) const
inline
unsigned int TotemTimingEventInfo::numberOfSamples ( ) const
inline

Definition at line 59 of file TotemTimingEventInfo.h.

References numberOfSamples_.

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

59 { return numberOfSamples_; }
unsigned int TotemTimingEventInfo::offsetOfSamples ( ) const
inline
bool TotemTimingEventInfo::operator== ( const TotemTimingEventInfo eventInfo) const

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

Definition at line 55 of file TotemTimingEventInfo.cc.

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

Referenced by ~TotemTimingEventInfo().

55  {
56  if (hwId_ != eventInfo.hwId_ || l1ATimestamp_ != eventInfo.l1ATimestamp_ || bunchNumber_ != eventInfo.bunchNumber_ ||
57  orbitNumber_ != eventInfo.orbitNumber_ || eventNumber_ != eventInfo.eventNumber_ ||
58  channelMap_ != eventInfo.channelMap_ || l1ALatency_ != eventInfo.l1ALatency_ ||
60  pllInfo_ != eventInfo.pllInfo_)
61  return false;
62  return true;
63 }
unsigned int TotemTimingEventInfo::orbitNumber ( ) const
inline

Definition at line 51 of file TotemTimingEventInfo.h.

References orbitNumber_.

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

51 { return orbitNumber_; }
uint8_t TotemTimingEventInfo::pllInfo ( ) const
inline

Definition at line 63 of file TotemTimingEventInfo.h.

References pllInfo_.

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

63 { return pllInfo_; }
void TotemTimingEventInfo::setBunchNumber ( const uint16_t  bunchNumber)
inline

Definition at line 86 of file TotemTimingEventInfo.h.

References bunchNumber(), and bunchNumber_.

void TotemTimingEventInfo::setChannelMap ( const uint16_t  channelMap)
inline

Definition at line 92 of file TotemTimingEventInfo.h.

References channelMap(), and channelMap_.

void TotemTimingEventInfo::setEventNumber ( const uint32_t  eventNumber)
inline

Definition at line 90 of file TotemTimingEventInfo.h.

References eventNumber(), and eventNumber_.

void TotemTimingEventInfo::setHardwareBoardId ( const unsigned int  boardId)
inline

Definition at line 69 of file TotemTimingEventInfo.h.

References hwId_.

69  {
70  hwId_ &= 0x1F; // Set board bits to 0
71  hwId_ |= ((boardId & 0x07) << 5) & 0xE0;
72  }
void TotemTimingEventInfo::setHardwareChannelId ( const unsigned int  channelId)
inline

Definition at line 79 of file TotemTimingEventInfo.h.

References hwId_.

79  {
80  hwId_ &= 0xF0; // set Sampic bit to 0
81  hwId_ |= (channelId & 0x0F) & 0x0F;
82  }
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 67 of file TotemTimingEventInfo.h.

References hwId_.

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

Definition at line 74 of file TotemTimingEventInfo.h.

References hwId_.

74  {
75  hwId_ &= 0xEF; // set Sampic bit to 0
76  hwId_ |= ((sampicId & 0x01) << 4) & 0x10;
77  }
void TotemTimingEventInfo::setL1ALatency ( const uint16_t  l1ALatency)
inline

Definition at line 94 of file TotemTimingEventInfo.h.

References l1ALatency(), and l1ALatency_.

void TotemTimingEventInfo::setL1ATimestamp ( const uint64_t  l1ATimestamp)
inline

Definition at line 84 of file TotemTimingEventInfo.h.

References l1ATimestamp(), and l1ATimestamp_.

void TotemTimingEventInfo::setNumberOfSamples ( const uint8_t  numberOfSamples)
inline

Definition at line 96 of file TotemTimingEventInfo.h.

References numberOfSamples(), and numberOfSamples_.

void TotemTimingEventInfo::setOffsetOfSamples ( const uint8_t  offsetOfSamples)
inline

Definition at line 98 of file TotemTimingEventInfo.h.

References offsetOfSamples(), and offsetOfSamples_.

void TotemTimingEventInfo::setOrbitNumber ( const uint32_t  orbitNumber)
inline

Definition at line 88 of file TotemTimingEventInfo.h.

References orbitNumber(), and orbitNumber_.

void TotemTimingEventInfo::setPLLInfo ( const uint8_t  pllInfo)
inline

Definition at line 100 of file TotemTimingEventInfo.h.

References pllInfo(), and pllInfo_.

Member Data Documentation

uint16_t TotemTimingEventInfo::bunchNumber_
private

Definition at line 105 of file TotemTimingEventInfo.h.

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

uint16_t TotemTimingEventInfo::channelMap_
private

Definition at line 108 of file TotemTimingEventInfo.h.

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

uint32_t TotemTimingEventInfo::eventNumber_
private

Definition at line 107 of file TotemTimingEventInfo.h.

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

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

Definition at line 109 of file TotemTimingEventInfo.h.

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

uint64_t TotemTimingEventInfo::l1ATimestamp_
private

Definition at line 104 of file TotemTimingEventInfo.h.

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

uint8_t TotemTimingEventInfo::numberOfSamples_
private

Definition at line 110 of file TotemTimingEventInfo.h.

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

uint8_t TotemTimingEventInfo::offsetOfSamples_
private

Definition at line 111 of file TotemTimingEventInfo.h.

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

uint32_t TotemTimingEventInfo::orbitNumber_
private

Definition at line 106 of file TotemTimingEventInfo.h.

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

uint8_t TotemTimingEventInfo::pllInfo_
private

Definition at line 112 of file TotemTimingEventInfo.h.

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