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 ()
 
 TotemTimingEventInfo (const TotemTimingEventInfo &eventInfo)
 
 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/3]

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 
)

◆ TotemTimingEventInfo() [2/3]

TotemTimingEventInfo::TotemTimingEventInfo ( const TotemTimingEventInfo eventInfo)

Definition at line 30 of file TotemTimingEventInfo.cc.

31  : hwId_(eventInfo.hwId_),
32  l1ATimestamp_(eventInfo.l1ATimestamp_),
33  bunchNumber_(eventInfo.bunchNumber_),
34  orbitNumber_(eventInfo.orbitNumber_),
35  eventNumber_(eventInfo.eventNumber_),
36  channelMap_(eventInfo.channelMap_),
37  l1ALatency_(eventInfo.l1ALatency_),
38  numberOfSamples_(eventInfo.numberOfSamples_),
39  offsetOfSamples_(eventInfo.offsetOfSamples_),
40  pllInfo_(eventInfo.pllInfo_) {}

◆ TotemTimingEventInfo() [3/3]

TotemTimingEventInfo::TotemTimingEventInfo ( )

Definition at line 42 of file TotemTimingEventInfo.cc.

43  : hwId_(0),
44  l1ATimestamp_(0),
45  bunchNumber_(0),
46  orbitNumber_(0),
47  eventNumber_(0),
48  channelMap_(0),
49  l1ALatency_(0),
52  pllInfo_(0) {}

◆ ~TotemTimingEventInfo()

TotemTimingEventInfo::~TotemTimingEventInfo ( )
inline

Definition at line 31 of file TotemTimingEventInfo.h.

31 {};

Member Function Documentation

◆ bunchNumber()

unsigned int TotemTimingEventInfo::bunchNumber ( ) const
inline

Definition at line 49 of file TotemTimingEventInfo.h.

49 { return bunchNumber_; }

References bunchNumber_.

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

◆ channelMap()

uint16_t TotemTimingEventInfo::channelMap ( ) const
inline

Definition at line 55 of file TotemTimingEventInfo.h.

55 { return channelMap_; }

References channelMap_.

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

◆ eventNumber()

unsigned int TotemTimingEventInfo::eventNumber ( ) const
inline

Definition at line 53 of file TotemTimingEventInfo.h.

53 { return eventNumber_; }

References eventNumber_.

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

◆ hardwareBoardId()

unsigned int TotemTimingEventInfo::hardwareBoardId ( ) const
inline

Definition at line 41 of file TotemTimingEventInfo.h.

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

References hwId_.

Referenced by operator<<().

◆ hardwareChannelId()

unsigned int TotemTimingEventInfo::hardwareChannelId ( ) const
inline

Definition at line 45 of file TotemTimingEventInfo.h.

45 { return (hwId_ & 0x0F); }

References hwId_.

Referenced by operator<<().

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

39 { return hwId_; }

References hwId_.

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

◆ hardwareSampicId()

unsigned int TotemTimingEventInfo::hardwareSampicId ( ) const
inline

Definition at line 43 of file TotemTimingEventInfo.h.

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

References hwId_.

Referenced by operator<<().

◆ l1ALatency()

unsigned int TotemTimingEventInfo::l1ALatency ( ) const
inline

Definition at line 57 of file TotemTimingEventInfo.h.

57 { return l1ALatency_; }

References l1ALatency_.

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

◆ l1ATimestamp()

unsigned int TotemTimingEventInfo::l1ATimestamp ( ) const
inline

◆ numberOfSamples()

unsigned int TotemTimingEventInfo::numberOfSamples ( ) const
inline

Definition at line 59 of file TotemTimingEventInfo.h.

59 { return numberOfSamples_; }

References numberOfSamples_.

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

◆ 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 55 of file TotemTimingEventInfo.cc.

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_ ||
59  numberOfSamples_ != eventInfo.numberOfSamples_ || offsetOfSamples_ != eventInfo.offsetOfSamples_ ||
60  pllInfo_ != eventInfo.pllInfo_)
61  return false;
62  return true;
63 }

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

◆ orbitNumber()

unsigned int TotemTimingEventInfo::orbitNumber ( ) const
inline

Definition at line 51 of file TotemTimingEventInfo.h.

51 { return orbitNumber_; }

References orbitNumber_.

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

◆ pllInfo()

uint8_t TotemTimingEventInfo::pllInfo ( ) const
inline

Definition at line 63 of file TotemTimingEventInfo.h.

63 { return pllInfo_; }

References pllInfo_.

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

◆ setBunchNumber()

void TotemTimingEventInfo::setBunchNumber ( const uint16_t  bunchNumber)
inline

Definition at line 86 of file TotemTimingEventInfo.h.

References bunchNumber(), and bunchNumber_.

◆ setChannelMap()

void TotemTimingEventInfo::setChannelMap ( const uint16_t  channelMap)
inline

Definition at line 92 of file TotemTimingEventInfo.h.

References channelMap(), and channelMap_.

◆ setEventNumber()

void TotemTimingEventInfo::setEventNumber ( const uint32_t  eventNumber)
inline

Definition at line 90 of file TotemTimingEventInfo.h.

References eventNumber(), and eventNumber_.

◆ setHardwareBoardId()

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

Definition at line 69 of file TotemTimingEventInfo.h.

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

References amcDumpToRaw_cfi::boardId, and hwId_.

◆ setHardwareChannelId()

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

Definition at line 79 of file TotemTimingEventInfo.h.

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

References hwId_.

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

67 { hwId_ = hwId; }

References hwId_.

◆ setHardwareSampicId()

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

Definition at line 74 of file TotemTimingEventInfo.h.

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

References hwId_.

◆ setL1ALatency()

void TotemTimingEventInfo::setL1ALatency ( const uint16_t  l1ALatency)
inline

Definition at line 94 of file TotemTimingEventInfo.h.

References l1ALatency(), and l1ALatency_.

◆ setL1ATimestamp()

void TotemTimingEventInfo::setL1ATimestamp ( const uint64_t  l1ATimestamp)
inline

Definition at line 84 of file TotemTimingEventInfo.h.

References l1ATimestamp(), and l1ATimestamp_.

◆ setNumberOfSamples()

void TotemTimingEventInfo::setNumberOfSamples ( const uint8_t  numberOfSamples)
inline

Definition at line 96 of file TotemTimingEventInfo.h.

References numberOfSamples(), and numberOfSamples_.

◆ setOffsetOfSamples()

void TotemTimingEventInfo::setOffsetOfSamples ( const uint8_t  offsetOfSamples)
inline

Definition at line 98 of file TotemTimingEventInfo.h.

References offsetOfSamples(), and offsetOfSamples_.

◆ setOrbitNumber()

void TotemTimingEventInfo::setOrbitNumber ( const uint32_t  orbitNumber)
inline

Definition at line 88 of file TotemTimingEventInfo.h.

References orbitNumber(), and orbitNumber_.

◆ setPLLInfo()

void TotemTimingEventInfo::setPLLInfo ( const uint8_t  pllInfo)
inline

Definition at line 100 of file TotemTimingEventInfo.h.

100 { pllInfo_ = pllInfo; }

References pllInfo(), and pllInfo_.

Member Data Documentation

◆ bunchNumber_

uint16_t TotemTimingEventInfo::bunchNumber_
private

Definition at line 105 of file TotemTimingEventInfo.h.

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

◆ channelMap_

uint16_t TotemTimingEventInfo::channelMap_
private

Definition at line 108 of file TotemTimingEventInfo.h.

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

◆ eventNumber_

uint32_t TotemTimingEventInfo::eventNumber_
private

Definition at line 107 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 109 of file TotemTimingEventInfo.h.

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

◆ l1ATimestamp_

uint64_t TotemTimingEventInfo::l1ATimestamp_
private

Definition at line 104 of file TotemTimingEventInfo.h.

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

◆ numberOfSamples_

uint8_t TotemTimingEventInfo::numberOfSamples_
private

Definition at line 110 of file TotemTimingEventInfo.h.

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

◆ offsetOfSamples_

uint8_t TotemTimingEventInfo::offsetOfSamples_
private

Definition at line 111 of file TotemTimingEventInfo.h.

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

◆ orbitNumber_

uint32_t TotemTimingEventInfo::orbitNumber_
private

Definition at line 106 of file TotemTimingEventInfo.h.

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

◆ pllInfo_

uint8_t TotemTimingEventInfo::pllInfo_
private

Definition at line 112 of file TotemTimingEventInfo.h.

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

TotemTimingEventInfo::l1ATimestamp
unsigned int l1ATimestamp() const
Definition: TotemTimingEventInfo.h:47
TotemTimingEventInfo::pllInfo
uint8_t pllInfo() const
Definition: TotemTimingEventInfo.h:63
amcDumpToRaw_cfi.boardId
boardId
Definition: amcDumpToRaw_cfi.py:9
TotemTimingEventInfo::orbitNumber_
uint32_t orbitNumber_
Definition: TotemTimingEventInfo.h:106
TotemTimingEventInfo::eventNumber_
uint32_t eventNumber_
Definition: TotemTimingEventInfo.h:107
TotemTimingEventInfo::eventNumber
unsigned int eventNumber() const
Definition: TotemTimingEventInfo.h:53
TotemTimingEventInfo::orbitNumber
unsigned int orbitNumber() const
Definition: TotemTimingEventInfo.h:51
TotemTimingEventInfo::numberOfSamples_
uint8_t numberOfSamples_
Definition: TotemTimingEventInfo.h:110
TotemTimingEventInfo::l1ATimestamp_
uint64_t l1ATimestamp_
Definition: TotemTimingEventInfo.h:104
TotemTimingEventInfo::offsetOfSamples_
uint8_t offsetOfSamples_
Definition: TotemTimingEventInfo.h:111
ZMuMuAnalysisNtupler_cff.eventInfo
eventInfo
Definition: ZMuMuAnalysisNtupler_cff.py:15
TotemTimingEventInfo::pllInfo_
uint8_t pllInfo_
Definition: TotemTimingEventInfo.h:112
TotemTimingEventInfo::bunchNumber_
uint16_t bunchNumber_
Definition: TotemTimingEventInfo.h:105
TotemTimingEventInfo::bunchNumber
unsigned int bunchNumber() const
Definition: TotemTimingEventInfo.h:49
TotemTimingEventInfo::hwId_
uint8_t hwId_
Definition: TotemTimingEventInfo.h:103
TotemTimingEventInfo::channelMap
uint16_t channelMap() const
Definition: TotemTimingEventInfo.h:55
TotemTimingEventInfo::l1ALatency
unsigned int l1ALatency() const
Definition: TotemTimingEventInfo.h:57
TotemTimingEventInfo::offsetOfSamples
unsigned int offsetOfSamples() const
Definition: TotemTimingEventInfo.h:61
TotemTimingEventInfo::numberOfSamples
unsigned int numberOfSamples() const
Definition: TotemTimingEventInfo.h:59
TotemTimingEventInfo::l1ALatency_
uint16_t l1ALatency_
Definition: TotemTimingEventInfo.h:109
TotemTimingEventInfo::channelMap_
uint16_t channelMap_
Definition: TotemTimingEventInfo.h:108