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

61  {
62 
63  s << " Message Counter =" << hspd.messageCounter() << endl;
64  s << " Index Counter =" << hspd.indexCounter() << endl;
65  s << " Reel Counter =" << hspd.reelCounter() << endl;
66  s << " Status =" << hex << hspd.status() << dec << endl;
67  s << " Motor Current =" << hspd.motorCurrent() << endl;
68  s << " Speed =" << hspd.speed() << endl;
69  s << " Tube Id =" << hspd.tubeId() << endl;
70  s << " Driver Id =" << hspd.driverId() << endl;
71  s << " Source Id =" << hspd.sourceId() << endl;
72 
73  int timebase =0; int timeusec=0;
74  hspd.getDriverTimestamp(timebase,timeusec);
75  // trim seconds off of usec and add to base
76  timeusec %= 1000000;
77  timebase += timeusec/1000000;
78  char str[50];
79  sprintf(str, " Driver Timestamp : %s", ctime((time_t *)&timebase));
80  s << str;
81  timebase=0; timeusec=0;
82  hspd.getDAQTimestamp(timebase,timeusec);
83  timeusec %= 1000000;
84  timebase += timeusec/1000000;
85 
86  sprintf(str, " DAQ Timestamp : %s", ctime((time_t *)&timebase));
87  s << str;
88 
89  return s;
90 }
void getDriverTimestamp(int &seconds, int &useconds) const
void getDAQTimestamp(int &seconds, int &useconds) const