CMS 3D CMS Logo

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

◆ operator<<()

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

Definition at line 70 of file HcalSourcePositionData.cc.

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 }

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().

HcalSourcePositionData::sourceId
int sourceId() const
Definition: HcalSourcePositionData.h:22
HcalSourcePositionData::getDAQTimestamp
void getDAQTimestamp(int &seconds, int &useconds) const
Definition: HcalSourcePositionData.cc:65
HcalSourcePositionData::messageCounter
int messageCounter() const
Definition: HcalSourcePositionData.h:13
HcalSourcePositionData::indexCounter
int indexCounter() const
Definition: HcalSourcePositionData.h:15
HcalSourcePositionData::message
std::string message() const
Definition: HcalSourcePositionData.h:26
HcalSourcePositionData::tubeId
int tubeId() const
Definition: HcalSourcePositionData.h:20
alignCSCRings.s
s
Definition: alignCSCRings.py:92
str
#define str(s)
Definition: TestProcessor.cc:51
HcalSourcePositionData::lastCommand
std::string lastCommand() const
Definition: HcalSourcePositionData.h:25
HcalSourcePositionData::tubeDescriptionFromSD
std::string tubeDescriptionFromSD() const
Definition: HcalSourcePositionData.h:24
HcalSourcePositionData::reelCounter
int reelCounter() const
Definition: HcalSourcePositionData.h:16
HcalSourcePositionData::getDriverTimestamp
void getDriverTimestamp(int &seconds, int &useconds) const
Definition: HcalSourcePositionData.cc:60
HcalSourcePositionData::motorVoltage
int motorVoltage() const
Definition: HcalSourcePositionData.h:19
HcalSourcePositionData::motorCurrent
int motorCurrent() const
Definition: HcalSourcePositionData.h:17
HcalSourcePositionData::driverId
int driverId() const
Definition: HcalSourcePositionData.h:21
HcalSourcePositionData::status
int status() const
Definition: HcalSourcePositionData.h:14
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
HcalSourcePositionData::tubeNameFromCoord
std::string tubeNameFromCoord() const
Definition: HcalSourcePositionData.h:23