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

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() [1/2]

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 l1ALatency() const
unsigned int bunchNumber() const
unsigned int l1ATimestamp() const
unsigned int offsetOfSamples() const
unsigned int numberOfSamples() const
uint16_t channelMap() const
unsigned int orbitNumber() const
unsigned int eventNumber() const

◆ TotemTimingEventInfo() [2/2]

TotemTimingEventInfo::TotemTimingEventInfo ( )

Member Function Documentation

◆ bunchNumber()

unsigned int TotemTimingEventInfo::bunchNumber ( ) const
inline

Definition at line 47 of file TotemTimingEventInfo.h.

References bunchNumber_.

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

47 { return bunchNumber_; }

◆ channelMap()

uint16_t TotemTimingEventInfo::channelMap ( ) const
inline

Definition at line 53 of file TotemTimingEventInfo.h.

References channelMap_.

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

53 { return channelMap_; }

◆ eventNumber()

unsigned int TotemTimingEventInfo::eventNumber ( ) const
inline

Definition at line 51 of file TotemTimingEventInfo.h.

References eventNumber_.

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

51 { return eventNumber_; }

◆ hardwareBoardId()

unsigned int TotemTimingEventInfo::hardwareBoardId ( ) const
inline

Definition at line 39 of file TotemTimingEventInfo.h.

References hwId_.

Referenced by operator<<().

39 { return (hwId_ & 0xE0) >> 5; }

◆ hardwareChannelId()

unsigned int TotemTimingEventInfo::hardwareChannelId ( ) const
inline

Definition at line 43 of file TotemTimingEventInfo.h.

References hwId_.

Referenced by operator<<().

43 { return (hwId_ & 0x0F); }

◆ hardwareId()

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 37 of file TotemTimingEventInfo.h.

References hwId_.

Referenced by operator<<().

37 { return hwId_; }

◆ hardwareSampicId()

unsigned int TotemTimingEventInfo::hardwareSampicId ( ) const
inline

Definition at line 41 of file TotemTimingEventInfo.h.

References hwId_.

Referenced by operator<<().

41 { return (hwId_ & 0x10) >> 4; }

◆ l1ALatency()

unsigned int TotemTimingEventInfo::l1ALatency ( ) const
inline

Definition at line 55 of file TotemTimingEventInfo.h.

References l1ALatency_.

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

55 { return l1ALatency_; }

◆ l1ATimestamp()

unsigned int TotemTimingEventInfo::l1ATimestamp ( ) const
inline

◆ numberOfSamples()

unsigned int TotemTimingEventInfo::numberOfSamples ( ) const
inline

Definition at line 57 of file TotemTimingEventInfo.h.

References numberOfSamples_.

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

57 { return numberOfSamples_; }

◆ offsetOfSamples()

unsigned int TotemTimingEventInfo::offsetOfSamples ( ) const
inline

◆ operator==()

bool TotemTimingEventInfo::operator== ( const TotemTimingEventInfo eventInfo) const

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

Definition at line 43 of file TotemTimingEventInfo.cc.

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

43  {
44  if (hwId_ != eventInfo.hwId_ || l1ATimestamp_ != eventInfo.l1ATimestamp_ || bunchNumber_ != eventInfo.bunchNumber_ ||
45  orbitNumber_ != eventInfo.orbitNumber_ || eventNumber_ != eventInfo.eventNumber_ ||
46  channelMap_ != eventInfo.channelMap_ || l1ALatency_ != eventInfo.l1ALatency_ ||
47  numberOfSamples_ != eventInfo.numberOfSamples_ || offsetOfSamples_ != eventInfo.offsetOfSamples_ ||
48  pllInfo_ != eventInfo.pllInfo_)
49  return false;
50  return true;
51 }
eventInfo
add run, event number and lumi section

◆ orbitNumber()

unsigned int TotemTimingEventInfo::orbitNumber ( ) const
inline

Definition at line 49 of file TotemTimingEventInfo.h.

References orbitNumber_.

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

49 { return orbitNumber_; }

◆ pllInfo()

uint8_t TotemTimingEventInfo::pllInfo ( ) const
inline

Definition at line 61 of file TotemTimingEventInfo.h.

References pllInfo_.

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

61 { return pllInfo_; }

◆ setBunchNumber()

void TotemTimingEventInfo::setBunchNumber ( const uint16_t  bunchNumber)
inline

Definition at line 84 of file TotemTimingEventInfo.h.

References bunchNumber(), and bunchNumber_.

◆ setChannelMap()

void TotemTimingEventInfo::setChannelMap ( const uint16_t  channelMap)
inline

Definition at line 90 of file TotemTimingEventInfo.h.

References channelMap(), and channelMap_.

◆ setEventNumber()

void TotemTimingEventInfo::setEventNumber ( const uint32_t  eventNumber)
inline

Definition at line 88 of file TotemTimingEventInfo.h.

References eventNumber(), and eventNumber_.

◆ setHardwareBoardId()

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

Definition at line 67 of file TotemTimingEventInfo.h.

References amcDumpToRaw_cfi::boardId, and hwId_.

67  {
68  hwId_ &= 0x1F; // Set board bits to 0
69  hwId_ |= ((boardId & 0x07) << 5) & 0xE0;
70  }

◆ setHardwareChannelId()

void TotemTimingEventInfo::setHardwareChannelId ( const unsigned int  channelId)
inline

Definition at line 77 of file TotemTimingEventInfo.h.

References hwId_.

77  {
78  hwId_ &= 0xF0; // set Sampic bit to 0
79  hwId_ |= (channelId & 0x0F) & 0x0F;
80  }

◆ setHardwareId()

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 65 of file TotemTimingEventInfo.h.

References hwId_.

65 { hwId_ = hwId; }

◆ setHardwareSampicId()

void TotemTimingEventInfo::setHardwareSampicId ( const unsigned int  sampicId)
inline

Definition at line 72 of file TotemTimingEventInfo.h.

References hwId_.

72  {
73  hwId_ &= 0xEF; // set Sampic bit to 0
74  hwId_ |= ((sampicId & 0x01) << 4) & 0x10;
75  }

◆ setL1ALatency()

void TotemTimingEventInfo::setL1ALatency ( const uint16_t  l1ALatency)
inline

Definition at line 92 of file TotemTimingEventInfo.h.

References l1ALatency(), and l1ALatency_.

◆ setL1ATimestamp()

void TotemTimingEventInfo::setL1ATimestamp ( const uint64_t  l1ATimestamp)
inline

Definition at line 82 of file TotemTimingEventInfo.h.

References l1ATimestamp(), and l1ATimestamp_.

◆ setNumberOfSamples()

void TotemTimingEventInfo::setNumberOfSamples ( const uint8_t  numberOfSamples)
inline

Definition at line 94 of file TotemTimingEventInfo.h.

References numberOfSamples(), and numberOfSamples_.

◆ setOffsetOfSamples()

void TotemTimingEventInfo::setOffsetOfSamples ( const uint8_t  offsetOfSamples)
inline

Definition at line 96 of file TotemTimingEventInfo.h.

References offsetOfSamples(), and offsetOfSamples_.

◆ setOrbitNumber()

void TotemTimingEventInfo::setOrbitNumber ( const uint32_t  orbitNumber)
inline

Definition at line 86 of file TotemTimingEventInfo.h.

References orbitNumber(), and orbitNumber_.

◆ setPLLInfo()

void TotemTimingEventInfo::setPLLInfo ( const uint8_t  pllInfo)
inline

Definition at line 98 of file TotemTimingEventInfo.h.

References pllInfo(), and pllInfo_.

Member Data Documentation

◆ bunchNumber_

uint16_t TotemTimingEventInfo::bunchNumber_
private

Definition at line 103 of file TotemTimingEventInfo.h.

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

◆ channelMap_

uint16_t TotemTimingEventInfo::channelMap_
private

Definition at line 106 of file TotemTimingEventInfo.h.

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

◆ eventNumber_

uint32_t TotemTimingEventInfo::eventNumber_
private

Definition at line 105 of file TotemTimingEventInfo.h.

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

◆ hwId_

uint8_t TotemTimingEventInfo::hwId_
private

◆ l1ALatency_

uint16_t TotemTimingEventInfo::l1ALatency_
private

Definition at line 107 of file TotemTimingEventInfo.h.

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

◆ l1ATimestamp_

uint64_t TotemTimingEventInfo::l1ATimestamp_
private

Definition at line 102 of file TotemTimingEventInfo.h.

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

◆ numberOfSamples_

uint8_t TotemTimingEventInfo::numberOfSamples_
private

Definition at line 108 of file TotemTimingEventInfo.h.

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

◆ offsetOfSamples_

uint8_t TotemTimingEventInfo::offsetOfSamples_
private

Definition at line 109 of file TotemTimingEventInfo.h.

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

◆ orbitNumber_

uint32_t TotemTimingEventInfo::orbitNumber_
private

Definition at line 104 of file TotemTimingEventInfo.h.

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

◆ pllInfo_

uint8_t TotemTimingEventInfo::pllInfo_
private

Definition at line 110 of file TotemTimingEventInfo.h.

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