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, GEMp, GEMm, 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...
 
float magneticField () const
 
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 63 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 
GEMp 
GEMm 
Last 

Definition at line 24 of file DCSRecord.h.

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

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

70 { 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 73 of file DCSRecord.h.

73 { return magnetCurrent_; }

References magnetCurrent_.

Referenced by operator<<().

◆ magneticField()

float DCSRecord::magneticField ( ) const
inline

Return the magnetic field of the CMS magnet in T The precision is 0.6 to 1.8 mT in the range of a current from 9500 to 18164 A (from Vyach.nosp@m.esla.nosp@m.v.Kly.nosp@m.ukhi.nosp@m.n@cer.nosp@m.n.ch)

Definition at line 77 of file DCSRecord.h.

77 { return (0.0002067 * magnetCurrent_ + 0.0557973); }

References magnetCurrent_.

◆ paritionNames()

const ParitionNames& DCSRecord::paritionNames ( ) const
inline

Definition at line 64 of file DCSRecord.h.

64 { 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 67 of file DCSRecord.h.

67 { 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 60 of file DCSRecord.h.

60 { return timestamp_; }

References timestamp_.

Referenced by operator<<().

Member Data Documentation

◆ highVoltageReady_

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

Definition at line 81 of file DCSRecord.h.

Referenced by DCSRecord(), and highVoltageReady().

◆ magnetCurrent_

float DCSRecord::magnetCurrent_
private

Definition at line 82 of file DCSRecord.h.

Referenced by DCSRecord(), magnetCurrent(), and magneticField().

◆ 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", "GEMp", "GEMm"}}

Definition at line 83 of file DCSRecord.h.

Referenced by paritionNames(), and partitionName().

◆ timestamp_

edm::Timestamp DCSRecord::timestamp_
private

Definition at line 80 of file DCSRecord.h.

Referenced by DCSRecord(), and timestamp().

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