CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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:
2006/04/12 21:46:00
Revision:
1.3
Author
P. Dudero - Minnesota

Definition at line 18 of file HcalTBTriggerData.h.

Constructor & Destructor Documentation

HcalTBTriggerData::HcalTBTriggerData ( )

Definition at line 19 of file HcalTBTriggerData.cc.

19  :
21  runNumber_(0),
22  triggerWord_(0),
25  spillNumber_(0),
26  orbitNumber_(0),
27  bunchNumber_(0),
28  eventNumber_(0),
29  flagsDaqTtype_(0),
30  algoBits3_(0),
31  algoBits2_(0),
32  algoBits1_(0),
33  algoBits0_(0),
34  techBits_(0),
35  gps1234_(0),
36  gps5678_(0) {
37  }
std::string runNumberSequenceId_
uint32_t algoBits3_
&lt;extended type=&quot;31:28,extended&quot; size=&quot;27:24,zeros=23:7,daq#=6:4,type=3:0&quot;&gt;

Member Function Documentation

uint32_t HcalTBTriggerData::algoBits0 ( ) const
inline

Definition at line 46 of file HcalTBTriggerData.h.

References algoBits0_.

46 { return algoBits0_; }
uint32_t HcalTBTriggerData::algoBits1 ( ) const
inline

Definition at line 45 of file HcalTBTriggerData.h.

References algoBits1_.

45 { return algoBits1_; }
uint32_t HcalTBTriggerData::algoBits2 ( ) const
inline

Definition at line 44 of file HcalTBTriggerData.h.

References algoBits2_.

44 { return algoBits2_; }
uint32_t HcalTBTriggerData::algoBits3 ( ) const
inline

Definition at line 43 of file HcalTBTriggerData.h.

References algoBits3_.

43 { return algoBits3_; }
uint32_t algoBits3_
&lt;extended type=&quot;31:28,extended&quot; size=&quot;27:24,zeros=23:7,daq#=6:4,type=3:0&quot;&gt;
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().

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

41 { return eventNumber_; }
uint32_t HcalTBTriggerData::flagsDaqTtype ( ) const
inline

Definition at line 42 of file HcalTBTriggerData.h.

References flagsDaqTtype_.

42 { return flagsDaqTtype_; }
uint32_t HcalTBTriggerData::gps1234 ( ) const
inline

Definition at line 48 of file HcalTBTriggerData.h.

References gps1234_.

48 { return gps1234_; }
uint32_t HcalTBTriggerData::gps5678 ( ) const
inline

Definition at line 49 of file HcalTBTriggerData.h.

References gps5678_.

49 { return gps5678_; }
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().

37 { 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<<(), CastorMonitorSelector::processEvent(), HcalMonitorSelector::processEvent(), and setExtendedData().

27 { return runNumber_; }
const std::string& HcalTBTriggerData::runNumberSequenceId ( ) const
inline

Definition at line 24 of file HcalTBTriggerData.h.

References runNumberSequenceId_.

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

24 { return runNumberSequenceId_; }
std::string 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().

70  {
72  triggerTimeUsec_ = triggerTime_usec;
73  triggerTimeBase_ = triggerTime_base;
77  }
uint32_t triggerWord() const
Returns the entire packed trigger word.
std::string runNumberSequenceId_
const std::string & runNumberSequenceId() const
uint32_t spillNumber() const
Returns the spill number of this trigger.
uint32_t runNumber() const
Returns the current run number.
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().

50  {
51 
53  eventNumber_ = eventNumber & 0x00ffffff; // only lower 24 bits active
55  flagsDaqTtype_ = flags_daq_ttype;
56  algoBits3_ = algo_bits_3;
57  algoBits2_ = algo_bits_2;
58  algoBits1_ = algo_bits_1;
59  algoBits0_ = algo_bits_0;
60  techBits_ = tech_bits;
61  gps1234_ = gps_1234;
62  gps5678_ = gps_5678;
63  }
uint32_t algoBits3_
&lt;extended type=&quot;31:28,extended&quot; size=&quot;27:24,zeros=23:7,daq#=6:4,type=3:0&quot;&gt;
uint32_t orbitNumber() const
Returns the orbit number of this trigger.
uint16_t eventNumber() const
Returns the event number of this trigger.
uint16_t bunchNumber() const
Returns the bunch number of this trigger.
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().

35 { return spillNumber_; }
uint32_t HcalTBTriggerData::techBits ( ) const
inline

Definition at line 47 of file HcalTBTriggerData.h.

References techBits_.

47 { return techBits_; }
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<<().

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

31 { return triggerTimeUsec_; }
uint32_t HcalTBTriggerData::triggerWord ( ) const
inline
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().

74  {
75  return (triggerWord()&0x0F)==bit_BeamTrigger;
76  }
uint32_t triggerWord() const
Returns the entire packed trigger word.
static const uint32_t 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().

79  {
80  return (triggerWord()&0x0F)==bit_FakeTrigger;
81  }
uint32_t triggerWord() const
Returns the entire packed trigger word.
static const uint32_t 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().

109  {
110  return (triggerWord()&bit_InSpill);
111  }
uint32_t triggerWord() const
Returns the entire packed trigger word.
static const uint32_t 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(), CastorMonitorSelector::processEvent(), HcalMonitorSelector::processEvent(), and HcalQLPlotAnalAlgos::SetEventType().

94  {
95  return (triggerWord()&0x0F)==bit_InSpillPedestalTrigger;
96  }
uint32_t triggerWord() const
Returns the entire packed trigger word.
static const uint32_t 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().

99  {
100  return (triggerWord()&0x0F)==bit_LaserTrigger;
101  }
static const uint32_t bit_LaserTrigger
uint32_t triggerWord() const
Returns the entire packed trigger word.
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().

104  {
105  return (triggerWord()&0x0F)==bit_LEDTrigger;
106  }
uint32_t triggerWord() const
Returns the entire packed trigger word.
static const uint32_t 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(), CastorMonitorSelector::processEvent(), HcalMonitorSelector::processEvent(), and HcalQLPlotAnalAlgos::SetEventType().

89  {
91  }
uint32_t triggerWord() const
Returns the entire packed trigger word.
static const uint32_t 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().

84  {
86  }
uint32_t triggerWord() const
Returns the entire packed trigger word.
static const uint32_t bit_spillIgnorantPedestalTrigger

Member Data Documentation

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