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.

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

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 }
uint16_t eventNumber() const
Returns the event number of this trigger.
uint32_t runNumber() const
Returns the current run number.
uint32_t spillNumber() const
Returns the spill number of this trigger.
uint32_t triggerTimeUsec() const
Returns the relative time of this trigger in microseconds.
uint16_t bunchNumber() const
Returns the bunch number of this trigger.
uint32_t triggerTimeBase() const
Returns the base time of the run (in seconds, from a time() call)
const std::string & runNumberSequenceId() const
uint32_t orbitNumber() const
Returns the orbit number of this trigger.
#define str(s)
uint32_t triggerWord() const
Returns the entire packed trigger word.