CMS 3D CMS Logo

Classes | Typedefs | Functions

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/DataFormats/Scalers/interface/BeamSpotOnline.h File Reference

#include "DataFormats/Scalers/interface/TimeSpec.h"
#include <ctime>
#include <iosfwd>
#include <vector>
#include <string>

Go to the source code of this file.

Classes

class  BeamSpotOnline

Typedefs

typedef std::vector
< BeamSpotOnline
BeamSpotOnlineCollection

Functions

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

Detailed Description

file for online BeamSpotOnline value

Author:
: William Badgett

Definition in file BeamSpotOnline.h.


Typedef Documentation

Definition at line 104 of file BeamSpotOnline.h.


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, asciidump::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;
}