Go to the documentation of this file.00001 #ifndef HCALTBTRIGGERDATA_H
00002 #define HCALTBTRIGGERDATA_H 1
00003
00004 #include <string>
00005 #include <iostream>
00006 #include "boost/cstdint.hpp"
00007
00008
00018 class HcalTBTriggerData {
00019 public:
00020 HcalTBTriggerData();
00021
00022
00023
00024 const std::string& runNumberSequenceId() const { return runNumberSequenceId_; }
00025
00027 uint32_t runNumber() const { return runNumber_; }
00029 uint32_t triggerWord() const { return triggerWord_; }
00031 uint32_t triggerTimeUsec() const { return triggerTimeUsec_; }
00033 uint32_t triggerTimeBase() const { return triggerTimeBase_; }
00035 uint32_t spillNumber() const { return spillNumber_; }
00037 uint32_t orbitNumber() const { return orbitNumber_; }
00039 uint16_t bunchNumber() const { return bunchNumber_; }
00041 uint16_t eventNumber() const { return eventNumber_; }
00042 uint32_t flagsDaqTtype() const { return flagsDaqTtype_; }
00043 uint32_t algoBits3() const { return algoBits3_; }
00044 uint32_t algoBits2() const { return algoBits2_; }
00045 uint32_t algoBits1() const { return algoBits1_; }
00046 uint32_t algoBits0() const { return algoBits0_; }
00047 uint32_t techBits() const { return techBits_; }
00048 uint32_t gps1234() const { return gps1234_; }
00049 uint32_t gps5678() const { return gps5678_; }
00050
00051
00052 void setStandardData( uint32_t orbitNumber,
00053 uint32_t eventNumber,
00054 uint16_t bunchNumber,
00055 uint32_t flags_daq_ttype,
00056 uint32_t algo_bits_3,
00057 uint32_t algo_bits_2,
00058 uint32_t algo_bits_1,
00059 uint32_t algo_bits_0,
00060 uint32_t tech_bits,
00061 uint32_t gps_1234,
00062 uint32_t gps_5678 );
00063
00064 void setExtendedData( uint32_t triggerWord,
00065 uint32_t triggerTime_usec,
00066 uint32_t triggerTime_base,
00067 uint32_t spillNumber,
00068 uint32_t runNumber,
00069 const char *runNumberSequenceId );
00070
00071
00072
00074 inline bool wasBeamTrigger() const {
00075 return (triggerWord()&0x0F)==bit_BeamTrigger;
00076 }
00077
00079 inline bool wasFakeTrigger() const {
00080 return (triggerWord()&0x0F)==bit_FakeTrigger;
00081 }
00082
00084 inline bool wasSpillIgnorantPedestalTrigger() const {
00085 return (triggerWord()&0x0F)==bit_spillIgnorantPedestalTrigger;
00086 }
00087
00089 inline bool wasOutSpillPedestalTrigger() const {
00090 return (triggerWord()&0x0F)==bit_OutSpillPedestalTrigger;
00091 }
00092
00094 inline bool wasInSpillPedestalTrigger() const {
00095 return (triggerWord()&0x0F)==bit_InSpillPedestalTrigger;
00096 }
00097
00099 inline bool wasLaserTrigger() const {
00100 return (triggerWord()&0x0F)==bit_LaserTrigger;
00101 }
00102
00104 inline bool wasLEDTrigger() const {
00105 return (triggerWord()&0x0F)==bit_LEDTrigger;
00106 }
00107
00109 inline bool wasInSpill() const {
00110 return (triggerWord()&bit_InSpill);
00111 }
00112
00113 static const uint32_t bit_BeamTrigger;
00114 static const uint32_t bit_InSpillPedestalTrigger;
00115 static const uint32_t bit_OutSpillPedestalTrigger;
00116 static const uint32_t bit_LaserTrigger;
00117 static const uint32_t bit_spillIgnorantPedestalTrigger;
00118 static const uint32_t bit_LEDTrigger;
00119
00120 static const uint32_t bit_FakeTrigger;
00121
00122 static const uint32_t bit_InSpill;
00123
00124 private:
00125 std::string runNumberSequenceId_;
00126 uint32_t runNumber_;
00127 uint32_t triggerWord_;
00128 uint32_t triggerTimeUsec_;
00129 uint32_t triggerTimeBase_;
00130 uint32_t spillNumber_;
00131 uint32_t orbitNumber_;
00132 uint16_t bunchNumber_;
00133 uint32_t eventNumber_;
00134 uint32_t flagsDaqTtype_;
00135 uint32_t algoBits3_;
00136 uint32_t algoBits2_;
00137 uint32_t algoBits1_;
00138 uint32_t algoBits0_;
00139 uint32_t techBits_;
00140 uint32_t gps1234_;
00141 uint32_t gps5678_;
00142 };
00143
00144 std::ostream& operator<<(std::ostream& s, const HcalTBTriggerData& htbtd);
00145
00146 #endif