CMS 3D CMS Logo

Classes | Functions
OnlineLuminosityRecord.h File Reference
#include <cstdint>
#include <ostream>
#include "DataFormats/OnlineMetaData/interface/OnlineMetaDataRaw.h"
#include "DataFormats/Provenance/interface/Timestamp.h"

Go to the source code of this file.

Classes

class  OnlineLuminosityRecord
 Class to contain the online luminosity from soft FED 1022. More...
 

Functions

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

Function Documentation

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

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 }