CMS 3D CMS Logo

DcsStatus.h
Go to the documentation of this file.
1 /*X
2  * File: DataFormats/Scalers/interface/DcsStatus.h (W.Badgett)
3  *
4  * The online computed DcsStatus flag values
5  *
6  */
7 
8 #ifndef DATAFORMATS_SCALERS_DCSSTATUS_H
9 #define DATAFORMATS_SCALERS_DCSSTATUS_H
10 
12 
13 #include <ctime>
14 #include <iosfwd>
15 #include <vector>
16 #include <string>
17 
25 
28 class DcsStatus {
29 public:
30  static const int partitionList[];
31  static const char* const partitionName[];
32 
33  enum {
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,
60  };
61 
62  DcsStatus();
63  DcsStatus(const unsigned char* rawData);
64  virtual ~DcsStatus();
65 
67  std::string name() const { return "DcsStatus"; }
68 
70  bool empty() const { return false; }
71 
72  unsigned int trigType() const { return (trigType_); }
73  unsigned int eventID() const { return (eventID_); }
74  unsigned int sourceID() const { return (sourceID_); }
75  unsigned int bunchNumber() const { return (bunchNumber_); }
76 
77  int version() const { return (version_); }
78  timespec collectionTime() const { return (collectionTime_.get_timespec()); }
79 
80  unsigned int ready() const { return (ready_); }
81 
82  bool ready(int partitionNumber) const { return ((ready_ & (1 << partitionNumber)) != 0); }
83 
84  float magnetCurrent() const { return (magnetCurrent_); }
85  float magnetTemperature() const { return (magnetTemperature_); }
86 
88  int operator==(const DcsStatus& e) const { return false; }
89 
91  int operator!=(const DcsStatus& e) const { return false; }
92 
93 protected:
94  unsigned int trigType_;
95  unsigned int eventID_;
96  unsigned int sourceID_;
97  unsigned int bunchNumber_;
98 
99  int version_;
100 
102  unsigned int ready_;
105 };
106 
108 std::ostream& operator<<(std::ostream& s, const DcsStatus& c);
109 
110 typedef std::vector<DcsStatus> DcsStatusCollection;
111 
112 #endif
DcsStatus::EEp
Definition: DcsStatus.h:36
DcsStatus::eventID_
unsigned int eventID_
Definition: DcsStatus.h:95
DcsStatus::HBHEc
Definition: DcsStatus.h:40
DcsStatus
Definition: DcsStatus.h:28
DcsStatus::EEm
Definition: DcsStatus.h:37
DcsStatus::sourceID_
unsigned int sourceID_
Definition: DcsStatus.h:96
DcsStatus::trigType_
unsigned int trigType_
Definition: DcsStatus.h:94
DcsStatus::operator==
int operator==(const DcsStatus &e) const
equality operator
Definition: DcsStatus.h:88
DcsStatus::BPIX
Definition: DcsStatus.h:55
DcsStatus::partitionName
static const char *const partitionName[]
Definition: DcsStatus.h:31
DcsStatus::TIBTID
Definition: DcsStatus.h:51
DcsStatus::HO
Definition: DcsStatus.h:42
DcsStatus::sourceID
unsigned int sourceID() const
Definition: DcsStatus.h:74
DcsStatus::ready_
unsigned int ready_
Definition: DcsStatus.h:102
DcsStatus::HBHEa
Definition: DcsStatus.h:38
l1tstage2_dqm_sourceclient-live_cfg.rawData
rawData
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:163
DcsStatus::CSCp
Definition: DcsStatus.h:47
DcsStatus::collectionTime
timespec collectionTime() const
Definition: DcsStatus.h:78
DcsStatus::ready
unsigned int ready() const
Definition: DcsStatus.h:80
DcsStatus::ZDC
Definition: DcsStatus.h:50
DcsStatus::magnetCurrent_
float magnetCurrent_
Definition: DcsStatus.h:103
DcsStatus::CASTOR
Definition: DcsStatus.h:49
TimeSpec::get_timespec
timespec get_timespec() const
Definition: TimeSpec.cc:4
operator<<
std::ostream & operator<<(std::ostream &s, const DcsStatus &c)
Pretty-print operator for DcsStatus.
Definition: DcsStatus.cc:51
DcsStatus::DT0
Definition: DcsStatus.h:44
DcsStatus::DTp
Definition: DcsStatus.h:45
DcsStatus::HBHEb
Definition: DcsStatus.h:39
DcsStatus::magnetTemperature
float magnetTemperature() const
Definition: DcsStatus.h:85
DcsStatus::name
std::string name() const
name method
Definition: DcsStatus.h:67
alignCSCRings.s
s
Definition: alignCSCRings.py:92
DcsStatus::ESm
Definition: DcsStatus.h:58
DcsStatus::bunchNumber_
unsigned int bunchNumber_
Definition: DcsStatus.h:97
DcsStatus::trigType
unsigned int trigType() const
Definition: DcsStatus.h:72
DcsStatus::nPartitions
Definition: DcsStatus.h:59
DcsStatus::TOB
Definition: DcsStatus.h:52
DcsStatus::collectionTime_
TimeSpec collectionTime_
Definition: DcsStatus.h:101
DcsStatus::eventID
unsigned int eventID() const
Definition: DcsStatus.h:73
DcsStatus::~DcsStatus
virtual ~DcsStatus()
Definition: DcsStatus.cc:48
DcsStatus::version
int version() const
Definition: DcsStatus.h:77
DcsStatus::ready
bool ready(int partitionNumber) const
Definition: DcsStatus.h:82
DcsStatus::DcsStatus
DcsStatus()
Definition: DcsStatus.cc:18
DcsStatus::TECm
Definition: DcsStatus.h:54
DcsStatus::DTm
Definition: DcsStatus.h:46
DcsStatus::FPIX
Definition: DcsStatus.h:56
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DcsStatus::empty
bool empty() const
empty method (= false)
Definition: DcsStatus.h:70
DcsStatus::version_
int version_
Definition: DcsStatus.h:99
DcsStatus::partitionList
static const int partitionList[]
Definition: DcsStatus.h:30
DcsStatus::HF
Definition: DcsStatus.h:41
DcsStatus::EBm
Definition: DcsStatus.h:35
TimeSpec.h
DcsStatus::magnetTemperature_
float magnetTemperature_
Definition: DcsStatus.h:104
DcsStatus::operator!=
int operator!=(const DcsStatus &e) const
inequality operator
Definition: DcsStatus.h:91
DcsStatus::magnetCurrent
float magnetCurrent() const
Definition: DcsStatus.h:84
TimeSpec
Definition: TimeSpec.h:7
DcsStatus::TECp
Definition: DcsStatus.h:53
DcsStatus::CSCm
Definition: DcsStatus.h:48
DcsStatus::EBp
Definition: DcsStatus.h:34
DcsStatus::bunchNumber
unsigned int bunchNumber() const
Definition: DcsStatus.h:75
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
DcsStatusCollection
std::vector< DcsStatus > DcsStatusCollection
Definition: DcsStatus.h:110
DcsStatus::ESp
Definition: DcsStatus.h:57
DcsStatus::RPC
Definition: DcsStatus.h:43
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37