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 28 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().

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