CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes | Static Private Attributes
DCSRecord Class Reference

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

#include <DCSRecord.h>

Public Types

typedef std::array< std::string, LastParitionNames
 Get the names of all high-voltage partitions. More...
 
enum  Partition {
  EBp, EBm, EEp, EEm,
  HBHEa, HBHEb, HBHEc, HF,
  HO, RPC, DT0, DTp,
  DTm, CSCp, CSCm, CASTOR,
  ZDC, TIBTID, TOB, TECp,
  TECm, BPIX, FPIX, ESp,
  ESm, Last
}
 

Public Member Functions

 DCSRecord ()
 
 DCSRecord (const online::DCS_v1 &)
 
bool highVoltageReady (const uint8_t partitionNumber) const
 Return true if the high voltage of the given parition is ready. More...
 
float magnetCurrent () const
 Return the current of the CMS magnet in A. More...
 
const ParitionNamesparitionNames () const
 
const std::string & partitionName (const uint8_t partitionNumber) const
 Return the name of the high voltage of the given parition. More...
 
const edm::Timestamptimestamp () const
 Return the time of the last change. More...
 
virtual ~DCSRecord ()
 

Private Attributes

std::bitset< Partition::Last > highVoltageReady_
 
float magnetCurrent_
 
edm::Timestamp timestamp_
 

Static Private Attributes

static const ParitionNames partitionNames_
 

Detailed Description

Class to contain DCS information from soft FED 1022.

Author
Remi Mommsen - Fermilab

Definition at line 20 of file DCSRecord.h.

Member Typedef Documentation

typedef std::array<std::string, Last> DCSRecord::ParitionNames

Get the names of all high-voltage partitions.

Definition at line 59 of file DCSRecord.h.

Member Enumeration Documentation

Enumerator
EBp 
EBm 
EEp 
EEm 
HBHEa 
HBHEb 
HBHEc 
HF 
HO 
RPC 
DT0 
DTp 
DTm 
CSCp 
CSCm 
CASTOR 
ZDC 
TIBTID 
TOB 
TECp 
TECm 
BPIX 
FPIX 
ESp 
ESm 
Last 

Definition at line 22 of file DCSRecord.h.

Constructor & Destructor Documentation

DCSRecord::DCSRecord ( )

Definition at line 11 of file DCSRecord.cc.

static Timestamp invalidTimestamp()
Definition: Timestamp.h:82
float magnetCurrent_
Definition: DCSRecord.h:74
edm::Timestamp timestamp_
Definition: DCSRecord.h:72
DCSRecord::DCSRecord ( const online::DCS_v1 dcs)
explicit

Definition at line 13 of file DCSRecord.cc.

References online::DCS_v1::highVoltageReady, highVoltageReady_, online::DCS_v1::magnetCurrent, magnetCurrent_, seconds(), online::DCS_v1::timestamp, and timestamp_.

13  {
14  // DIP timestamp is in milliseconds
15  const uint64_t seconds = dcs.timestamp / 1000;
16  const uint32_t microseconds = (dcs.timestamp % 1000) * 1000;
17  timestamp_ = edm::Timestamp((seconds << 32) | microseconds);
20 }
const uint32_t highVoltageReady
std::bitset< Partition::Last > highVoltageReady_
Definition: DCSRecord.h:73
double seconds()
float magnetCurrent_
Definition: DCSRecord.h:74
unsigned long long uint64_t
Definition: Time.h:13
const uint64_t timestamp
const float magnetCurrent
edm::Timestamp timestamp_
Definition: DCSRecord.h:72
DCSRecord::~DCSRecord ( )
virtual

Definition at line 22 of file DCSRecord.cc.

22 {}

Member Function Documentation

bool DCSRecord::highVoltageReady ( const uint8_t  partitionNumber) const
inline

Return true if the high voltage of the given parition is ready.

Definition at line 66 of file DCSRecord.h.

References highVoltageReady_.

Referenced by DQMProvInfo::fillDcsBitsFromDCSRecord(), and operator<<().

66 { return highVoltageReady_.test(partitionNumber); }
std::bitset< Partition::Last > highVoltageReady_
Definition: DCSRecord.h:73
float DCSRecord::magnetCurrent ( ) const
inline

Return the current of the CMS magnet in A.

Definition at line 69 of file DCSRecord.h.

References magnetCurrent_.

Referenced by operator<<().

69 { return magnetCurrent_; }
float magnetCurrent_
Definition: DCSRecord.h:74
const ParitionNames& DCSRecord::paritionNames ( ) const
inline

Definition at line 60 of file DCSRecord.h.

References partitionNames_.

60 { return partitionNames_; }
static const ParitionNames partitionNames_
Definition: DCSRecord.h:75
const std::string& DCSRecord::partitionName ( const uint8_t  partitionNumber) const
inline

Return the name of the high voltage of the given parition.

Definition at line 63 of file DCSRecord.h.

References partitionNames_.

Referenced by operator<<().

63 { return partitionNames_.at(partitionNumber); }
static const ParitionNames partitionNames_
Definition: DCSRecord.h:75
const edm::Timestamp& DCSRecord::timestamp ( ) const
inline

Return the time of the last change.

Definition at line 56 of file DCSRecord.h.

References timestamp_.

Referenced by operator<<().

56 { return timestamp_; }
edm::Timestamp timestamp_
Definition: DCSRecord.h:72

Member Data Documentation

std::bitset<Partition::Last> DCSRecord::highVoltageReady_
private

Definition at line 73 of file DCSRecord.h.

Referenced by DCSRecord(), and highVoltageReady().

float DCSRecord::magnetCurrent_
private

Definition at line 74 of file DCSRecord.h.

Referenced by DCSRecord(), and magnetCurrent().

const DCSRecord::ParitionNames DCSRecord::partitionNames_
staticprivate
Initial value:
= {
{"EBp", "EBm", "EEp", "EEm", "HBHEa", "HBHEb", "HBHEc", "HF", "HO", "RPC", "DT0", "DTp", "DTm",
"CSCp", "CSCm", "CASTOR", "ZDC", "TIBTID", "TOB", "TECp", "TECm", "BPIX", "FPIX", "ESp", "ESm"}}

Definition at line 75 of file DCSRecord.h.

Referenced by paritionNames(), and partitionName().

edm::Timestamp DCSRecord::timestamp_
private

Definition at line 72 of file DCSRecord.h.

Referenced by DCSRecord(), and timestamp().