CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 23 of file OnlineLuminosityRecord.cc.

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

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 }