CMS 3D CMS Logo

LumiScalers.h
Go to the documentation of this file.
1 /*
2  * File: DataFormats/Scalers/interface/LumiScalers.h (W.Badgett)
3  *
4  * Various Luminosity Scalers from the HF Lumi System
5  *
6  */
7 
8 #ifndef DATAFORMATS_SCALERS_LUMISCALERS_H
9 #define DATAFORMATS_SCALERS_LUMISCALERS_H
10 
12 
13 #include <ctime>
14 #include <iosfwd>
15 #include <vector>
16 #include <string>
17 
25 
28 class LumiScalers {
29 public:
30  LumiScalers();
31  LumiScalers(const unsigned char* rawData);
32  virtual ~LumiScalers();
33 
34  enum { nOcc = 2 };
35 
37  std::string name() const { return "LumiScalers"; }
38 
40  bool empty() const { return false; }
41 
42  unsigned int trigType() const { return (trigType_); }
43  unsigned int eventID() const { return (eventID_); }
44  unsigned int sourceID() const { return (sourceID_); }
45  unsigned int bunchNumber() const { return (bunchNumber_); }
46 
47  int version() const { return (version_); }
48  timespec collectionTime() const { return (collectionTime_.get_timespec()); }
49  float normalization() const { return (normalization_); }
50  float deadTimeNormalization() const { return (deadTimeNormalization_); }
51 
52  float lumiFill() const { return (lumiFill_); }
53  float lumiRun() const { return (lumiRun_); }
54  float liveLumiFill() const { return (liveLumiFill_); }
55  float liveLumiRun() const { return (liveLumiRun_); }
56  float instantLumi() const { return (instantLumi_); }
57  float instantLumiErr() const { return (instantLumiErr_); }
58  unsigned char instantLumiQlty() const { return (instantLumiQlty_); }
59 
60  float lumiETFill() const { return (lumiETFill_); }
61  float lumiETRun() const { return (lumiETRun_); }
62  float liveLumiETFill() const { return (liveLumiETFill_); }
63  float liveLumiETRun() const { return (liveLumiETRun_); }
64  float instantETLumi() const { return (instantETLumi_); }
65  float instantETLumiErr() const { return (instantETLumiErr_); }
66  unsigned char instantETLumiQlty() const { return (instantETLumiQlty_); }
67 
68  std::vector<float> lumiOccFill() const { return (lumiOccFill_); }
69  std::vector<float> lumiOccRun() const { return (lumiOccRun_); }
70  std::vector<float> liveLumiOccFill() const { return (liveLumiOccFill_); }
71  std::vector<float> liveLumiOccRun() const { return (liveLumiOccRun_); }
72  std::vector<float> instantOccLumi() const { return (instantOccLumi_); }
73  std::vector<float> instantOccLumiErr() const { return (instantOccLumiErr_); }
74  std::vector<unsigned char> instantOccLumiQlty() const { return (instantOccLumiQlty_); }
75  std::vector<float> lumiNoise() const { return (lumiNoise_); }
76 
77  unsigned int sectionNumber() const { return (sectionNumber_); }
78  unsigned int startOrbit() const { return (startOrbit_); }
79  unsigned int numOrbits() const { return (numOrbits_); }
80 
81  float pileup() const { return (pileup_); }
82  float pileupRMS() const { return (pileupRMS_); }
83  float bunchLumi() const { return (bunchLumi_); }
84  float spare() const { return (spare_); }
85 
87  int operator==(const LumiScalers& e) const { return false; }
88 
90  int operator!=(const LumiScalers& e) const { return false; }
91 
92 protected:
93  unsigned int trigType_;
94  unsigned int eventID_;
95  unsigned int sourceID_;
96  unsigned int bunchNumber_;
97 
98  int version_;
99 
101 
104 
105  float lumiFill_;
106  float lumiRun_;
111  unsigned char instantLumiQlty_;
112 
113  float lumiETFill_;
114  float lumiETRun_;
119 
120  unsigned char instantETLumiQlty_;
121 
122  std::vector<float> lumiOccFill_;
123  std::vector<float> lumiOccRun_;
124  std::vector<float> liveLumiOccFill_;
125  std::vector<float> liveLumiOccRun_;
126  std::vector<float> instantOccLumi_;
127  std::vector<float> instantOccLumiErr_;
128  std::vector<unsigned char> instantOccLumiQlty_;
129  std::vector<float> lumiNoise_;
130 
131  unsigned int sectionNumber_;
132  unsigned int startOrbit_;
133  unsigned int numOrbits_;
134 
135  float pileup_;
136  float pileupRMS_;
137  float bunchLumi_;
138  float spare_;
139 };
140 
142 std::ostream& operator<<(std::ostream& s, const LumiScalers& c);
143 
144 typedef std::vector<LumiScalers> LumiScalersCollection;
145 
146 #endif
float pileup_
Definition: LumiScalers.h:135
std::vector< unsigned char > instantOccLumiQlty_
Definition: LumiScalers.h:128
std::vector< float > lumiOccFill() const
Definition: LumiScalers.h:68
unsigned int trigType() const
Definition: LumiScalers.h:42
float lumiETFill() const
Definition: LumiScalers.h:60
unsigned char instantETLumiQlty() const
Definition: LumiScalers.h:66
unsigned char instantLumiQlty_
Definition: LumiScalers.h:111
unsigned int sectionNumber() const
Definition: LumiScalers.h:77
unsigned int bunchNumber() const
Definition: LumiScalers.h:45
virtual ~LumiScalers()
Definition: LumiScalers.cc:121
int version() const
Definition: LumiScalers.h:47
std::vector< float > liveLumiOccRun_
Definition: LumiScalers.h:125
std::vector< float > liveLumiOccFill_
Definition: LumiScalers.h:124
float lumiETRun_
Definition: LumiScalers.h:114
unsigned char instantETLumiQlty_
Definition: LumiScalers.h:120
float liveLumiETRun_
Definition: LumiScalers.h:116
std::vector< float > instantOccLumi_
Definition: LumiScalers.h:126
float lumiETRun() const
Definition: LumiScalers.h:61
float liveLumiFill_
Definition: LumiScalers.h:107
std::string name() const
name method
Definition: LumiScalers.h:37
float normalization() const
Definition: LumiScalers.h:49
float pileupRMS() const
Definition: LumiScalers.h:82
float instantETLumi() const
Definition: LumiScalers.h:64
std::vector< float > instantOccLumiErr() const
Definition: LumiScalers.h:73
float spare_
Definition: LumiScalers.h:138
std::vector< float > lumiOccRun_
Definition: LumiScalers.h:123
float bunchLumi() const
Definition: LumiScalers.h:83
float pileup() const
Definition: LumiScalers.h:81
timespec get_timespec() const
Definition: TimeSpec.cc:4
int operator!=(const LumiScalers &e) const
inequality operator
Definition: LumiScalers.h:90
float liveLumiETFill_
Definition: LumiScalers.h:115
float liveLumiRun_
Definition: LumiScalers.h:108
std::vector< float > lumiNoise_
Definition: LumiScalers.h:129
float instantLumi() const
Definition: LumiScalers.h:56
float instantLumiErr_
Definition: LumiScalers.h:110
float deadTimeNormalization_
Definition: LumiScalers.h:103
float lumiETFill_
Definition: LumiScalers.h:113
float pileupRMS_
Definition: LumiScalers.h:136
float lumiFill_
Definition: LumiScalers.h:105
float liveLumiETRun() const
Definition: LumiScalers.h:63
float normalization_
Definition: LumiScalers.h:102
float liveLumiRun() const
Definition: LumiScalers.h:55
float instantETLumiErr_
Definition: LumiScalers.h:118
unsigned int numOrbits() const
Definition: LumiScalers.h:79
float lumiFill() const
Definition: LumiScalers.h:52
timespec collectionTime() const
Definition: LumiScalers.h:48
unsigned int sectionNumber_
Definition: LumiScalers.h:131
float bunchLumi_
Definition: LumiScalers.h:137
float instantETLumiErr() const
Definition: LumiScalers.h:65
float instantETLumi_
Definition: LumiScalers.h:117
std::vector< float > lumiOccRun() const
Definition: LumiScalers.h:69
std::vector< float > lumiNoise() const
Definition: LumiScalers.h:75
std::vector< float > instantOccLumiErr_
Definition: LumiScalers.h:127
std::vector< unsigned char > instantOccLumiQlty() const
Definition: LumiScalers.h:74
float liveLumiETFill() const
Definition: LumiScalers.h:62
std::vector< float > lumiOccFill_
Definition: LumiScalers.h:122
float lumiRun() const
Definition: LumiScalers.h:53
float lumiRun_
Definition: LumiScalers.h:106
unsigned int eventID() const
Definition: LumiScalers.h:43
float spare() const
Definition: LumiScalers.h:84
unsigned char instantLumiQlty() const
Definition: LumiScalers.h:58
float instantLumi_
Definition: LumiScalers.h:109
float liveLumiFill() const
Definition: LumiScalers.h:54
bool empty() const
empty method (= false)
Definition: LumiScalers.h:40
unsigned int startOrbit() const
Definition: LumiScalers.h:78
std::ostream & operator<<(std::ostream &s, const LumiScalers &c)
Pretty-print operator for LumiScalers.
Definition: LumiScalers.cc:124
float instantLumiErr() const
Definition: LumiScalers.h:57
unsigned int sourceID() const
Definition: LumiScalers.h:44
std::vector< float > instantOccLumi() const
Definition: LumiScalers.h:72
int operator==(const LumiScalers &e) const
equality operator
Definition: LumiScalers.h:87
std::vector< LumiScalers > LumiScalersCollection
Definition: LumiScalers.h:144
unsigned int bunchNumber_
Definition: LumiScalers.h:96
TimeSpec collectionTime_
Definition: LumiScalers.h:100
unsigned int startOrbit_
Definition: LumiScalers.h:132
std::vector< float > liveLumiOccRun() const
Definition: LumiScalers.h:71
unsigned int sourceID_
Definition: LumiScalers.h:95
unsigned int eventID_
Definition: LumiScalers.h:94
unsigned int numOrbits_
Definition: LumiScalers.h:133
unsigned int trigType_
Definition: LumiScalers.h:93
float deadTimeNormalization() const
Definition: LumiScalers.h:50
std::vector< float > liveLumiOccFill() const
Definition: LumiScalers.h:70