CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/DataFormats/Scalers/src/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.

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

{
  char zeit[128];
  char line[128];
  struct tm * hora;

  s << "BeamSpotOnline    Version: " << c.version() << 
    "   SourceID: "<< c.sourceID() << std::endl;

  timespec ts = c.collectionTime();
  hora = gmtime(&ts.tv_sec);
  strftime(zeit, sizeof(zeit), "%Y.%m.%d %H:%M:%S", hora);
  sprintf(line, " CollectionTime: %s.%9.9d", zeit, 
          (int)ts.tv_nsec);
  s << line << std::endl;

  sprintf(line, " TrigType: %d   EventID: %d    BunchNumber: %d", 
          c.trigType(), c.eventID(), c.bunchNumber());
  s << line << std::endl;

  sprintf(line,"    x: %e +/- %e   width: %e +/- %e",
          c.x(), c.err_x(), c.width_x(), c.err_width_x());
  s << line << std::endl;

  sprintf(line,"    y: %e +/- %e   width: %e +/- %e",
          c.y(), c.err_y(), c.width_y(), c.err_width_y());
  s << line << std::endl;

  sprintf(line,"    z: %e +/- %e   sigma: %e +/- %e",
          c.z(), c.err_z(), c.sigma_z(), c.err_sigma_z());
  s << line << std::endl;

  sprintf(line," dxdy: %e +/- %e    dydz: %e +/- %e",
          c.dxdz(), c.err_dxdz(), c.dydz(), c.err_dydz());
  s << line << std::endl;
  return s;
}