test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
BeamSpotOnline.cc File Reference
#include "DataFormats/Scalers/interface/BeamSpotOnline.h"
#include "DataFormats/Scalers/interface/ScalersRaw.h"
#include <cstdio>
#include <ostream>

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &s, const BeamSpotOnline &c)
 Pretty-print operator for BeamSpotOnline. More...
 

Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const BeamSpotOnline c 
)

Pretty-print operator for BeamSpotOnline.

Definition at line 75 of file BeamSpotOnline.cc.

References BeamSpotOnline::bunchNumber(), BeamSpotOnline::collectionTime(), BeamSpotOnline::dxdz(), BeamSpotOnline::dydz(), BeamSpotOnline::err_dxdz(), BeamSpotOnline::err_dydz(), BeamSpotOnline::err_sigma_z(), BeamSpotOnline::err_width_x(), BeamSpotOnline::err_width_y(), BeamSpotOnline::err_x(), BeamSpotOnline::err_y(), BeamSpotOnline::err_z(), BeamSpotOnline::eventID(), geometryCSVtoXML::line, alignCSCRings::s, BeamSpotOnline::sigma_z(), BeamSpotOnline::sourceID(), BeamSpotOnline::trigType(), BeamSpotOnline::version(), BeamSpotOnline::width_x(), BeamSpotOnline::width_y(), BeamSpotOnline::x(), BeamSpotOnline::y(), and BeamSpotOnline::z().

76 {
77  char zeit[128];
78  char line[128];
79  struct tm * hora;
80 
81  s << "BeamSpotOnline Version: " << c.version() <<
82  " SourceID: "<< c.sourceID() << std::endl;
83 
84  timespec ts = c.collectionTime();
85  hora = gmtime(&ts.tv_sec);
86  strftime(zeit, sizeof(zeit), "%Y.%m.%d %H:%M:%S", hora);
87  sprintf(line, " CollectionTime: %s.%9.9d", zeit,
88  (int)ts.tv_nsec);
89  s << line << std::endl;
90 
91  sprintf(line, " TrigType: %d EventID: %d BunchNumber: %d",
92  c.trigType(), c.eventID(), c.bunchNumber());
93  s << line << std::endl;
94 
95  sprintf(line," x: %e +/- %e width: %e +/- %e",
96  c.x(), c.err_x(), c.width_x(), c.err_width_x());
97  s << line << std::endl;
98 
99  sprintf(line," y: %e +/- %e width: %e +/- %e",
100  c.y(), c.err_y(), c.width_y(), c.err_width_y());
101  s << line << std::endl;
102 
103  sprintf(line," z: %e +/- %e sigma: %e +/- %e",
104  c.z(), c.err_z(), c.sigma_z(), c.err_sigma_z());
105  s << line << std::endl;
106 
107  sprintf(line," dxdy: %e +/- %e dydz: %e +/- %e",
108  c.dxdz(), c.err_dxdz(), c.dydz(), c.err_dydz());
109  s << line << std::endl;
110  return s;
111 }
float err_y() const
float dxdz() const
float err_x() const
float dydz() const
float sigma_z() const
float y() const
float x() const
float err_dydz() const
float z() const
float width_y() const
float err_width_y() const
unsigned int sourceID() const
unsigned int bunchNumber() const
int version() const
float err_dxdz() const
float err_width_x() const
float err_z() const
timespec collectionTime() const
unsigned int eventID() const
float width_x() const
unsigned int trigType() const
float err_sigma_z() const