CMS 3D CMS Logo

Functions
HcalTBTriggerData.cc File Reference
#include "TBDataFormats/HcalTBObjects/interface/HcalTBTriggerData.h"
#include <cstdio>
#include <cstdint>

Go to the source code of this file.

Functions

ostream & operator<< (ostream &s, const HcalTBTriggerData &htbtd)
 

Function Documentation

◆ operator<<()

ostream& operator<< ( ostream &  s,
const HcalTBTriggerData htbtd 
)

Definition at line 75 of file HcalTBTriggerData.cc.

75  {
76  char str[50];
77  s << htbtd.runNumberSequenceId() << ":";
78  s << htbtd.runNumber() << ":";
79  s << htbtd.eventNumber() << endl;
80 
81  s << " Spill# =" << htbtd.spillNumber() << endl;
82  s << " Bunch# =" << htbtd.bunchNumber() << endl;
83  s << " Orbit# =" << htbtd.orbitNumber() << endl;
84 
85  sprintf(str, " Trigger word = %08x\n", htbtd.triggerWord());
86  s << str;
87 
88  int32_t trigtimebase = (int32_t)htbtd.triggerTimeBase();
89  uint32_t trigtimeusec = htbtd.triggerTimeUsec();
90 
91  // trim seconds off of usec and add to base
92  trigtimebase += trigtimeusec / 1000000;
93  trigtimeusec %= 1000000;
94 
95  sprintf(str, " Trigger time: %s", ctime((time_t*)&trigtimebase));
96  s << str;
97  sprintf(str, " %d us\n", trigtimeusec);
98  s << str;
99 
100  return s;
101 }

References HcalTBTriggerData::bunchNumber(), HcalTBTriggerData::eventNumber(), HcalTBTriggerData::orbitNumber(), HcalTBTriggerData::runNumber(), HcalTBTriggerData::runNumberSequenceId(), alignCSCRings::s, HcalTBTriggerData::spillNumber(), str, HcalTBTriggerData::triggerTimeBase(), HcalTBTriggerData::triggerTimeUsec(), and HcalTBTriggerData::triggerWord().

HcalTBTriggerData::spillNumber
uint32_t spillNumber() const
Returns the spill number of this trigger.
Definition: HcalTBTriggerData.h:34
HcalTBTriggerData::eventNumber
uint16_t eventNumber() const
Returns the event number of this trigger.
Definition: HcalTBTriggerData.h:40
HcalTBTriggerData::runNumber
uint32_t runNumber() const
Returns the current run number.
Definition: HcalTBTriggerData.h:26
alignCSCRings.s
s
Definition: alignCSCRings.py:92
HcalTBTriggerData::triggerTimeUsec
uint32_t triggerTimeUsec() const
Returns the relative time of this trigger in microseconds.
Definition: HcalTBTriggerData.h:30
HcalTBTriggerData::bunchNumber
uint16_t bunchNumber() const
Returns the bunch number of this trigger.
Definition: HcalTBTriggerData.h:38
str
#define str(s)
Definition: TestProcessor.cc:53
HcalTBTriggerData::runNumberSequenceId
const std::string & runNumberSequenceId() const
Definition: HcalTBTriggerData.h:23
HcalTBTriggerData::triggerTimeBase
uint32_t triggerTimeBase() const
Returns the base time of the run (in seconds, from a time() call)
Definition: HcalTBTriggerData.h:32
HcalTBTriggerData::orbitNumber
uint32_t orbitNumber() const
Returns the orbit number of this trigger.
Definition: HcalTBTriggerData.h:36
HcalTBTriggerData::triggerWord
uint32_t triggerWord() const
Returns the entire packed trigger word.
Definition: HcalTBTriggerData.h:28