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

◆ operator<<()

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

Pretty-print operator for OnlineLuminosityRecord.

Definition at line 23 of file OnlineLuminosityRecord.cc.

23  {
24  const time_t ts = luminosity.timestamp().unixTime();
25 
26  s << "timeStamp: " << asctime(localtime(&ts));
27  s << "lumiSection: " << luminosity.lumiSection() << std::endl;
28  s << "lumiNibble: " << luminosity.lumiNibble() << std::endl;
29 
30  std::streamsize ss = s.precision();
31  s.setf(std::ios::fixed);
32  s.precision(2);
33  s << "instLumi: " << luminosity.instLumi() << std::endl;
34  s << "avgPileUp: " << luminosity.avgPileUp() << std::endl;
35  s.unsetf(std::ios::fixed);
36  s.precision(ss);
37 
38  return s;
39 }

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

alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
OnlineLuminosityRecord::timestamp
const edm::Timestamp & timestamp() const
Return the time when the lumi was recorded.
Definition: OnlineLuminosityRecord.h:24
edm::Timestamp::unixTime
unsigned int unixTime() const
Time in seconds since January 1, 1970.
Definition: Timestamp.h:40
OnlineLuminosityRecord::lumiNibble
uint16_t lumiNibble() const
Return the lumi-nibble number.
Definition: OnlineLuminosityRecord.h:30
OnlineLuminosityRecord::lumiSection
uint16_t lumiSection() const
Return the lumi-section number.
Definition: OnlineLuminosityRecord.h:27
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
alignCSCRings.s
s
Definition: alignCSCRings.py:92
OnlineLuminosityRecord::avgPileUp
float avgPileUp() const
Return the average pileup for th current nibble.
Definition: OnlineLuminosityRecord.h:36
OnlineLuminosityRecord::instLumi
float instLumi() const
Return the luminosity for the current nibble.
Definition: OnlineLuminosityRecord.h:33