CMS 3D CMS Logo

Functions
OnlineLuminosityRecord.cc File Reference
#include <iomanip>
#include <ctime>
#include "DataFormats/OnlineMetaData/interface/OnlineLuminosityRecord.h"
#include "DataFormats/OnlineMetaData/interface/OnlineMetaDataRaw.h"

Go to the source code of this file.

Functions

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

Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const OnlineLuminosityRecord luminosity 
)

Pretty-print operator for OnlineLuminosityRecord.

Definition at line 33 of file OnlineLuminosityRecord.cc.

References OnlineLuminosityRecord::avgPileUp(), alignBH_cfg::fixed, OnlineLuminosityRecord::instLumi(), OnlineLuminosityRecord::lumiNibble(), OnlineLuminosityRecord::lumiSection(), alignCSCRings::s, OnlineLuminosityRecord::timestamp(), and edm::Timestamp::unixTime().

34 {
35  const time_t ts = luminosity.timestamp().unixTime();
36 
37  s << "timeStamp: " << asctime(localtime(&ts));
38  s << "lumiSection: " << luminosity.lumiSection() << std::endl;
39  s << "lumiNibble: " << luminosity.lumiNibble() << std::endl;
40 
41  std::streamsize ss = s.precision();
42  s.setf(std::ios::fixed);
43  s.precision(2);
44  s << "instLumi: " << luminosity.instLumi() << std::endl;
45  s << "avgPileUp: " << luminosity.avgPileUp() << std::endl;
46  s.unsetf(std::ios::fixed);
47  s.precision(ss);
48 
49  return s;
50 }
float instLumi() const
Return the luminosity for the current nibble.
float avgPileUp() const
Return the average pileup for th current nibble.
uint16_t lumiNibble() const
Return the lumi-nibble number.
unsigned int unixTime() const
Time in seconds since January 1, 1970.
Definition: Timestamp.h:46
const edm::Timestamp & timestamp() const
Return the time when the lumi was recorded.
uint16_t lumiSection() const
Return the lumi-section number.