CMS 3D CMS Logo

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

Go to the source code of this file.

Classes

class  DCSRecord
 Class to contain DCS information from soft FED 1022. More...
 

Functions

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

Function Documentation

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

Pretty-print operator for DCSRecord.

Definition at line 36 of file DCSRecord.cc.

References alignBH_cfg::fixed, DCSRecord::highVoltageReady(), mps_fire::i, DCSRecord::magnetCurrent(), DCSRecord::partitionName(), alignCSCRings::s, DCSRecord::timestamp(), and edm::Timestamp::unixTime().

37 {
38  const time_t ts = dcs.timestamp().unixTime();
39 
40  s << "timeStamp: " << asctime(localtime(&ts));
41 
42  std::streamsize ss = s.precision();
43  s.setf(std::ios::fixed);
44  s.precision(3);
45  s << "Magnet current (A): " << std::fixed << std::setprecision(3) << dcs.magnetCurrent() << std::endl;
46  s.unsetf(std::ios::fixed);
47  s.precision(ss);
48 
49  s << "HV state per partition:" << std::endl;
50 
51  for (unsigned int i = 0; i < DCSRecord::Partition::Last; ++i) {
52  s << " " << std::setw(7) << std::left << dcs.partitionName(i)
53  << ": " << (dcs.highVoltageReady(i)?"READY":"OFF")
54  << std::endl;
55  }
56 
57  return s;
58 }