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 70 of file HcalSourcePositionData.cc.

References 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::tubeId(), HcalSourcePositionData::tubeNameFromCoord(), and HcalSourcePositionData::tubeNameFromSD().

70  {
71 
72  s << " Message Counter =" << hspd.messageCounter() << endl;
73  s << " Index Counter =" << hspd.indexCounter() << endl;
74  s << " Reel Counter =" << hspd.reelCounter() << endl;
75  s << " Status =" << hex << hspd.status() << dec << endl;
76  s << " Motor Current =" << hspd.motorCurrent() << endl;
77  s << " Motor Voltage =" << hspd.motorVoltage() << endl;
78  s << " Tube Id =" << hspd.tubeId() << endl;
79  s << " Driver Id =" << hspd.driverId() << endl;
80  s << " Source Id =" << hspd.sourceId() << endl;
81  s << " TubeNameFromCoord =" << hspd.tubeNameFromCoord() << endl;
82  s << " TubeNameFromSD =" << hspd.tubeNameFromSD() << endl;
83  s << " Last Command =" << hspd.lastCommand() << endl;
84  s << " Message =" << hspd.message() << endl;
85 
86  int timebase =0; 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; timeusec=0;
95  hspd.getDAQTimestamp(timebase,timeusec);
96  timeusec %= 1000000;
97  timebase += timeusec/1000000;
98 
99  sprintf(str, " DAQ Timestamp : %s", ctime((time_t *)&timebase));
100  s << str;
101 
102  return s;
103 }
std::string tubeNameFromCoord() const
std::string lastCommand() const
void getDriverTimestamp(int &seconds, int &useconds) const
void getDAQTimestamp(int &seconds, int &useconds) const
std::string message() const
std::string tubeNameFromSD() const