CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/TBDataFormats/HcalTBObjects/src/HcalTBTriggerData.cc File Reference

#include "TBDataFormats/HcalTBObjects/interface/HcalTBTriggerData.h"
#include <cstdio>
#include <stdint.h>

Go to the source code of this file.

Functions

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

Function Documentation

ostream& operator<< ( 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().

                                                                  {
    char str[50];
    s << htbtd.runNumberSequenceId() << ":";
    s << htbtd.runNumber() << ":";
    s << htbtd.eventNumber() << endl;

    s << "  Spill# =" << htbtd.spillNumber() << endl;
    s << "  Bunch# =" << htbtd.bunchNumber() << endl;
    s << "  Orbit# =" << htbtd.orbitNumber() << endl;

    sprintf(str, "  Trigger word = %08x\n", htbtd.triggerWord());
    s << str;

    int32_t  trigtimebase = (int32_t)htbtd.triggerTimeBase();
    uint32_t trigtimeusec = htbtd.triggerTimeUsec();

    // trim seconds off of usec and add to base
    trigtimebase += trigtimeusec/1000000;
    trigtimeusec %= 1000000;
    
    sprintf(str, "  Trigger time: %s", ctime((time_t *)&trigtimebase));
    s << str;
    sprintf(str, "                %d us\n", trigtimeusec);
    s << str;

    return s;
  }