CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
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 72 of file HcalSourcePositionData.cc.

References TauDecayModes::dec, HcalSourcePositionData::driverId(), HcalSourcePositionData::getDAQTimestamp(), HcalSourcePositionData::getDriverTimestamp(), HcalSourcePositionData::indexCounter(), HcalSourcePositionData::lastCommand(), HcalSourcePositionData::message(), HcalSourcePositionData::messageCounter(), HcalSourcePositionData::motorCurrent(), HcalSourcePositionData::motorVoltage(), HcalSourcePositionData::reelCounter(), alignCSCRings::s, HcalSourcePositionData::sourceId(), HcalSourcePositionData::status(), HcalSourcePositionData::tubeDescriptionFromSD(), HcalSourcePositionData::tubeId(), and HcalSourcePositionData::tubeNameFromCoord().

72  {
73 
74  s << " Message Counter =" << hspd.messageCounter() << endl;
75  s << " Index Counter =" << hspd.indexCounter() << endl;
76  s << " Reel Counter =" << hspd.reelCounter() << endl;
77  s << " Status =" << hex << hspd.status() << dec << endl;
78  s << " Motor Current =" << hspd.motorCurrent() << endl;
79  s << " Motor Voltage =" << hspd.motorVoltage() << endl;
80  s << " Tube Id =" << hspd.tubeId() << endl;
81  s << " Driver Id =" << hspd.driverId() << endl;
82  s << " Source Id =" << hspd.sourceId() << endl;
83  s << " TubeNameFromCoord =" << hspd.tubeNameFromCoord() << endl;
84  s << " TubeDescriptionFromSD =" << hspd.tubeDescriptionFromSD() << endl;
85  s << " Last Command =" << hspd.lastCommand() << endl;
86  s << " Message =" << hspd.message() << endl;
87 
88  int timebase =0; int timeusec=0;
89  hspd.getDriverTimestamp(timebase,timeusec);
90  // trim seconds off of usec and add to base
91  timeusec %= 1000000;
92  timebase += timeusec/1000000;
93  char str[50];
94  sprintf(str, " Driver Timestamp : %s", ctime((time_t *)&timebase));
95  s << str;
96  timebase=0; timeusec=0;
97  hspd.getDAQTimestamp(timebase,timeusec);
98  timeusec %= 1000000;
99  timebase += timeusec/1000000;
100 
101  sprintf(str, " DAQ Timestamp : %s", ctime((time_t *)&timebase));
102  s << str;
103 
104  return s;
105 }
std::string tubeNameFromCoord() const
std::string tubeDescriptionFromSD() const
std::string lastCommand() const
void getDriverTimestamp(int &seconds, int &useconds) const
void getDAQTimestamp(int &seconds, int &useconds) const
std::string message() const