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 22 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 41 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 26 of file DCSRecord.h.

Constructor & Destructor Documentation

DCSRecord::DCSRecord ( )

Definition at line 16 of file DCSRecord.cc.

16  :
18  magnetCurrent_(-1)
19 {}
static Timestamp invalidTimestamp()
Definition: Timestamp.h:101
float magnetCurrent_
Definition: DCSRecord.h:58
edm::Timestamp timestamp_
Definition: DCSRecord.h:56
DCSRecord::DCSRecord ( const online::DCS_v1 dcs)
explicit

Definition at line 22 of file DCSRecord.cc.

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

23 {
24  // DIP timestamp is in milliseconds
25  const uint64_t seconds = dcs.timestamp / 1000;
26  const uint32_t microseconds = (dcs.timestamp % 1000) * 1000;
27  timestamp_ = edm::Timestamp((seconds<<32) | microseconds );
30 }
const uint32_t highVoltageReady
std::bitset< Partition::Last > highVoltageReady_
Definition: DCSRecord.h:57
double seconds()
float magnetCurrent_
Definition: DCSRecord.h:58
unsigned long long uint64_t
Definition: Time.h:15
const uint64_t timestamp
const float magnetCurrent
edm::Timestamp timestamp_
Definition: DCSRecord.h:56
DCSRecord::~DCSRecord ( )
virtual

Definition at line 33 of file DCSRecord.cc.

33 {}

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 48 of file DCSRecord.h.

References highVoltageReady_.

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

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

Return the current of the CMS magnet in A.

Definition at line 51 of file DCSRecord.h.

References magnetCurrent_.

Referenced by operator<<().

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

Definition at line 42 of file DCSRecord.h.

References partitionNames_.

42 { return partitionNames_; }
static const ParitionNames partitionNames_
Definition: DCSRecord.h:59
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 45 of file DCSRecord.h.

References partitionNames_.

Referenced by operator<<().

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

Return the time of the last change.

Definition at line 38 of file DCSRecord.h.

References timestamp_.

Referenced by operator<<().

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

Member Data Documentation

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

Definition at line 57 of file DCSRecord.h.

Referenced by DCSRecord(), and highVoltageReady().

float DCSRecord::magnetCurrent_
private

Definition at line 58 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 59 of file DCSRecord.h.

Referenced by paritionNames(), and partitionName().

edm::Timestamp DCSRecord::timestamp_
private

Definition at line 56 of file DCSRecord.h.

Referenced by DCSRecord(), and timestamp().