CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/DataFormats/HcalRecHit/src/HcalSourcePositionData.cc File Reference

#include "DataFormats/HcalRecHit/interface/HcalSourcePositionData.h"
#include <cstdio>

Go to the source code of this file.

Functions

ostream & operator<< (ostream &s, const HcalSourcePositionData &hspd)

Function Documentation

ostream& operator<< ( ostream &  s,
const HcalSourcePositionData hspd 
)

Definition at line 61 of file HcalSourcePositionData.cc.

References HcalSourcePositionData::driverId(), HcalSourcePositionData::getDAQTimestamp(), HcalSourcePositionData::getDriverTimestamp(), HcalSourcePositionData::indexCounter(), HcalSourcePositionData::messageCounter(), HcalSourcePositionData::motorCurrent(), HcalSourcePositionData::reelCounter(), alignCSCRings::s, HcalSourcePositionData::sourceId(), HcalSourcePositionData::speed(), HcalSourcePositionData::status(), and HcalSourcePositionData::tubeId().

                                                                    {

  s << "  Message Counter =" << hspd.messageCounter() << endl;
  s << "  Index Counter   =" << hspd.indexCounter() << endl;
  s << "  Reel Counter    =" << hspd.reelCounter() << endl;
  s << "  Status          =" << hex << hspd.status() << dec << endl;
  s << "  Motor Current   =" << hspd.motorCurrent() << endl;
  s << "  Speed           =" << hspd.speed() << endl;
  s << "  Tube Id         =" << hspd.tubeId() << endl;
  s << "  Driver Id       =" << hspd.driverId() << endl;
  s << "  Source Id       =" << hspd.sourceId() << endl;
  
  int timebase =0; int timeusec=0;
  hspd.getDriverTimestamp(timebase,timeusec);
  // trim seconds off of usec and add to base
  timeusec %= 1000000;
  timebase += timeusec/1000000;
  char str[50];
  sprintf(str, "  Driver Timestamp : %s", ctime((time_t *)&timebase));
  s << str;
  timebase=0; timeusec=0;
  hspd.getDAQTimestamp(timebase,timeusec);
  timeusec %= 1000000;
  timebase += timeusec/1000000;
  
  sprintf(str, "  DAQ Timestamp : %s", ctime((time_t *)&timebase));
  s << str;
  
  return s;
}