CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
HcalTBTriggerData.h File Reference
#include <string>
#include <iostream>
#include "boost/cstdint.hpp"

Go to the source code of this file.

Classes

class  HcalTBTriggerData
 

Functions

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

Function Documentation

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

Definition at line 79 of file HcalTBTriggerData.cc.

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

79  {
80  char str[50];
81  s << htbtd.runNumberSequenceId() << ":";
82  s << htbtd.runNumber() << ":";
83  s << htbtd.eventNumber() << endl;
84 
85  s << " Spill# =" << htbtd.spillNumber() << endl;
86  s << " Bunch# =" << htbtd.bunchNumber() << endl;
87  s << " Orbit# =" << htbtd.orbitNumber() << endl;
88 
89  sprintf(str, " Trigger word = %08x\n", htbtd.triggerWord());
90  s << str;
91 
92  int32_t trigtimebase = (int32_t)htbtd.triggerTimeBase();
93  uint32_t trigtimeusec = htbtd.triggerTimeUsec();
94 
95  // trim seconds off of usec and add to base
96  trigtimebase += trigtimeusec/1000000;
97  trigtimeusec %= 1000000;
98 
99  sprintf(str, " Trigger time: %s", ctime((time_t *)&trigtimebase));
100  s << str;
101  sprintf(str, " %d us\n", trigtimeusec);
102  s << str;
103 
104  return s;
105  }
uint32_t triggerWord() const
Returns the entire packed trigger word.
const std::string & runNumberSequenceId() const
uint32_t spillNumber() const
Returns the spill number of this trigger.
uint32_t orbitNumber() const
Returns the orbit number of this trigger.
uint32_t triggerTimeUsec() const
Returns the relative time of this trigger in microseconds.
uint16_t eventNumber() const
Returns the event number of this trigger.
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)
uint32_t runNumber() const
Returns the current run number.