#include <HcalTBTriggerData.h>
Public Member Functions | |
uint32_t | algoBits0 () const |
uint32_t | algoBits1 () const |
uint32_t | algoBits2 () const |
uint32_t | algoBits3 () const |
uint16_t | bunchNumber () const |
Returns the bunch number of this trigger. | |
uint16_t | eventNumber () const |
Returns the event number of this trigger. | |
uint32_t | flagsDaqTtype () const |
uint32_t | gps1234 () const |
uint32_t | gps5678 () const |
HcalTBTriggerData () | |
uint32_t | orbitNumber () const |
Returns the orbit number of this trigger. | |
uint32_t | runNumber () const |
Returns the current run number. | |
const std::string & | runNumberSequenceId () const |
void | setExtendedData (uint32_t triggerWord, uint32_t triggerTime_usec, uint32_t triggerTime_base, uint32_t spillNumber, uint32_t runNumber, const char *runNumberSequenceId) |
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) |
uint32_t | spillNumber () const |
Returns the spill number of this trigger. | |
uint32_t | techBits () const |
uint32_t | triggerTimeBase () const |
Returns the base time of the run (in seconds, from a time() call) | |
uint32_t | triggerTimeUsec () const |
Returns the relative time of this trigger in microseconds. | |
uint32_t | triggerWord () const |
Returns the entire packed trigger word. | |
bool | wasBeamTrigger () const |
returns true if this trigger came from beam data | |
bool | wasFakeTrigger () const |
returns true if this trigger was fake (from a non-H2 manager) | |
bool | wasInSpill () const |
returns true if the "spill" bit was set | |
bool | wasInSpillPedestalTrigger () const |
returns true if this was an in-spill pedestal trigger | |
bool | wasLaserTrigger () const |
returns true if this was a laser trigger | |
bool | wasLEDTrigger () const |
returns true if this was a LED trigger | |
bool | wasOutSpillPedestalTrigger () const |
returns true if this was an out-of-spill pedestal trigger | |
bool | wasSpillIgnorantPedestalTrigger () const |
returns true if this trigger was a calibration trigger | |
Static Public Attributes | |
static const uint32_t | bit_BeamTrigger = 1 |
static const uint32_t | bit_FakeTrigger = 15 |
static const uint32_t | bit_InSpill = 0x10 |
static const uint32_t | bit_InSpillPedestalTrigger = 2 |
static const uint32_t | bit_LaserTrigger = 4 |
static const uint32_t | bit_LEDTrigger = 6 |
static const uint32_t | bit_OutSpillPedestalTrigger = 3 |
static const uint32_t | bit_spillIgnorantPedestalTrigger = 5 |
Private Attributes | |
uint32_t | algoBits0_ |
uint32_t | algoBits1_ |
uint32_t | algoBits2_ |
uint32_t | algoBits3_ |
<extended type="31:28,extended" size="27:24,zeros=23:7,daq#=6:4,type=3:0"> | |
uint16_t | bunchNumber_ |
uint32_t | eventNumber_ |
uint32_t | flagsDaqTtype_ |
uint32_t | gps1234_ |
uint32_t | gps5678_ |
uint32_t | orbitNumber_ |
uint32_t | runNumber_ |
std::string | runNumberSequenceId_ |
uint32_t | spillNumber_ |
uint32_t | techBits_ |
uint32_t | triggerTimeBase_ |
uint32_t | triggerTimeUsec_ |
uint32_t | triggerWord_ |
This class contains trigger information (mainly trigger type and time), and run information such as run, event, spill, bunch and orbit numbers.
Definition at line 18 of file HcalTBTriggerData.h.
HcalTBTriggerData::HcalTBTriggerData | ( | ) |
Definition at line 19 of file HcalTBTriggerData.cc.
: runNumberSequenceId_(""), runNumber_(0), triggerWord_(0), triggerTimeUsec_(0), triggerTimeBase_(0), spillNumber_(0), orbitNumber_(0), bunchNumber_(0), eventNumber_(0), flagsDaqTtype_(0), algoBits3_(0), algoBits2_(0), algoBits1_(0), algoBits0_(0), techBits_(0), gps1234_(0), gps5678_(0) { }
uint32_t HcalTBTriggerData::algoBits0 | ( | ) | const [inline] |
uint32_t HcalTBTriggerData::algoBits1 | ( | ) | const [inline] |
uint32_t HcalTBTriggerData::algoBits2 | ( | ) | const [inline] |
uint32_t HcalTBTriggerData::algoBits3 | ( | ) | const [inline] |
uint16_t HcalTBTriggerData::bunchNumber | ( | ) | const [inline] |
Returns the bunch number of this trigger.
Definition at line 39 of file HcalTBTriggerData.h.
References bunchNumber_.
Referenced by operator<<(), and setStandardData().
{ return bunchNumber_; }
uint16_t HcalTBTriggerData::eventNumber | ( | ) | const [inline] |
Returns the event number of this trigger.
Definition at line 41 of file HcalTBTriggerData.h.
References eventNumber_.
Referenced by ZdcTBAnalysis::analyze(), and operator<<().
{ return eventNumber_; }
uint32_t HcalTBTriggerData::flagsDaqTtype | ( | ) | const [inline] |
Definition at line 42 of file HcalTBTriggerData.h.
References flagsDaqTtype_.
{ return flagsDaqTtype_; }
uint32_t HcalTBTriggerData::gps1234 | ( | ) | const [inline] |
uint32_t HcalTBTriggerData::gps5678 | ( | ) | const [inline] |
uint32_t HcalTBTriggerData::orbitNumber | ( | ) | const [inline] |
Returns the orbit number of this trigger.
Definition at line 37 of file HcalTBTriggerData.h.
References orbitNumber_.
Referenced by operator<<(), and setStandardData().
{ return orbitNumber_; }
uint32_t HcalTBTriggerData::runNumber | ( | ) | const [inline] |
Returns the current run number.
Definition at line 27 of file HcalTBTriggerData.h.
References runNumber_.
Referenced by ZdcTBAnalysis::analyze(), operator<<(), HcalMonitorSelector::processEvent(), CastorMonitorSelector::processEvent(), and setExtendedData().
{ return runNumber_; }
const std::string& HcalTBTriggerData::runNumberSequenceId | ( | ) | const [inline] |
Definition at line 24 of file HcalTBTriggerData.h.
References runNumberSequenceId_.
Referenced by operator<<(), and setExtendedData().
{ return runNumberSequenceId_; }
void HcalTBTriggerData::setExtendedData | ( | uint32_t | triggerWord, |
uint32_t | triggerTime_usec, | ||
uint32_t | triggerTime_base, | ||
uint32_t | spillNumber, | ||
uint32_t | runNumber, | ||
const char * | runNumberSequenceId | ||
) |
Definition at line 65 of file HcalTBTriggerData.cc.
References runNumber(), runNumber_, runNumberSequenceId(), runNumberSequenceId_, spillNumber(), spillNumber_, triggerTimeBase_, triggerTimeUsec_, triggerWord(), and triggerWord_.
Referenced by hcaltb::HcalTBTriggerDataUnpacker::unpack().
{ triggerWord_ = triggerWord; triggerTimeUsec_ = triggerTime_usec; triggerTimeBase_ = triggerTime_base; spillNumber_ = spillNumber; runNumber_ = runNumber; runNumberSequenceId_ = runNumberSequenceId; }
void HcalTBTriggerData::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 at line 40 of file HcalTBTriggerData.cc.
References algoBits0_, algoBits1_, algoBits2_, algoBits3_, bunchNumber(), bunchNumber_, eventNumber_, flagsDaqTtype_, gps1234_, gps5678_, orbitNumber(), orbitNumber_, and techBits_.
Referenced by hcaltb::HcalTBTriggerDataUnpacker::unpack().
{ orbitNumber_ = orbitNumber; eventNumber_ = eventNumber & 0x00ffffff; // only lower 24 bits active bunchNumber_ = bunchNumber; flagsDaqTtype_ = flags_daq_ttype; algoBits3_ = algo_bits_3; algoBits2_ = algo_bits_2; algoBits1_ = algo_bits_1; algoBits0_ = algo_bits_0; techBits_ = tech_bits; gps1234_ = gps_1234; gps5678_ = gps_5678; }
uint32_t HcalTBTriggerData::spillNumber | ( | ) | const [inline] |
Returns the spill number of this trigger.
Definition at line 35 of file HcalTBTriggerData.h.
References spillNumber_.
Referenced by operator<<(), and setExtendedData().
{ return spillNumber_; }
uint32_t HcalTBTriggerData::techBits | ( | ) | const [inline] |
uint32_t HcalTBTriggerData::triggerTimeBase | ( | ) | const [inline] |
Returns the base time of the run (in seconds, from a time() call)
Definition at line 33 of file HcalTBTriggerData.h.
References triggerTimeBase_.
Referenced by operator<<().
{ return triggerTimeBase_; }
uint32_t HcalTBTriggerData::triggerTimeUsec | ( | ) | const [inline] |
Returns the relative time of this trigger in microseconds.
Definition at line 31 of file HcalTBTriggerData.h.
References triggerTimeUsec_.
Referenced by operator<<().
{ return triggerTimeUsec_; }
uint32_t HcalTBTriggerData::triggerWord | ( | ) | const [inline] |
Returns the entire packed trigger word.
Definition at line 29 of file HcalTBTriggerData.h.
References triggerWord_.
Referenced by operator<<(), setExtendedData(), wasBeamTrigger(), wasFakeTrigger(), wasInSpill(), wasInSpillPedestalTrigger(), wasLaserTrigger(), wasLEDTrigger(), wasOutSpillPedestalTrigger(), and wasSpillIgnorantPedestalTrigger().
{ return triggerWord_; }
bool HcalTBTriggerData::wasBeamTrigger | ( | ) | const [inline] |
returns true if this trigger came from beam data
Definition at line 74 of file HcalTBTriggerData.h.
References bit_BeamTrigger, and triggerWord().
Referenced by ZdcTBAnalysis::analyze(), HcalMonitorSelector::processEvent(), EcalTBH2TDCRecInfoProducer::produce(), and HcalQLPlotAnalAlgos::SetEventType().
{ return (triggerWord()&0x0F)==bit_BeamTrigger; }
bool HcalTBTriggerData::wasFakeTrigger | ( | ) | const [inline] |
returns true if this trigger was fake (from a non-H2 manager)
Definition at line 79 of file HcalTBTriggerData.h.
References bit_FakeTrigger, and triggerWord().
Referenced by ZdcTBAnalysis::analyze().
{ return (triggerWord()&0x0F)==bit_FakeTrigger; }
bool HcalTBTriggerData::wasInSpill | ( | ) | const [inline] |
returns true if the "spill" bit was set
Definition at line 109 of file HcalTBTriggerData.h.
References bit_InSpill, and triggerWord().
Referenced by ZdcTBAnalysis::analyze().
{ return (triggerWord()&bit_InSpill); }
bool HcalTBTriggerData::wasInSpillPedestalTrigger | ( | ) | const [inline] |
returns true if this was an in-spill pedestal trigger
Definition at line 94 of file HcalTBTriggerData.h.
References bit_InSpillPedestalTrigger, and triggerWord().
Referenced by ZdcTBAnalysis::analyze(), HcalMonitorSelector::processEvent(), CastorMonitorSelector::processEvent(), and HcalQLPlotAnalAlgos::SetEventType().
{ return (triggerWord()&0x0F)==bit_InSpillPedestalTrigger; }
bool HcalTBTriggerData::wasLaserTrigger | ( | ) | const [inline] |
returns true if this was a laser trigger
Definition at line 99 of file HcalTBTriggerData.h.
References bit_LaserTrigger, and triggerWord().
Referenced by ZdcTBAnalysis::analyze(), HcalMonitorSelector::processEvent(), and HcalQLPlotAnalAlgos::SetEventType().
{ return (triggerWord()&0x0F)==bit_LaserTrigger; }
bool HcalTBTriggerData::wasLEDTrigger | ( | ) | const [inline] |
returns true if this was a LED trigger
Definition at line 104 of file HcalTBTriggerData.h.
References bit_LEDTrigger, and triggerWord().
Referenced by ZdcTBAnalysis::analyze(), HcalMonitorSelector::processEvent(), and HcalQLPlotAnalAlgos::SetEventType().
{ return (triggerWord()&0x0F)==bit_LEDTrigger; }
bool HcalTBTriggerData::wasOutSpillPedestalTrigger | ( | ) | const [inline] |
returns true if this was an out-of-spill pedestal trigger
Definition at line 89 of file HcalTBTriggerData.h.
References bit_OutSpillPedestalTrigger, and triggerWord().
Referenced by ZdcTBAnalysis::analyze(), HcalMonitorSelector::processEvent(), CastorMonitorSelector::processEvent(), and HcalQLPlotAnalAlgos::SetEventType().
{ return (triggerWord()&0x0F)==bit_OutSpillPedestalTrigger; }
bool HcalTBTriggerData::wasSpillIgnorantPedestalTrigger | ( | ) | const [inline] |
returns true if this trigger was a calibration trigger
Definition at line 84 of file HcalTBTriggerData.h.
References bit_spillIgnorantPedestalTrigger, and triggerWord().
Referenced by ZdcTBAnalysis::analyze(), and HcalQLPlotAnalAlgos::SetEventType().
{ return (triggerWord()&0x0F)==bit_spillIgnorantPedestalTrigger; }
uint32_t HcalTBTriggerData::algoBits0_ [private] |
Definition at line 138 of file HcalTBTriggerData.h.
Referenced by algoBits0(), and setStandardData().
uint32_t HcalTBTriggerData::algoBits1_ [private] |
Definition at line 137 of file HcalTBTriggerData.h.
Referenced by algoBits1(), and setStandardData().
uint32_t HcalTBTriggerData::algoBits2_ [private] |
Definition at line 136 of file HcalTBTriggerData.h.
Referenced by algoBits2(), and setStandardData().
uint32_t HcalTBTriggerData::algoBits3_ [private] |
<extended type="31:28,extended" size="27:24,zeros=23:7,daq#=6:4,type=3:0">
Definition at line 135 of file HcalTBTriggerData.h.
Referenced by algoBits3(), and setStandardData().
const uint32_t HcalTBTriggerData::bit_BeamTrigger = 1 [static] |
Definition at line 113 of file HcalTBTriggerData.h.
Referenced by wasBeamTrigger().
const uint32_t HcalTBTriggerData::bit_FakeTrigger = 15 [static] |
Definition at line 120 of file HcalTBTriggerData.h.
Referenced by wasFakeTrigger().
const uint32_t HcalTBTriggerData::bit_InSpill = 0x10 [static] |
Definition at line 122 of file HcalTBTriggerData.h.
Referenced by wasInSpill().
const uint32_t HcalTBTriggerData::bit_InSpillPedestalTrigger = 2 [static] |
Definition at line 114 of file HcalTBTriggerData.h.
Referenced by wasInSpillPedestalTrigger().
const uint32_t HcalTBTriggerData::bit_LaserTrigger = 4 [static] |
Definition at line 116 of file HcalTBTriggerData.h.
Referenced by wasLaserTrigger().
const uint32_t HcalTBTriggerData::bit_LEDTrigger = 6 [static] |
Definition at line 118 of file HcalTBTriggerData.h.
Referenced by wasLEDTrigger().
const uint32_t HcalTBTriggerData::bit_OutSpillPedestalTrigger = 3 [static] |
Definition at line 115 of file HcalTBTriggerData.h.
Referenced by wasOutSpillPedestalTrigger().
const uint32_t HcalTBTriggerData::bit_spillIgnorantPedestalTrigger = 5 [static] |
Definition at line 117 of file HcalTBTriggerData.h.
Referenced by wasSpillIgnorantPedestalTrigger().
uint16_t HcalTBTriggerData::bunchNumber_ [private] |
Definition at line 132 of file HcalTBTriggerData.h.
Referenced by bunchNumber(), and setStandardData().
uint32_t HcalTBTriggerData::eventNumber_ [private] |
Definition at line 133 of file HcalTBTriggerData.h.
Referenced by eventNumber(), and setStandardData().
uint32_t HcalTBTriggerData::flagsDaqTtype_ [private] |
Definition at line 134 of file HcalTBTriggerData.h.
Referenced by flagsDaqTtype(), and setStandardData().
uint32_t HcalTBTriggerData::gps1234_ [private] |
Definition at line 140 of file HcalTBTriggerData.h.
Referenced by gps1234(), and setStandardData().
uint32_t HcalTBTriggerData::gps5678_ [private] |
Definition at line 141 of file HcalTBTriggerData.h.
Referenced by gps5678(), and setStandardData().
uint32_t HcalTBTriggerData::orbitNumber_ [private] |
Definition at line 131 of file HcalTBTriggerData.h.
Referenced by orbitNumber(), and setStandardData().
uint32_t HcalTBTriggerData::runNumber_ [private] |
Definition at line 126 of file HcalTBTriggerData.h.
Referenced by runNumber(), and setExtendedData().
std::string HcalTBTriggerData::runNumberSequenceId_ [private] |
Definition at line 125 of file HcalTBTriggerData.h.
Referenced by runNumberSequenceId(), and setExtendedData().
uint32_t HcalTBTriggerData::spillNumber_ [private] |
Definition at line 130 of file HcalTBTriggerData.h.
Referenced by setExtendedData(), and spillNumber().
uint32_t HcalTBTriggerData::techBits_ [private] |
Definition at line 139 of file HcalTBTriggerData.h.
Referenced by setStandardData(), and techBits().
uint32_t HcalTBTriggerData::triggerTimeBase_ [private] |
Definition at line 129 of file HcalTBTriggerData.h.
Referenced by setExtendedData(), and triggerTimeBase().
uint32_t HcalTBTriggerData::triggerTimeUsec_ [private] |
Definition at line 128 of file HcalTBTriggerData.h.
Referenced by setExtendedData(), and triggerTimeUsec().
uint32_t HcalTBTriggerData::triggerWord_ [private] |
Definition at line 127 of file HcalTBTriggerData.h.
Referenced by setExtendedData(), and triggerWord().