CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 70 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(), str, HcalSourcePositionData::tubeDescriptionFromSD(), HcalSourcePositionData::tubeId(), and HcalSourcePositionData::tubeNameFromCoord().

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