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) {}
std::string runNumberSequenceId_
uint32_t algoBits3_
<extended type="31:28,extended" size="27:24,zeros=23:7,daq#=6:4,type=3:0">

Member Function Documentation

◆ algoBits0()

uint32_t HcalTBTriggerData::algoBits0 ( ) const
inline

Definition at line 45 of file HcalTBTriggerData.h.

References algoBits0_.

45 { return algoBits0_; }

◆ algoBits1()

uint32_t HcalTBTriggerData::algoBits1 ( ) const
inline

Definition at line 44 of file HcalTBTriggerData.h.

References algoBits1_.

44 { return algoBits1_; }

◆ algoBits2()

uint32_t HcalTBTriggerData::algoBits2 ( ) const
inline

Definition at line 43 of file HcalTBTriggerData.h.

References algoBits2_.

43 { return algoBits2_; }

◆ algoBits3()

uint32_t HcalTBTriggerData::algoBits3 ( ) const
inline

Definition at line 42 of file HcalTBTriggerData.h.

References algoBits3_.

42 { return algoBits3_; }
uint32_t algoBits3_
<extended type="31:28,extended" size="27:24,zeros=23:7,daq#=6:4,type=3:0">

◆ bunchNumber()

uint16_t HcalTBTriggerData::bunchNumber ( ) const
inline

Returns the bunch number of this trigger.

Definition at line 38 of file HcalTBTriggerData.h.

References bunchNumber_.

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

38 { return bunchNumber_; }

◆ eventNumber()

uint16_t HcalTBTriggerData::eventNumber ( ) const
inline

Returns the event number of this trigger.

Definition at line 40 of file HcalTBTriggerData.h.

References eventNumber_.

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

40 { return eventNumber_; }

◆ flagsDaqTtype()

uint32_t HcalTBTriggerData::flagsDaqTtype ( ) const
inline

Definition at line 41 of file HcalTBTriggerData.h.

References flagsDaqTtype_.

41 { return flagsDaqTtype_; }

◆ gps1234()

uint32_t HcalTBTriggerData::gps1234 ( ) const
inline

Definition at line 47 of file HcalTBTriggerData.h.

References gps1234_.

47 { return gps1234_; }

◆ gps5678()

uint32_t HcalTBTriggerData::gps5678 ( ) const
inline

Definition at line 48 of file HcalTBTriggerData.h.

References gps5678_.

48 { return gps5678_; }

◆ orbitNumber()

uint32_t HcalTBTriggerData::orbitNumber ( ) const
inline

Returns the orbit number of this trigger.

Definition at line 36 of file HcalTBTriggerData.h.

References orbitNumber_.

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

36 { return orbitNumber_; }

◆ runNumber()

uint32_t HcalTBTriggerData::runNumber ( ) const
inline

Returns the current run number.

Definition at line 26 of file HcalTBTriggerData.h.

References runNumber_.

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

26 { return runNumber_; }

◆ runNumberSequenceId()

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

Definition at line 23 of file HcalTBTriggerData.h.

References runNumberSequenceId_.

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

23 { return runNumberSequenceId_; }
std::string runNumberSequenceId_

◆ setExtendedData()

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

References runNumber(), runNumber_, runNumberSequenceId(), runNumberSequenceId_, spillNumber(), spillNumber_, triggerTimeBase_, triggerTimeUsec_, triggerWord(), and triggerWord_.

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

66  {
68  triggerTimeUsec_ = triggerTime_usec;
69  triggerTimeBase_ = triggerTime_base;
73 }
uint32_t runNumber() const
Returns the current run number.
uint32_t spillNumber() const
Returns the spill number of this trigger.
std::string runNumberSequenceId_
const std::string & runNumberSequenceId() const
uint32_t triggerWord() const
Returns the entire packed trigger word.

◆ 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.

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

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

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 }
uint16_t eventNumber() const
Returns the event number of this trigger.
uint16_t bunchNumber() const
Returns the bunch number of this trigger.
uint32_t algoBits3_
<extended type="31:28,extended" size="27:24,zeros=23:7,daq#=6:4,type=3:0">
uint32_t orbitNumber() const
Returns the orbit number of this trigger.

◆ spillNumber()

uint32_t HcalTBTriggerData::spillNumber ( ) const
inline

Returns the spill number of this trigger.

Definition at line 34 of file HcalTBTriggerData.h.

References spillNumber_.

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

34 { return spillNumber_; }

◆ techBits()

uint32_t HcalTBTriggerData::techBits ( ) const
inline

Definition at line 46 of file HcalTBTriggerData.h.

References techBits_.

46 { return 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.

References triggerTimeBase_.

Referenced by operator<<().

32 { return triggerTimeBase_; }

◆ triggerTimeUsec()

uint32_t HcalTBTriggerData::triggerTimeUsec ( ) const
inline

Returns the relative time of this trigger in microseconds.

Definition at line 30 of file HcalTBTriggerData.h.

References triggerTimeUsec_.

Referenced by operator<<().

30 { return triggerTimeUsec_; }

◆ 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.

References bit_BeamTrigger, and triggerWord().

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

73 { return (triggerWord() & 0x0F) == bit_BeamTrigger; }
static const uint32_t bit_BeamTrigger
uint32_t triggerWord() const
Returns the entire packed trigger word.

◆ 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.

References bit_FakeTrigger, and triggerWord().

Referenced by ZdcTBAnalysis::analyze().

76 { return (triggerWord() & 0x0F) == bit_FakeTrigger; }
static const uint32_t bit_FakeTrigger
uint32_t triggerWord() const
Returns the entire packed trigger word.

◆ wasInSpill()

bool HcalTBTriggerData::wasInSpill ( ) const
inline

returns true if the "spill" bit was set

Definition at line 96 of file HcalTBTriggerData.h.

References bit_InSpill, and triggerWord().

Referenced by ZdcTBAnalysis::analyze().

96 { return (triggerWord() & bit_InSpill); }
static const uint32_t bit_InSpill
uint32_t triggerWord() const
Returns the entire packed trigger word.

◆ wasInSpillPedestalTrigger()

bool HcalTBTriggerData::wasInSpillPedestalTrigger ( ) const
inline

returns true if this was an in-spill pedestal trigger

Definition at line 87 of file HcalTBTriggerData.h.

References bit_InSpillPedestalTrigger, and triggerWord().

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

87 { return (triggerWord() & 0x0F) == bit_InSpillPedestalTrigger; }
static const uint32_t bit_InSpillPedestalTrigger
uint32_t triggerWord() const
Returns the entire packed trigger word.

◆ wasLaserTrigger()

bool HcalTBTriggerData::wasLaserTrigger ( ) const
inline

returns true if this was a laser trigger

Definition at line 90 of file HcalTBTriggerData.h.

References bit_LaserTrigger, and triggerWord().

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

90 { return (triggerWord() & 0x0F) == bit_LaserTrigger; }
static const uint32_t bit_LaserTrigger
uint32_t triggerWord() const
Returns the entire packed trigger word.

◆ wasLEDTrigger()

bool HcalTBTriggerData::wasLEDTrigger ( ) const
inline

returns true if this was a LED trigger

Definition at line 93 of file HcalTBTriggerData.h.

References bit_LEDTrigger, and triggerWord().

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

93 { return (triggerWord() & 0x0F) == bit_LEDTrigger; }
static const uint32_t bit_LEDTrigger
uint32_t triggerWord() const
Returns the entire packed trigger word.

◆ 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.

References bit_OutSpillPedestalTrigger, and triggerWord().

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

84 { return (triggerWord() & 0x0F) == bit_OutSpillPedestalTrigger; }
static const uint32_t bit_OutSpillPedestalTrigger
uint32_t triggerWord() const
Returns the entire packed trigger word.

◆ wasSpillIgnorantPedestalTrigger()

bool HcalTBTriggerData::wasSpillIgnorantPedestalTrigger ( ) const
inline

returns true if this trigger was a calibration trigger

Definition at line 79 of file HcalTBTriggerData.h.

References bit_spillIgnorantPedestalTrigger, and triggerWord().

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

79  {
80  return (triggerWord() & 0x0F) == bit_spillIgnorantPedestalTrigger;
81  }
static const uint32_t bit_spillIgnorantPedestalTrigger
uint32_t triggerWord() const
Returns the entire packed trigger word.

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().