CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Attributes
HcalTBTriggerData Class Reference

#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. More...
 
uint16_t eventNumber () const
 Returns the event number of this trigger. More...
 
uint32_t flagsDaqTtype () const
 
uint32_t gps1234 () const
 
uint32_t gps5678 () const
 
 HcalTBTriggerData ()
 
uint32_t orbitNumber () const
 Returns the orbit number of this trigger. More...
 
uint32_t runNumber () const
 Returns the current run number. More...
 
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. More...
 
uint32_t techBits () const
 
uint32_t triggerTimeBase () const
 Returns the base time of the run (in seconds, from a time() call) More...
 
uint32_t triggerTimeUsec () const
 Returns the relative time of this trigger in microseconds. More...
 
uint32_t triggerWord () const
 Returns the entire packed trigger word. More...
 
bool wasBeamTrigger () const
 returns true if this trigger came from beam data More...
 
bool wasFakeTrigger () const
 returns true if this trigger was fake (from a non-H2 manager) More...
 
bool wasInSpill () const
 returns true if the "spill" bit was set More...
 
bool wasInSpillPedestalTrigger () const
 returns true if this was an in-spill pedestal trigger More...
 
bool wasLaserTrigger () const
 returns true if this was a laser trigger More...
 
bool wasLEDTrigger () const
 returns true if this was a LED trigger More...
 
bool wasOutSpillPedestalTrigger () const
 returns true if this was an out-of-spill pedestal trigger More...
 
bool wasSpillIgnorantPedestalTrigger () const
 returns true if this trigger was a calibration trigger More...
 

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"> More...
 
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_
 

Detailed Description

This class contains trigger information (mainly trigger type and time), and run information such as run, event, spill, bunch and orbit numbers.

Date
2005/10/06 22:21:33
Revision
1.2
Author
P. Dudero - Minnesota

Definition at line 17 of file HcalTBTriggerData.h.

Constructor & Destructor Documentation

◆ HcalTBTriggerData()

HcalTBTriggerData::HcalTBTriggerData ( )

Definition at line 18 of file HcalTBTriggerData.cc.

20  runNumber_(0),
21  triggerWord_(0),
24  spillNumber_(0),
25  orbitNumber_(0),
26  bunchNumber_(0),
27  eventNumber_(0),
28  flagsDaqTtype_(0),
29  algoBits3_(0),
30  algoBits2_(0),
31  algoBits1_(0),
32  algoBits0_(0),
33  techBits_(0),
34  gps1234_(0),
35  gps5678_(0) {}

Member Function Documentation

◆ algoBits0()

uint32_t HcalTBTriggerData::algoBits0 ( ) const
inline

Definition at line 45 of file HcalTBTriggerData.h.

45 { return algoBits0_; }

References algoBits0_.

◆ algoBits1()

uint32_t HcalTBTriggerData::algoBits1 ( ) const
inline

Definition at line 44 of file HcalTBTriggerData.h.

44 { return algoBits1_; }

References algoBits1_.

◆ algoBits2()

uint32_t HcalTBTriggerData::algoBits2 ( ) const
inline

Definition at line 43 of file HcalTBTriggerData.h.

43 { return algoBits2_; }

References algoBits2_.

◆ algoBits3()

uint32_t HcalTBTriggerData::algoBits3 ( ) const
inline

Definition at line 42 of file HcalTBTriggerData.h.

42 { return algoBits3_; }

References algoBits3_.

◆ bunchNumber()

uint16_t HcalTBTriggerData::bunchNumber ( ) const
inline

Returns the bunch number of this trigger.

Definition at line 38 of file HcalTBTriggerData.h.

38 { return bunchNumber_; }

References bunchNumber_.

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

◆ eventNumber()

uint16_t HcalTBTriggerData::eventNumber ( ) const
inline

Returns the event number of this trigger.

Definition at line 40 of file HcalTBTriggerData.h.

40 { return eventNumber_; }

References eventNumber_.

Referenced by ZdcTBAnalysis::analyze(), operator<<(), and setStandardData().

◆ flagsDaqTtype()

uint32_t HcalTBTriggerData::flagsDaqTtype ( ) const
inline

Definition at line 41 of file HcalTBTriggerData.h.

41 { return flagsDaqTtype_; }

References flagsDaqTtype_.

◆ gps1234()

uint32_t HcalTBTriggerData::gps1234 ( ) const
inline

Definition at line 47 of file HcalTBTriggerData.h.

47 { return gps1234_; }

References gps1234_.

◆ gps5678()

uint32_t HcalTBTriggerData::gps5678 ( ) const
inline

Definition at line 48 of file HcalTBTriggerData.h.

48 { return gps5678_; }

References gps5678_.

◆ orbitNumber()

uint32_t HcalTBTriggerData::orbitNumber ( ) const
inline

Returns the orbit number of this trigger.

Definition at line 36 of file HcalTBTriggerData.h.

36 { return orbitNumber_; }

References orbitNumber_.

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

◆ runNumber()

uint32_t HcalTBTriggerData::runNumber ( ) const
inline

Returns the current run number.

Definition at line 26 of file HcalTBTriggerData.h.

26 { return runNumber_; }

References runNumber_.

Referenced by ZdcTBAnalysis::analyze(), operator<<(), and setExtendedData().

◆ runNumberSequenceId()

const std::string& HcalTBTriggerData::runNumberSequenceId ( ) const
inline

Definition at line 23 of file HcalTBTriggerData.h.

23 { return runNumberSequenceId_; }

References runNumberSequenceId_.

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

◆ setExtendedData()

void HcalTBTriggerData::setExtendedData ( uint32_t  triggerWord,
uint32_t  triggerTime_usec,
uint32_t  triggerTime_base,
uint32_t  spillNumber,
uint32_t  runNumber,
const char *  runNumberSequenceId 
)

◆ setStandardData()

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 37 of file HcalTBTriggerData.cc.

47  {
49  eventNumber_ = eventNumber & 0x00ffffff; // only lower 24 bits active
51  flagsDaqTtype_ = flags_daq_ttype;
52  algoBits3_ = algo_bits_3;
53  algoBits2_ = algo_bits_2;
54  algoBits1_ = algo_bits_1;
55  algoBits0_ = algo_bits_0;
56  techBits_ = tech_bits;
57  gps1234_ = gps_1234;
58  gps5678_ = gps_5678;
59 }

References algoBits0_, algoBits1_, algoBits2_, algoBits3_, bunchNumber(), bunchNumber_, eventNumber(), eventNumber_, flagsDaqTtype_, gps1234_, gps5678_, orbitNumber(), orbitNumber_, and techBits_.

Referenced by hcaltb::HcalTBTriggerDataUnpacker::unpack().

◆ spillNumber()

uint32_t HcalTBTriggerData::spillNumber ( ) const
inline

Returns the spill number of this trigger.

Definition at line 34 of file HcalTBTriggerData.h.

34 { return spillNumber_; }

References spillNumber_.

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

◆ techBits()

uint32_t HcalTBTriggerData::techBits ( ) const
inline

Definition at line 46 of file HcalTBTriggerData.h.

46 { return techBits_; }

References techBits_.

◆ triggerTimeBase()

uint32_t HcalTBTriggerData::triggerTimeBase ( ) const
inline

Returns the base time of the run (in seconds, from a time() call)

Definition at line 32 of file HcalTBTriggerData.h.

32 { return triggerTimeBase_; }

References triggerTimeBase_.

Referenced by operator<<().

◆ triggerTimeUsec()

uint32_t HcalTBTriggerData::triggerTimeUsec ( ) const
inline

Returns the relative time of this trigger in microseconds.

Definition at line 30 of file HcalTBTriggerData.h.

30 { return triggerTimeUsec_; }

References triggerTimeUsec_.

Referenced by operator<<().

◆ triggerWord()

uint32_t HcalTBTriggerData::triggerWord ( ) const
inline

◆ wasBeamTrigger()

bool HcalTBTriggerData::wasBeamTrigger ( ) const
inline

returns true if this trigger came from beam data

Definition at line 73 of file HcalTBTriggerData.h.

73 { return (triggerWord() & 0x0F) == bit_BeamTrigger; }

References bit_BeamTrigger, and triggerWord().

Referenced by ZdcTBAnalysis::analyze(), EcalTBH2TDCRecInfoProducer::produce(), and HcalQLPlotAnalAlgos::SetEventType().

◆ wasFakeTrigger()

bool HcalTBTriggerData::wasFakeTrigger ( ) const
inline

returns true if this trigger was fake (from a non-H2 manager)

Definition at line 76 of file HcalTBTriggerData.h.

76 { return (triggerWord() & 0x0F) == bit_FakeTrigger; }

References bit_FakeTrigger, and triggerWord().

Referenced by ZdcTBAnalysis::analyze().

◆ wasInSpill()

bool HcalTBTriggerData::wasInSpill ( ) const
inline

returns true if the "spill" bit was set

Definition at line 96 of file HcalTBTriggerData.h.

96 { return (triggerWord() & bit_InSpill); }

References bit_InSpill, and triggerWord().

Referenced by ZdcTBAnalysis::analyze().

◆ wasInSpillPedestalTrigger()

bool HcalTBTriggerData::wasInSpillPedestalTrigger ( ) const
inline

returns true if this was an in-spill pedestal trigger

Definition at line 87 of file HcalTBTriggerData.h.

87 { return (triggerWord() & 0x0F) == bit_InSpillPedestalTrigger; }

References bit_InSpillPedestalTrigger, and triggerWord().

Referenced by ZdcTBAnalysis::analyze(), and HcalQLPlotAnalAlgos::SetEventType().

◆ wasLaserTrigger()

bool HcalTBTriggerData::wasLaserTrigger ( ) const
inline

returns true if this was a laser trigger

Definition at line 90 of file HcalTBTriggerData.h.

90 { return (triggerWord() & 0x0F) == bit_LaserTrigger; }

References bit_LaserTrigger, and triggerWord().

Referenced by ZdcTBAnalysis::analyze(), and HcalQLPlotAnalAlgos::SetEventType().

◆ wasLEDTrigger()

bool HcalTBTriggerData::wasLEDTrigger ( ) const
inline

returns true if this was a LED trigger

Definition at line 93 of file HcalTBTriggerData.h.

93 { return (triggerWord() & 0x0F) == bit_LEDTrigger; }

References bit_LEDTrigger, and triggerWord().

Referenced by LEDTask::_isApplicable(), ZdcTBAnalysis::analyze(), and HcalQLPlotAnalAlgos::SetEventType().

◆ wasOutSpillPedestalTrigger()

bool HcalTBTriggerData::wasOutSpillPedestalTrigger ( ) const
inline

returns true if this was an out-of-spill pedestal trigger

Definition at line 84 of file HcalTBTriggerData.h.

84 { return (triggerWord() & 0x0F) == bit_OutSpillPedestalTrigger; }

References bit_OutSpillPedestalTrigger, and triggerWord().

Referenced by ZdcTBAnalysis::analyze(), and HcalQLPlotAnalAlgos::SetEventType().

◆ wasSpillIgnorantPedestalTrigger()

bool HcalTBTriggerData::wasSpillIgnorantPedestalTrigger ( ) const
inline

returns true if this trigger was a calibration trigger

Definition at line 79 of file HcalTBTriggerData.h.

79  {
80  return (triggerWord() & 0x0F) == bit_spillIgnorantPedestalTrigger;
81  }

References bit_spillIgnorantPedestalTrigger, and triggerWord().

Referenced by PedestalTask::_isApplicable(), ZdcTBAnalysis::analyze(), and HcalQLPlotAnalAlgos::SetEventType().

Member Data Documentation

◆ algoBits0_

uint32_t HcalTBTriggerData::algoBits0_
private

Definition at line 123 of file HcalTBTriggerData.h.

Referenced by algoBits0(), and setStandardData().

◆ algoBits1_

uint32_t HcalTBTriggerData::algoBits1_
private

Definition at line 122 of file HcalTBTriggerData.h.

Referenced by algoBits1(), and setStandardData().

◆ algoBits2_

uint32_t HcalTBTriggerData::algoBits2_
private

Definition at line 121 of file HcalTBTriggerData.h.

Referenced by algoBits2(), and setStandardData().

◆ algoBits3_

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 120 of file HcalTBTriggerData.h.

Referenced by algoBits3(), and setStandardData().

◆ bit_BeamTrigger

const uint32_t HcalTBTriggerData::bit_BeamTrigger = 1
static

Definition at line 98 of file HcalTBTriggerData.h.

Referenced by wasBeamTrigger().

◆ bit_FakeTrigger

const uint32_t HcalTBTriggerData::bit_FakeTrigger = 15
static

Definition at line 105 of file HcalTBTriggerData.h.

Referenced by wasFakeTrigger().

◆ bit_InSpill

const uint32_t HcalTBTriggerData::bit_InSpill = 0x10
static

Definition at line 107 of file HcalTBTriggerData.h.

Referenced by wasInSpill().

◆ bit_InSpillPedestalTrigger

const uint32_t HcalTBTriggerData::bit_InSpillPedestalTrigger = 2
static

Definition at line 99 of file HcalTBTriggerData.h.

Referenced by wasInSpillPedestalTrigger().

◆ bit_LaserTrigger

const uint32_t HcalTBTriggerData::bit_LaserTrigger = 4
static

Definition at line 101 of file HcalTBTriggerData.h.

Referenced by wasLaserTrigger().

◆ bit_LEDTrigger

const uint32_t HcalTBTriggerData::bit_LEDTrigger = 6
static

Definition at line 103 of file HcalTBTriggerData.h.

Referenced by wasLEDTrigger().

◆ bit_OutSpillPedestalTrigger

const uint32_t HcalTBTriggerData::bit_OutSpillPedestalTrigger = 3
static

Definition at line 100 of file HcalTBTriggerData.h.

Referenced by wasOutSpillPedestalTrigger().

◆ bit_spillIgnorantPedestalTrigger

const uint32_t HcalTBTriggerData::bit_spillIgnorantPedestalTrigger = 5
static

Definition at line 102 of file HcalTBTriggerData.h.

Referenced by wasSpillIgnorantPedestalTrigger().

◆ bunchNumber_

uint16_t HcalTBTriggerData::bunchNumber_
private

Definition at line 117 of file HcalTBTriggerData.h.

Referenced by bunchNumber(), and setStandardData().

◆ eventNumber_

uint32_t HcalTBTriggerData::eventNumber_
private

Definition at line 118 of file HcalTBTriggerData.h.

Referenced by eventNumber(), and setStandardData().

◆ flagsDaqTtype_

uint32_t HcalTBTriggerData::flagsDaqTtype_
private

Definition at line 119 of file HcalTBTriggerData.h.

Referenced by flagsDaqTtype(), and setStandardData().

◆ gps1234_

uint32_t HcalTBTriggerData::gps1234_
private

Definition at line 125 of file HcalTBTriggerData.h.

Referenced by gps1234(), and setStandardData().

◆ gps5678_

uint32_t HcalTBTriggerData::gps5678_
private

Definition at line 126 of file HcalTBTriggerData.h.

Referenced by gps5678(), and setStandardData().

◆ orbitNumber_

uint32_t HcalTBTriggerData::orbitNumber_
private

Definition at line 116 of file HcalTBTriggerData.h.

Referenced by orbitNumber(), and setStandardData().

◆ runNumber_

uint32_t HcalTBTriggerData::runNumber_
private

Definition at line 111 of file HcalTBTriggerData.h.

Referenced by runNumber(), and setExtendedData().

◆ runNumberSequenceId_

std::string HcalTBTriggerData::runNumberSequenceId_
private

Definition at line 110 of file HcalTBTriggerData.h.

Referenced by runNumberSequenceId(), and setExtendedData().

◆ spillNumber_

uint32_t HcalTBTriggerData::spillNumber_
private

Definition at line 115 of file HcalTBTriggerData.h.

Referenced by setExtendedData(), and spillNumber().

◆ techBits_

uint32_t HcalTBTriggerData::techBits_
private

Definition at line 124 of file HcalTBTriggerData.h.

Referenced by setStandardData(), and techBits().

◆ triggerTimeBase_

uint32_t HcalTBTriggerData::triggerTimeBase_
private

Definition at line 114 of file HcalTBTriggerData.h.

Referenced by setExtendedData(), and triggerTimeBase().

◆ triggerTimeUsec_

uint32_t HcalTBTriggerData::triggerTimeUsec_
private

Definition at line 113 of file HcalTBTriggerData.h.

Referenced by setExtendedData(), and triggerTimeUsec().

◆ triggerWord_

uint32_t HcalTBTriggerData::triggerWord_
private

Definition at line 112 of file HcalTBTriggerData.h.

Referenced by setExtendedData(), and triggerWord().

HcalTBTriggerData::bit_LaserTrigger
static const uint32_t bit_LaserTrigger
Definition: HcalTBTriggerData.h:101
HcalTBTriggerData::flagsDaqTtype_
uint32_t flagsDaqTtype_
Definition: HcalTBTriggerData.h:119
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::eventNumber
uint16_t eventNumber() const
Returns the event number of this trigger.
Definition: HcalTBTriggerData.h:40
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::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
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::algoBits2_
uint32_t algoBits2_
Definition: HcalTBTriggerData.h:121
HcalTBTriggerData::algoBits0_
uint32_t algoBits0_
Definition: HcalTBTriggerData.h:123
HcalTBTriggerData::triggerTimeBase_
uint32_t triggerTimeBase_
Definition: HcalTBTriggerData.h:114
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::triggerTimeUsec_
uint32_t triggerTimeUsec_
Definition: HcalTBTriggerData.h:113
HcalTBTriggerData::algoBits1_
uint32_t algoBits1_
Definition: HcalTBTriggerData.h:122
HcalTBTriggerData::bit_BeamTrigger
static const uint32_t bit_BeamTrigger
Definition: HcalTBTriggerData.h:98
HcalTBTriggerData::bit_spillIgnorantPedestalTrigger
static const uint32_t bit_spillIgnorantPedestalTrigger
Definition: HcalTBTriggerData.h:102
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
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