Skip to content

Commit

Permalink
Merge pull request #31175 from mommsen/add-gem-dcs-status
Browse files Browse the repository at this point in the history
Add GEM plus/minus HV states
  • Loading branch information
cmsbuild committed Aug 21, 2020
2 parents dfbb4dd + 3c528d3 commit d97f819
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
8 changes: 8 additions & 0 deletions DataFormats/OnlineMetaData/interface/DCSRecord.h
Expand Up @@ -19,6 +19,8 @@

class DCSRecord {
public:
// Adding new partitions requires to add a new bitset definition with
// the correct dimension to DataFormats/StdDictionaries/src/classes_def_others.xml
enum Partition {
EBp,
EBm,
Expand All @@ -45,6 +47,8 @@ class DCSRecord {
FPIX,
ESp,
ESm,
GEMp,
GEMm,
Last
};

Expand All @@ -68,6 +72,10 @@ class DCSRecord {
/// Return the current of the CMS magnet in A
float magnetCurrent() const { return magnetCurrent_; }

/// 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 Vyacheslav.Klyukhin@cern.ch)
float magneticField() const { return (0.0002067 * magnetCurrent_ + 0.0557973); }

private:
edm::Timestamp timestamp_;
std::bitset<Partition::Last> highVoltageReady_;
Expand Down
4 changes: 2 additions & 2 deletions DataFormats/OnlineMetaData/src/DCSRecord.cc
Expand Up @@ -5,8 +5,8 @@
#include "DataFormats/OnlineMetaData/interface/OnlineMetaDataRaw.h"

const DCSRecord::ParitionNames DCSRecord::partitionNames_ = {
{"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"}};
{"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", "GEMm", "GEMp"}};

DCSRecord::DCSRecord() : timestamp_(edm::Timestamp::invalidTimestamp()), magnetCurrent_(-1) {}

Expand Down
3 changes: 2 additions & 1 deletion DataFormats/OnlineMetaData/src/classes_def.xml
Expand Up @@ -4,7 +4,8 @@
<field name="romanPotNames_" transient="true"/>
<field name="statusNames_" transient="true"/>
</class>
<class name="DCSRecord" ClassVersion="3">
<class name="DCSRecord" ClassVersion="4">
<version ClassVersion="4" checksum="920984468"/>
<version ClassVersion="3" checksum="2537350258"/>
<field name="partitionNames_" transient="true"/>
</class>
Expand Down
1 change: 1 addition & 0 deletions DataFormats/StdDictionaries/src/classes_def_others.xml
Expand Up @@ -9,6 +9,7 @@
<class name="std::bitset<7>"/>
<class name="std::bitset<15>"/>
<class name="std::bitset<25>"/>
<class name="std::bitset<27>"/>
<class name="std::bitset<64>"/>
<class name="std::bitset<96>"/>
<class name="std::deque<int>"/>
Expand Down

0 comments on commit d97f819

Please sign in to comment.