Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:12

0001 /** \file
0002  *
0003  * \author Mirko Berretti
0004  * \author Nicola Minafra
0005  */
0006 
0007 #include <DataFormats/CTPPSDigi/interface/TotemTimingEventInfo.h>
0008 
0009 TotemTimingEventInfo::TotemTimingEventInfo(const uint8_t hwId,
0010                                            const uint64_t l1ATimestamp,
0011                                            const uint16_t bunchNumber,
0012                                            const uint32_t orbitNumber,
0013                                            const uint32_t eventNumber,
0014                                            const uint16_t channelMap,
0015                                            const uint16_t l1ALatency,
0016                                            const uint8_t numberOfSamples,
0017                                            const uint8_t offsetOfSamples,
0018                                            const uint8_t pllInfo)
0019     : hwId_(hwId),
0020       l1ATimestamp_(l1ATimestamp),
0021       bunchNumber_(bunchNumber),
0022       orbitNumber_(orbitNumber),
0023       eventNumber_(eventNumber),
0024       channelMap_(channelMap),
0025       l1ALatency_(l1ALatency),
0026       numberOfSamples_(numberOfSamples),
0027       offsetOfSamples_(offsetOfSamples),
0028       pllInfo_(pllInfo) {}
0029 
0030 TotemTimingEventInfo::TotemTimingEventInfo(const TotemTimingEventInfo& eventInfo)
0031     : hwId_(eventInfo.hwId_),
0032       l1ATimestamp_(eventInfo.l1ATimestamp_),
0033       bunchNumber_(eventInfo.bunchNumber_),
0034       orbitNumber_(eventInfo.orbitNumber_),
0035       eventNumber_(eventInfo.eventNumber_),
0036       channelMap_(eventInfo.channelMap_),
0037       l1ALatency_(eventInfo.l1ALatency_),
0038       numberOfSamples_(eventInfo.numberOfSamples_),
0039       offsetOfSamples_(eventInfo.offsetOfSamples_),
0040       pllInfo_(eventInfo.pllInfo_) {}
0041 
0042 TotemTimingEventInfo::TotemTimingEventInfo()
0043     : hwId_(0),
0044       l1ATimestamp_(0),
0045       bunchNumber_(0),
0046       orbitNumber_(0),
0047       eventNumber_(0),
0048       channelMap_(0),
0049       l1ALatency_(0),
0050       numberOfSamples_(0),
0051       offsetOfSamples_(0),
0052       pllInfo_(0) {}
0053 
0054 // Comparison
0055 bool TotemTimingEventInfo::operator==(const TotemTimingEventInfo& eventInfo) const {
0056   if (hwId_ != eventInfo.hwId_ || l1ATimestamp_ != eventInfo.l1ATimestamp_ || bunchNumber_ != eventInfo.bunchNumber_ ||
0057       orbitNumber_ != eventInfo.orbitNumber_ || eventNumber_ != eventInfo.eventNumber_ ||
0058       channelMap_ != eventInfo.channelMap_ || l1ALatency_ != eventInfo.l1ALatency_ ||
0059       numberOfSamples_ != eventInfo.numberOfSamples_ || offsetOfSamples_ != eventInfo.offsetOfSamples_ ||
0060       pllInfo_ != eventInfo.pllInfo_)
0061     return false;
0062   return true;
0063 }