CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Attributes
DcsStatus Class Reference

#include <DcsStatus.h>

Classes

class  h
 Persistable copy of online DcsStatus flag values. More...
 

Public Types

enum  {
  EBp = 0, EBm = 1, EEp = 2, EEm = 3,
  HBHEa = 5, HBHEb = 6, HBHEc = 7, HF = 8,
  HO = 9, RPC = 12, DT0 = 13, DTp = 14,
  DTm = 15, CSCp = 16, CSCm = 17, CASTOR = 20,
  ZDC = 22, TIBTID = 24, TOB = 25, TECp = 26,
  TECm = 27, BPIX = 28, FPIX = 29, ESp = 30,
  ESm = 31, nPartitions = 25
}
 

Public Member Functions

unsigned int bunchNumber () const
 
timespec collectionTime () const
 
 DcsStatus ()
 
 DcsStatus (const unsigned char *rawData)
 
bool empty () const
 empty method (= false) More...
 
unsigned int eventID () const
 
float magnetCurrent () const
 
float magnetTemperature () const
 
std::string name () const
 name method More...
 
int operator!= (const DcsStatus &e) const
 inequality operator More...
 
int operator== (const DcsStatus &e) const
 equality operator More...
 
unsigned int ready () const
 
bool ready (int partitionNumber) const
 
unsigned int sourceID () const
 
unsigned int trigType () const
 
int version () const
 
virtual ~DcsStatus ()
 

Static Public Attributes

static const int partitionList []
 
static const char *const partitionName []
 

Protected Attributes

unsigned int bunchNumber_
 
TimeSpec collectionTime_
 
unsigned int eventID_
 
float magnetCurrent_
 
float magnetTemperature_
 
unsigned int ready_
 
unsigned int sourceID_
 
unsigned int trigType_
 
int version_
 

Detailed Description

Definition at line 28 of file DcsStatus.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
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 
nPartitions 

Definition at line 33 of file DcsStatus.h.

33  {
34  EBp = 0,
35  EBm = 1,
36  EEp = 2,
37  EEm = 3,
38  HBHEa = 5,
39  HBHEb = 6,
40  HBHEc = 7,
41  HF = 8,
42  HO = 9,
43  RPC = 12,
44  DT0 = 13,
45  DTp = 14,
46  DTm = 15,
47  CSCp = 16,
48  CSCm = 17,
49  CASTOR = 20,
50  ZDC = 22,
51  TIBTID = 24,
52  TOB = 25,
53  TECp = 26,
54  TECm = 27,
55  BPIX = 28,
56  FPIX = 29,
57  ESp = 30,
58  ESm = 31,
59  nPartitions = 25
60  };

Constructor & Destructor Documentation

◆ DcsStatus() [1/2]

DcsStatus::DcsStatus ( )

Definition at line 18 of file DcsStatus.cc.

Referenced by DcsStatus().

19  : trigType_(0),
20  eventID_(0),
21  sourceID_(0),
22  bunchNumber_(0),
23  version_(0),
24  collectionTime_(0, 0),
25  ready_(0),
26  magnetCurrent_((float)0.0),
27  magnetTemperature_((float)0.0) {}
unsigned int bunchNumber_
Definition: DcsStatus.h:97
unsigned int eventID_
Definition: DcsStatus.h:95
int version_
Definition: DcsStatus.h:99
unsigned int trigType_
Definition: DcsStatus.h:94
unsigned int ready_
Definition: DcsStatus.h:102
TimeSpec collectionTime_
Definition: DcsStatus.h:101
unsigned int sourceID_
Definition: DcsStatus.h:96
float magnetTemperature_
Definition: DcsStatus.h:104
float magnetCurrent_
Definition: DcsStatus.h:103

◆ DcsStatus() [2/2]

DcsStatus::DcsStatus ( const unsigned char *  rawData)

Definition at line 29 of file DcsStatus.cc.

References bunchNumber_, collectionTime_, DcsStatusRaw_v4::collectionTime_nsec, DcsStatusRaw_v4::collectionTime_sec, runTheMatrix::const, DcsStatus(), ScalersEventRecordRaw_v4::dcsStatus, eventID_, ScalersEventRecordRaw_v4::header, DcsStatusRaw_v4::magnetCurrent, magnetCurrent_, DcsStatusRaw_v4::magnetTemperature, magnetTemperature_, l1tstage2_dqm_sourceclient-live_cfg::rawData, DcsStatusRaw_v4::ready, ready_, TimeSpec::set_tv_nsec(), TimeSpec::set_tv_sec(), sourceID_, trigType_, ScalersEventRecordRaw_v4::version, and version_.

29  {
30  DcsStatus();
31 
32  struct ScalersEventRecordRaw_v4 const* raw = reinterpret_cast<struct ScalersEventRecordRaw_v4 const*>(rawData);
33  trigType_ = (raw->header >> 56) & 0xFULL;
34  eventID_ = (raw->header >> 32) & 0x00FFFFFFULL;
35  sourceID_ = (raw->header >> 8) & 0x00000FFFULL;
36  bunchNumber_ = (raw->header >> 20) & 0xFFFULL;
37 
38  version_ = raw->version;
39  if (version_ >= 4) {
40  collectionTime_.set_tv_sec(static_cast<long>(raw->dcsStatus.collectionTime_sec));
42  ready_ = raw->dcsStatus.ready;
45  }
46 }
unsigned int bunchNumber_
Definition: DcsStatus.h:97
void set_tv_nsec(long value)
Definition: TimeSpec.h:19
unsigned int eventID_
Definition: DcsStatus.h:95
unsigned long long header
Definition: ScalersRaw.h:211
int version_
Definition: DcsStatus.h:99
unsigned int ready
Definition: ScalersRaw.h:176
unsigned int collectionTime_sec
Definition: ScalersRaw.h:174
unsigned int trigType_
Definition: DcsStatus.h:94
unsigned int ready_
Definition: DcsStatus.h:102
TimeSpec collectionTime_
Definition: DcsStatus.h:101
unsigned int sourceID_
Definition: DcsStatus.h:96
float magnetCurrent
Definition: ScalersRaw.h:177
unsigned int collectionTime_nsec
Definition: ScalersRaw.h:175
void set_tv_sec(long value)
Definition: TimeSpec.h:18
float magnetTemperature_
Definition: DcsStatus.h:104
struct DcsStatusRaw_v4 dcsStatus
Definition: ScalersRaw.h:216
float magnetTemperature
Definition: ScalersRaw.h:178
float magnetCurrent_
Definition: DcsStatus.h:103

◆ ~DcsStatus()

DcsStatus::~DcsStatus ( )
virtual

Definition at line 48 of file DcsStatus.cc.

48 {}

Member Function Documentation

◆ bunchNumber()

unsigned int DcsStatus::bunchNumber ( ) const
inline

Definition at line 75 of file DcsStatus.h.

References bunchNumber_.

75 { return (bunchNumber_); }
unsigned int bunchNumber_
Definition: DcsStatus.h:97

◆ collectionTime()

timespec DcsStatus::collectionTime ( ) const
inline

Definition at line 78 of file DcsStatus.h.

References collectionTime_, and TimeSpec::get_timespec().

78 { return (collectionTime_.get_timespec()); }
timespec get_timespec() const
Definition: TimeSpec.cc:4
TimeSpec collectionTime_
Definition: DcsStatus.h:101

◆ empty()

bool DcsStatus::empty ( ) const
inline

empty method (= false)

Definition at line 70 of file DcsStatus.h.

70 { return false; }

◆ eventID()

unsigned int DcsStatus::eventID ( ) const
inline

Definition at line 73 of file DcsStatus.h.

References eventID_.

73 { return (eventID_); }
unsigned int eventID_
Definition: DcsStatus.h:95

◆ magnetCurrent()

float DcsStatus::magnetCurrent ( ) const
inline

Definition at line 84 of file DcsStatus.h.

References magnetCurrent_.

84 { return (magnetCurrent_); }
float magnetCurrent_
Definition: DcsStatus.h:103

◆ magnetTemperature()

float DcsStatus::magnetTemperature ( ) const
inline

Definition at line 85 of file DcsStatus.h.

References magnetTemperature_.

85 { return (magnetTemperature_); }
float magnetTemperature_
Definition: DcsStatus.h:104

◆ name()

std::string DcsStatus::name ( ) const
inline

name method

Definition at line 67 of file DcsStatus.h.

Referenced by config.CFG::__str__(), validation.Sample::digest(), and VIDSelectorBase.VIDSelectorBase::initialize().

67 { return "DcsStatus"; }

◆ operator!=()

int DcsStatus::operator!= ( const DcsStatus e) const
inline

inequality operator

Definition at line 91 of file DcsStatus.h.

91 { return false; }

◆ operator==()

int DcsStatus::operator== ( const DcsStatus e) const
inline

equality operator

Definition at line 88 of file DcsStatus.h.

88 { return false; }

◆ ready() [1/2]

unsigned int DcsStatus::ready ( ) const
inline

Definition at line 80 of file DcsStatus.h.

References ready_.

80 { return (ready_); }
unsigned int ready_
Definition: DcsStatus.h:102

◆ ready() [2/2]

bool DcsStatus::ready ( int  partitionNumber) const
inline

Definition at line 82 of file DcsStatus.h.

References ready_.

82 { return ((ready_ & (1 << partitionNumber)) != 0); }
unsigned int ready_
Definition: DcsStatus.h:102

◆ sourceID()

unsigned int DcsStatus::sourceID ( ) const
inline

Definition at line 74 of file DcsStatus.h.

References sourceID_.

74 { return (sourceID_); }
unsigned int sourceID_
Definition: DcsStatus.h:96

◆ trigType()

unsigned int DcsStatus::trigType ( ) const
inline

Definition at line 72 of file DcsStatus.h.

References trigType_.

72 { return (trigType_); }
unsigned int trigType_
Definition: DcsStatus.h:94

◆ version()

int DcsStatus::version ( ) const
inline

Definition at line 77 of file DcsStatus.h.

References version_.

Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().

77 { return (version_); }
int version_
Definition: DcsStatus.h:99

Member Data Documentation

◆ bunchNumber_

unsigned int DcsStatus::bunchNumber_
protected

Definition at line 97 of file DcsStatus.h.

Referenced by bunchNumber(), and DcsStatus().

◆ collectionTime_

TimeSpec DcsStatus::collectionTime_
protected

Definition at line 101 of file DcsStatus.h.

Referenced by collectionTime(), and DcsStatus().

◆ eventID_

unsigned int DcsStatus::eventID_
protected

Definition at line 95 of file DcsStatus.h.

Referenced by DcsStatus(), and eventID().

◆ magnetCurrent_

float DcsStatus::magnetCurrent_
protected

Definition at line 103 of file DcsStatus.h.

Referenced by DcsStatus(), and magnetCurrent().

◆ magnetTemperature_

float DcsStatus::magnetTemperature_
protected

Definition at line 104 of file DcsStatus.h.

Referenced by DcsStatus(), and magnetTemperature().

◆ partitionList

const int DcsStatus::partitionList
static
Initial value:

Definition at line 30 of file DcsStatus.h.

Referenced by DetStatus::checkForDCSStatus(), DetStatus::DetStatus(), and operator<<().

◆ partitionName

const char *const DcsStatus::partitionName
static
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 31 of file DcsStatus.h.

Referenced by DetStatus::checkForDCSRecord(), DetStatus::checkForDCSStatus(), DetStatus::DetStatus(), and operator<<().

◆ ready_

unsigned int DcsStatus::ready_
protected

Definition at line 102 of file DcsStatus.h.

Referenced by DcsStatus(), and ready().

◆ sourceID_

unsigned int DcsStatus::sourceID_
protected

Definition at line 96 of file DcsStatus.h.

Referenced by DcsStatus(), and sourceID().

◆ trigType_

unsigned int DcsStatus::trigType_
protected

Definition at line 94 of file DcsStatus.h.

Referenced by DcsStatus(), and trigType().

◆ version_

int DcsStatus::version_
protected

Definition at line 99 of file DcsStatus.h.

Referenced by DcsStatus(), and version().