CMS 3D CMS Logo

HcalTBTriggerData.h
Go to the documentation of this file.
1 #ifndef HCALTBTRIGGERDATA_H
2 #define HCALTBTRIGGERDATA_H 1
3 
4 #include <string>
5 #include <iostream>
6 #include <cstdint>
7 
18 public:
20 
21  // Getter methods
22 
24 
26  uint32_t runNumber() const { return runNumber_; }
28  uint32_t triggerWord() const { return triggerWord_; }
30  uint32_t triggerTimeUsec() const { return triggerTimeUsec_; }
32  uint32_t triggerTimeBase() const { return triggerTimeBase_; }
34  uint32_t spillNumber() const { return spillNumber_; }
36  uint32_t orbitNumber() const { return orbitNumber_; }
38  uint16_t bunchNumber() const { return bunchNumber_; }
40  uint16_t eventNumber() const { return eventNumber_; }
41  uint32_t flagsDaqTtype() const { return flagsDaqTtype_; }
42  uint32_t algoBits3() const { return algoBits3_; }
43  uint32_t algoBits2() const { return algoBits2_; }
44  uint32_t algoBits1() const { return algoBits1_; }
45  uint32_t algoBits0() const { return algoBits0_; }
46  uint32_t techBits() const { return techBits_; }
47  uint32_t gps1234() const { return gps1234_; }
48  uint32_t gps5678() const { return gps5678_; }
49 
50  // Setter methods
51  void setStandardData(uint32_t orbitNumber,
52  uint32_t eventNumber,
53  uint16_t bunchNumber,
54  uint32_t flags_daq_ttype,
55  uint32_t algo_bits_3,
56  uint32_t algo_bits_2,
57  uint32_t algo_bits_1,
58  uint32_t algo_bits_0,
59  uint32_t tech_bits,
60  uint32_t gps_1234,
61  uint32_t gps_5678);
62 
63  void setExtendedData(uint32_t triggerWord,
64  uint32_t triggerTime_usec,
65  uint32_t triggerTime_base,
66  uint32_t spillNumber,
67  uint32_t runNumber,
68  const char* runNumberSequenceId);
69 
70  // Parse trigger word routines
71 
73  inline bool wasBeamTrigger() const { return (triggerWord() & 0x0F) == bit_BeamTrigger; }
74 
76  inline bool wasFakeTrigger() const { return (triggerWord() & 0x0F) == bit_FakeTrigger; }
77 
79  inline bool wasSpillIgnorantPedestalTrigger() const {
80  return (triggerWord() & 0x0F) == bit_spillIgnorantPedestalTrigger;
81  }
82 
84  inline bool wasOutSpillPedestalTrigger() const { return (triggerWord() & 0x0F) == bit_OutSpillPedestalTrigger; }
85 
87  inline bool wasInSpillPedestalTrigger() const { return (triggerWord() & 0x0F) == bit_InSpillPedestalTrigger; }
88 
90  inline bool wasLaserTrigger() const { return (triggerWord() & 0x0F) == bit_LaserTrigger; }
91 
93  inline bool wasLEDTrigger() const { return (triggerWord() & 0x0F) == bit_LEDTrigger; }
94 
96  inline bool wasInSpill() const { return (triggerWord() & bit_InSpill); }
97 
98  static const uint32_t bit_BeamTrigger; // = 1;
99  static const uint32_t bit_InSpillPedestalTrigger; // = 2;
100  static const uint32_t bit_OutSpillPedestalTrigger; // = 3;
101  static const uint32_t bit_LaserTrigger; // = 4
102  static const uint32_t bit_spillIgnorantPedestalTrigger; // = 5;
103  static const uint32_t bit_LEDTrigger; // = 6
104 
105  static const uint32_t bit_FakeTrigger; // = 15
106 
107  static const uint32_t bit_InSpill; // = 0x10;
108 
109 private:
111  uint32_t runNumber_;
112  uint32_t triggerWord_;
115  uint32_t spillNumber_;
116  uint32_t orbitNumber_;
117  uint16_t bunchNumber_;
118  uint32_t eventNumber_;
119  uint32_t flagsDaqTtype_;
120  uint32_t algoBits3_;
121  uint32_t algoBits2_;
122  uint32_t algoBits1_;
123  uint32_t algoBits0_;
124  uint32_t techBits_;
125  uint32_t gps1234_;
126  uint32_t gps5678_;
127 };
128 
129 std::ostream& operator<<(std::ostream& s, const HcalTBTriggerData& htbtd);
130 
131 #endif
HcalTBTriggerData::bit_LaserTrigger
static const uint32_t bit_LaserTrigger
Definition: HcalTBTriggerData.h:101
HcalTBTriggerData::flagsDaqTtype_
uint32_t flagsDaqTtype_
Definition: HcalTBTriggerData.h:119
HcalTBTriggerData::wasLEDTrigger
bool wasLEDTrigger() const
returns true if this was a LED trigger
Definition: HcalTBTriggerData.h:93
HcalTBTriggerData::spillNumber
uint32_t spillNumber() const
Returns the spill number of this trigger.
Definition: HcalTBTriggerData.h:34
HcalTBTriggerData::triggerWord_
uint32_t triggerWord_
Definition: HcalTBTriggerData.h:112
HcalTBTriggerData::orbitNumber_
uint32_t orbitNumber_
Definition: HcalTBTriggerData.h:116
HcalTBTriggerData::HcalTBTriggerData
HcalTBTriggerData()
Definition: HcalTBTriggerData.cc:18
HcalTBTriggerData::algoBits0
uint32_t algoBits0() const
Definition: HcalTBTriggerData.h:45
HcalTBTriggerData::eventNumber
uint16_t eventNumber() const
Returns the event number of this trigger.
Definition: HcalTBTriggerData.h:40
HcalTBTriggerData::setExtendedData
void setExtendedData(uint32_t triggerWord, uint32_t triggerTime_usec, uint32_t triggerTime_base, uint32_t spillNumber, uint32_t runNumber, const char *runNumberSequenceId)
Definition: HcalTBTriggerData.cc:61
HcalTBTriggerData::gps5678_
uint32_t gps5678_
Definition: HcalTBTriggerData.h:126
HcalTBTriggerData::bit_LEDTrigger
static const uint32_t bit_LEDTrigger
Definition: HcalTBTriggerData.h:103
HcalTBTriggerData::runNumber
uint32_t runNumber() const
Returns the current run number.
Definition: HcalTBTriggerData.h:26
HcalTBTriggerData::bit_InSpill
static const uint32_t bit_InSpill
Definition: HcalTBTriggerData.h:107
HcalTBTriggerData::wasSpillIgnorantPedestalTrigger
bool wasSpillIgnorantPedestalTrigger() const
returns true if this trigger was a calibration trigger
Definition: HcalTBTriggerData.h:79
HcalTBTriggerData::techBits_
uint32_t techBits_
Definition: HcalTBTriggerData.h:124
HcalTBTriggerData::bit_InSpillPedestalTrigger
static const uint32_t bit_InSpillPedestalTrigger
Definition: HcalTBTriggerData.h:99
HcalTBTriggerData::runNumberSequenceId_
std::string runNumberSequenceId_
Definition: HcalTBTriggerData.h:110
alignCSCRings.s
s
Definition: alignCSCRings.py:92
HcalTBTriggerData::triggerTimeUsec
uint32_t triggerTimeUsec() const
Returns the relative time of this trigger in microseconds.
Definition: HcalTBTriggerData.h:30
HcalTBTriggerData::bunchNumber
uint16_t bunchNumber() const
Returns the bunch number of this trigger.
Definition: HcalTBTriggerData.h:38
HcalTBTriggerData::eventNumber_
uint32_t eventNumber_
Definition: HcalTBTriggerData.h:118
HcalTBTriggerData::algoBits3_
uint32_t algoBits3_
<extended type="31:28,extended" size="27:24,zeros=23:7,daq#=6:4,type=3:0">
Definition: HcalTBTriggerData.h:120
HcalTBTriggerData::wasInSpillPedestalTrigger
bool wasInSpillPedestalTrigger() const
returns true if this was an in-spill pedestal trigger
Definition: HcalTBTriggerData.h:87
HcalTBTriggerData::algoBits2_
uint32_t algoBits2_
Definition: HcalTBTriggerData.h:121
HcalTBTriggerData::flagsDaqTtype
uint32_t flagsDaqTtype() const
Definition: HcalTBTriggerData.h:41
HcalTBTriggerData::algoBits0_
uint32_t algoBits0_
Definition: HcalTBTriggerData.h:123
HcalTBTriggerData::wasInSpill
bool wasInSpill() const
returns true if the "spill" bit was set
Definition: HcalTBTriggerData.h:96
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalTBTriggerData::triggerTimeBase_
uint32_t triggerTimeBase_
Definition: HcalTBTriggerData.h:114
HcalTBTriggerData::setStandardData
void setStandardData(uint32_t orbitNumber, uint32_t eventNumber, uint16_t bunchNumber, uint32_t flags_daq_ttype, uint32_t algo_bits_3, uint32_t algo_bits_2, uint32_t algo_bits_1, uint32_t algo_bits_0, uint32_t tech_bits, uint32_t gps_1234, uint32_t gps_5678)
Definition: HcalTBTriggerData.cc:37
HcalTBTriggerData
Definition: HcalTBTriggerData.h:17
HcalTBTriggerData::wasFakeTrigger
bool wasFakeTrigger() const
returns true if this trigger was fake (from a non-H2 manager)
Definition: HcalTBTriggerData.h:76
HcalTBTriggerData::runNumber_
uint32_t runNumber_
Definition: HcalTBTriggerData.h:111
HcalTBTriggerData::bunchNumber_
uint16_t bunchNumber_
Definition: HcalTBTriggerData.h:117
HcalTBTriggerData::runNumberSequenceId
const std::string & runNumberSequenceId() const
Definition: HcalTBTriggerData.h:23
HcalTBTriggerData::algoBits1
uint32_t algoBits1() const
Definition: HcalTBTriggerData.h:44
HcalTBTriggerData::algoBits2
uint32_t algoBits2() const
Definition: HcalTBTriggerData.h:43
HcalTBTriggerData::triggerTimeBase
uint32_t triggerTimeBase() const
Returns the base time of the run (in seconds, from a time() call)
Definition: HcalTBTriggerData.h:32
HcalTBTriggerData::triggerTimeUsec_
uint32_t triggerTimeUsec_
Definition: HcalTBTriggerData.h:113
HcalTBTriggerData::gps1234
uint32_t gps1234() const
Definition: HcalTBTriggerData.h:47
HcalTBTriggerData::wasOutSpillPedestalTrigger
bool wasOutSpillPedestalTrigger() const
returns true if this was an out-of-spill pedestal trigger
Definition: HcalTBTriggerData.h:84
HcalTBTriggerData::algoBits1_
uint32_t algoBits1_
Definition: HcalTBTriggerData.h:122
HcalTBTriggerData::bit_BeamTrigger
static const uint32_t bit_BeamTrigger
Definition: HcalTBTriggerData.h:98
HcalTBTriggerData::wasLaserTrigger
bool wasLaserTrigger() const
returns true if this was a laser trigger
Definition: HcalTBTriggerData.h:90
HcalTBTriggerData::bit_spillIgnorantPedestalTrigger
static const uint32_t bit_spillIgnorantPedestalTrigger
Definition: HcalTBTriggerData.h:102
HcalTBTriggerData::gps5678
uint32_t gps5678() const
Definition: HcalTBTriggerData.h:48
HcalTBTriggerData::orbitNumber
uint32_t orbitNumber() const
Returns the orbit number of this trigger.
Definition: HcalTBTriggerData.h:36
HcalTBTriggerData::bit_FakeTrigger
static const uint32_t bit_FakeTrigger
Definition: HcalTBTriggerData.h:105
HcalTBTriggerData::triggerWord
uint32_t triggerWord() const
Returns the entire packed trigger word.
Definition: HcalTBTriggerData.h:28
operator<<
std::ostream & operator<<(std::ostream &s, const HcalTBTriggerData &htbtd)
HcalTBTriggerData::wasBeamTrigger
bool wasBeamTrigger() const
returns true if this trigger came from beam data
Definition: HcalTBTriggerData.h:73
HcalTBTriggerData::techBits
uint32_t techBits() const
Definition: HcalTBTriggerData.h:46
HcalTBTriggerData::gps1234_
uint32_t gps1234_
Definition: HcalTBTriggerData.h:125
HcalTBTriggerData::bit_OutSpillPedestalTrigger
static const uint32_t bit_OutSpillPedestalTrigger
Definition: HcalTBTriggerData.h:100
HcalTBTriggerData::spillNumber_
uint32_t spillNumber_
Definition: HcalTBTriggerData.h:115
HcalTBTriggerData::algoBits3
uint32_t algoBits3() const
Definition: HcalTBTriggerData.h:42