CMS 3D CMS Logo

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

Go to the source code of this file.

Functions

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

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  s,
const CTPPSRecord ctpps 
)

Pretty-print operator for CTPPSRecord.

Definition at line 40 of file CTPPSRecord.cc.

40  {
41  const time_t ts = ctpps.timestamp().unixTime();
42 
43  s << "timeStamp: " << asctime(localtime(&ts));
44  s << "Roman pot states:" << std::endl;
45 
46  for (uint8_t i = 0; i < CTPPSRecord::RomanPot::Last; ++i) {
47  s << " " << std::setw(16) << std::left << ctpps.romanPotName(i) << ": " << ctpps.statusName(i) << std::endl;
48  }
49 
50  return s;
51 }

References mps_fire::i, CTPPSRecord::romanPotName(), alignCSCRings::s, CTPPSRecord::statusName(), CTPPSRecord::timestamp(), and edm::Timestamp::unixTime().

mps_fire.i
i
Definition: mps_fire.py:355
CTPPSRecord::romanPotName
const std::string & romanPotName(const uint8_t rp) const
Return the name of the roman pot.
Definition: CTPPSRecord.h:58
edm::Timestamp::unixTime
unsigned int unixTime() const
Time in seconds since January 1, 1970.
Definition: Timestamp.h:40
CTPPSRecord::timestamp
const edm::Timestamp & timestamp() const
Return the time of the last change.
Definition: CTPPSRecord.h:51
alignCSCRings.s
s
Definition: alignCSCRings.py:92
CTPPSRecord::statusName
const std::string & statusName(const uint8_t rp) const
Return the status as string.
Definition: CTPPSRecord.h:64