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

◆ ParitionNames

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

◆ Partition

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.

22  {
23  EBp,
24  EBm,
25  EEp,
26  EEm,
27  HBHEa,
28  HBHEb,
29  HBHEc,
30  HF,
31  HO,
32  RPC,
33  DT0,
34  DTp,
35  DTm,
36  CSCp,
37  CSCm,
38  CASTOR,
39  ZDC,
40  TIBTID,
41  TOB,
42  TECp,
43  TECm,
44  BPIX,
45  FPIX,
46  ESp,
47  ESm,
48  Last
49  };

Constructor & Destructor Documentation

◆ DCSRecord() [1/2]

DCSRecord::DCSRecord ( )

Definition at line 11 of file DCSRecord.cc.

◆ DCSRecord() [2/2]

DCSRecord::DCSRecord ( const online::DCS_v1 dcs)
explicit

Definition at line 13 of file DCSRecord.cc.

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 }

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

◆ ~DCSRecord()

DCSRecord::~DCSRecord ( )
virtual

Definition at line 22 of file DCSRecord.cc.

22 {}

Member Function Documentation

◆ highVoltageReady()

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.

66 { return highVoltageReady_.test(partitionNumber); }

References highVoltageReady_.

Referenced by operator<<().

◆ magnetCurrent()

float DCSRecord::magnetCurrent ( ) const
inline

Return the current of the CMS magnet in A.

Definition at line 69 of file DCSRecord.h.

69 { return magnetCurrent_; }

References magnetCurrent_.

Referenced by operator<<().

◆ paritionNames()

const ParitionNames& DCSRecord::paritionNames ( ) const
inline

Definition at line 60 of file DCSRecord.h.

60 { return partitionNames_; }

References partitionNames_.

◆ partitionName()

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.

63 { return partitionNames_.at(partitionNumber); }

References partitionNames_.

Referenced by operator<<().

◆ timestamp()

const edm::Timestamp& DCSRecord::timestamp ( ) const
inline

Return the time of the last change.

Definition at line 56 of file DCSRecord.h.

56 { return timestamp_; }

References timestamp_.

Referenced by operator<<().

Member Data Documentation

◆ highVoltageReady_

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

Definition at line 73 of file DCSRecord.h.

Referenced by DCSRecord(), and highVoltageReady().

◆ magnetCurrent_

float DCSRecord::magnetCurrent_
private

Definition at line 74 of file DCSRecord.h.

Referenced by DCSRecord(), and magnetCurrent().

◆ partitionNames_

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

◆ timestamp_

edm::Timestamp DCSRecord::timestamp_
private

Definition at line 72 of file DCSRecord.h.

Referenced by DCSRecord(), and timestamp().

DCSRecord::Last
Definition: DCSRecord.h:48
DCSRecord::CSCm
Definition: DCSRecord.h:37
DCSRecord::CASTOR
Definition: DCSRecord.h:38
DCSRecord::TIBTID
Definition: DCSRecord.h:40
online::DCS_v1::timestamp
const uint64_t timestamp
Definition: OnlineMetaDataRaw.h:49
DCSRecord::TECp
Definition: DCSRecord.h:42
DCSRecord::DTp
Definition: DCSRecord.h:34
DCSRecord::HBHEa
Definition: DCSRecord.h:27
DCSRecord::timestamp_
edm::Timestamp timestamp_
Definition: DCSRecord.h:72
DCSRecord::ESm
Definition: DCSRecord.h:47
DCSRecord::BPIX
Definition: DCSRecord.h:44
DCSRecord::HO
Definition: DCSRecord.h:31
seconds
double seconds()
DCSRecord::TOB
Definition: DCSRecord.h:41
DCSRecord::HBHEc
Definition: DCSRecord.h:29
online::DCS_v1::magnetCurrent
const float magnetCurrent
Definition: OnlineMetaDataRaw.h:51
DCSRecord::EEm
Definition: DCSRecord.h:26
DCSRecord::FPIX
Definition: DCSRecord.h:45
DCSRecord::magnetCurrent_
float magnetCurrent_
Definition: DCSRecord.h:74
DCSRecord::highVoltageReady_
std::bitset< Partition::Last > highVoltageReady_
Definition: DCSRecord.h:73
DCSRecord::partitionNames_
static const ParitionNames partitionNames_
Definition: DCSRecord.h:75
DCSRecord::DT0
Definition: DCSRecord.h:33
DCSRecord::HF
Definition: DCSRecord.h:30
edm::Timestamp::invalidTimestamp
static Timestamp invalidTimestamp()
Definition: Timestamp.h:82
DCSRecord::CSCp
Definition: DCSRecord.h:36
online::DCS_v1::highVoltageReady
const uint32_t highVoltageReady
Definition: OnlineMetaDataRaw.h:50
DCSRecord::RPC
Definition: DCSRecord.h:32
DCSRecord::ZDC
Definition: DCSRecord.h:39
DCSRecord::DTm
Definition: DCSRecord.h:35
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
DCSRecord::EBp
Definition: DCSRecord.h:23
DCSRecord::EBm
Definition: DCSRecord.h:24
DCSRecord::ESp
Definition: DCSRecord.h:46
DCSRecord::HBHEb
Definition: DCSRecord.h:28
DCSRecord::TECm
Definition: DCSRecord.h:43
DCSRecord::EEp
Definition: DCSRecord.h:25
edm::Timestamp
Definition: Timestamp.h:30