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 {
30  public:
31 
32  static const int partitionList[];
33  static const char * const partitionName[];
34 
35  enum
36  {
37  EBp = 0,
38  EBm = 1,
39  EEp = 2,
40  EEm = 3,
41  HBHEa = 5,
42  HBHEb = 6,
43  HBHEc = 7,
44  HF = 8,
45  HO = 9,
46  RPC = 12,
47  DT0 = 13,
48  DTp = 14,
49  DTm = 15,
50  CSCp = 16,
51  CSCm = 17,
52  CASTOR = 20,
53  ZDC = 22,
54  TIBTID = 24,
55  TOB = 25,
56  TECp = 26,
57  TECm = 27,
58  BPIX = 28,
59  FPIX = 29,
60  ESp = 30,
61  ESm = 31,
63  };
64 
65 
66  DcsStatus();
67  DcsStatus(const unsigned char * rawData);
68  virtual ~DcsStatus();
69 
71  std::string name() const { return "DcsStatus"; }
72 
74  bool empty() const { return false; }
75 
76  unsigned int trigType() const { return(trigType_);}
77  unsigned int eventID() const { return(eventID_);}
78  unsigned int sourceID() const { return(sourceID_);}
79  unsigned int bunchNumber() const { return(bunchNumber_);}
80 
81  int version() const { return(version_);}
82  timespec collectionTime() const { return(collectionTime_.get_timespec());}
83 
84  unsigned int ready() const { return(ready_);}
85 
86  bool ready(int partitionNumber) const
87  { return( (ready_ & ( 1 << partitionNumber )) != 0 );}
88 
89  float magnetCurrent() const { return(magnetCurrent_);}
90  float magnetTemperature() const { return(magnetTemperature_);}
91 
93  int operator==(const DcsStatus& e) const { return false; }
94 
96  int operator!=(const DcsStatus& e) const { return false; }
97 
98 protected:
99 
100  unsigned int trigType_;
101  unsigned int eventID_;
102  unsigned int sourceID_;
103  unsigned int bunchNumber_;
104 
105  int version_;
106 
108  unsigned int ready_;
111 };
112 
114 std::ostream& operator<<(std::ostream& s, const DcsStatus& c);
115 
116 typedef std::vector<DcsStatus> DcsStatusCollection;
117 
118 #endif
unsigned int trigType() const
Definition: DcsStatus.h:76
timespec collectionTime() const
Definition: DcsStatus.h:82
unsigned int bunchNumber_
Definition: DcsStatus.h:103
bool empty() const
empty method (= false)
Definition: DcsStatus.h:74
virtual ~DcsStatus()
Definition: DcsStatus.cc:99
unsigned int bunchNumber() const
Definition: DcsStatus.h:79
float magnetTemperature() const
Definition: DcsStatus.h:90
bool ready(int partitionNumber) const
Definition: DcsStatus.h:86
unsigned int eventID_
Definition: DcsStatus.h:101
timespec get_timespec() const
Definition: TimeSpec.cc:4
int version() const
Definition: DcsStatus.h:81
unsigned int ready() const
Definition: DcsStatus.h:84
int version_
Definition: DcsStatus.h:105
unsigned int sourceID() const
Definition: DcsStatus.h:78
static const char *const partitionName[]
Definition: DcsStatus.h:33
int operator==(const DcsStatus &e) const
equality operator
Definition: DcsStatus.h:93
std::ostream & operator<<(std::ostream &s, const DcsStatus &c)
Pretty-print operator for DcsStatus.
Definition: DcsStatus.cc:103
std::string name() const
name method
Definition: DcsStatus.h:71
std::vector< DcsStatus > DcsStatusCollection
Definition: DcsStatus.h:116
unsigned int trigType_
Definition: DcsStatus.h:100
unsigned int ready_
Definition: DcsStatus.h:108
int operator!=(const DcsStatus &e) const
inequality operator
Definition: DcsStatus.h:96
TimeSpec collectionTime_
Definition: DcsStatus.h:107
unsigned int sourceID_
Definition: DcsStatus.h:102
float magnetTemperature_
Definition: DcsStatus.h:110
float magnetCurrent() const
Definition: DcsStatus.h:89
unsigned int eventID() const
Definition: DcsStatus.h:77
float magnetCurrent_
Definition: DcsStatus.h:109
static const int partitionList[]
Definition: DcsStatus.h:32