CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LumiSummary.h
Go to the documentation of this file.
1 #ifndef DataFormats_Luminosity_LumiSummary_h
2 #define DataFormats_Luminosity_LumiSummary_h
3 
18 #include <vector>
19 #include <iosfwd>
20 #include <string>
21 class LumiSummary {
22  public:
23  class L1{
24  public:
27  unsigned int prescale;
28  };
29  class HLT{
30  public:
33  unsigned int prescale;
34  };
35 
36  public:
39  lumiversion_("-1"),
40  avginsdellumi_(0.0),
41  avginsdellumierr_(0.0),
42  lumisecqual_(0),
43  deadcount_(0),
44  bitzerocount_(),
45  lsnumber_(0),
46  startorbit_(0),
47  numorbit_(0)
48  {
49  hltdata_.reserve(100);
50  l1data_.reserve(192);
51  }
52 
54  LumiSummary(float avginsdellumi,
55  float avginsdellumierr,
56  short lumisecqual,
57  unsigned long long deadcount,
58  unsigned long long bitzerocount,
59  unsigned int lsnumber,
60  const std::vector<L1>& l1in,
61  const std::vector<HLT>& hltin,
62  unsigned int startorbit,
63  unsigned int numorbit,
64  const std::string& lumiversion):
65  lumiversion_(lumiversion),
66  avginsdellumi_(avginsdellumi),
67  avginsdellumierr_(avginsdellumierr),
68  lumisecqual_(lumisecqual),
69  deadcount_(deadcount), bitzerocount_(bitzerocount), lsnumber_(lsnumber),
70  hltdata_(hltin), l1data_(l1in),
71  startorbit_(startorbit),numorbit_(numorbit)
72  { }
73 
81  float avgInsDelLumi() const;
85  float avgInsDelLumiErr() const;
91  float intgDelLumi()const;
92  short lumiSecQual() const ;
96  unsigned long long deadcount() const;
100  unsigned long long bitzerocount() const;
107  float deadFrac() const ;
114  float liveFrac() const;
118  float lumiSectionLength() const;
119  unsigned int lsNumber() const;
120  unsigned int startOrbit() const;
121  unsigned int numOrbit() const;
124  bool isValid() const;
125  //retrieve trigger bit by bit number 0-191(algo,tech)
126  L1 l1info(unsigned int idx)const;
127  HLT hltinfo(unsigned int idx)const;
128  size_t nTriggerLine()const;
129  size_t nHLTPath()const;
131  float avgInsRecLumi() const;
133  float avgInsRecLumiErr() const;
135  float intgRecLumi()const;
136  bool isProductEqual(LumiSummary const& next) const;
141  std::string lumiVersion()const;
142  //
143  //setters
144  //
145  void setLumiVersion(const std::string& lumiversion);
146  void setLumiData(float instlumi,float instlumierr,short lumiquality);
147  void setDeadCount(unsigned long long deadcount);
148  void setBitZeroCount(unsigned long long bitzerocount);
149  void setlsnumber(unsigned int lsnumber);
150  void setOrbitData(unsigned int startorbit,unsigned int numorbit);
151  void swapL1Data(std::vector<L1>& l1data);
152  void swapHLTData(std::vector<HLT>& hltdata);
153  void copyL1Data(const std::vector<L1>& l1data);
154  void copyHLTData(const std::vector<HLT>& hltdata);
155 
156  private :
157  std::string lumiversion_;
158  //instant lumi , selected from best algorithm
160  //instant lumierror
162  //detector quality flag use HF,HLX
164  unsigned long long deadcount_;
165  unsigned long long bitzerocount_;
166  unsigned int lsnumber_;
167  //contains about 100 - 200 hlt paths
168  std::vector<HLT> hltdata_;
169  //contains 128 + 64 triggers
170  std::vector<L1> l1data_;
171  //first orbit number of this LS
172  unsigned int startorbit_;
173  //number of orbits in this LS
174  unsigned int numorbit_;
175 };
176 
177 std::ostream& operator<<(std::ostream& s, const LumiSummary& lumiSummary);
178 
179 #endif // DataFormats_Luminosity_LumiSummary_h
unsigned long long bitzerocount_
Definition: LumiSummary.h:165
unsigned int startOrbit() const
Definition: LumiSummary.cc:70
L1 l1info(unsigned int idx) const
Definition: LumiSummary.cc:82
void swapHLTData(std::vector< HLT > &hltdata)
Definition: LumiSummary.cc:154
float lumiSectionLength() const
Definition: LumiSummary.cc:61
unsigned int startorbit_
Definition: LumiSummary.h:172
tuple lumiSummary
Definition: runregparse.py:290
~LumiSummary()
destructor
Definition: LumiSummary.h:75
unsigned long long deadcount() const
Definition: LumiSummary.cc:33
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
float avgInsRecLumi() const
Definition: LumiSummary.cc:98
LumiSummary(float avginsdellumi, float avginsdellumierr, short lumisecqual, unsigned long long deadcount, unsigned long long bitzerocount, unsigned int lsnumber, const std::vector< L1 > &l1in, const std::vector< HLT > &hltin, unsigned int startorbit, unsigned int numorbit, const std::string &lumiversion)
set default constructor
Definition: LumiSummary.h:54
float intgRecLumi() const
Definition: LumiSummary.cc:25
void setlsnumber(unsigned int lsnumber)
Definition: LumiSummary.cc:141
unsigned int lsnumber_
Definition: LumiSummary.h:166
std::vector< L1 > l1data_
Definition: LumiSummary.h:170
tuple hltdata
Definition: dataDML.py:2362
unsigned int prescale
Definition: LumiSummary.h:27
bool isProductEqual(LumiSummary const &next) const
Definition: LumiSummary.cc:106
void setOrbitData(unsigned int startorbit, unsigned int numorbit)
Definition: LumiSummary.cc:145
float intgDelLumi() const
Definition: LumiSummary.cc:17
unsigned int lsNumber() const
Definition: LumiSummary.cc:66
LumiSummary()
default constructor
Definition: LumiSummary.h:38
void copyL1Data(const std::vector< L1 > &l1data)
Definition: LumiSummary.cc:158
float avginsdellumierr_
Definition: LumiSummary.h:161
unsigned int numOrbit() const
Definition: LumiSummary.cc:74
float avgInsRecLumiErr() const
Definition: LumiSummary.cc:102
float avgInsDelLumi() const
Definition: LumiSummary.cc:10
float avgInsDelLumiErr() const
Definition: LumiSummary.cc:21
float liveFrac() const
Definition: LumiSummary.cc:53
void setLumiVersion(const std::string &lumiversion)
Definition: LumiSummary.cc:123
std::string lumiversion_
Definition: LumiSummary.h:157
void setLumiData(float instlumi, float instlumierr, short lumiquality)
Definition: LumiSummary.cc:127
void setBitZeroCount(unsigned long long bitzerocount)
Definition: LumiSummary.cc:137
void copyHLTData(const std::vector< HLT > &hltdata)
Definition: LumiSummary.cc:162
void setDeadCount(unsigned long long deadcount)
Definition: LumiSummary.cc:133
size_t nTriggerLine() const
Definition: LumiSummary.cc:90
short lumisecqual_
Definition: LumiSummary.h:163
void swapL1Data(std::vector< L1 > &l1data)
Definition: LumiSummary.cc:150
HLT hltinfo(unsigned int idx) const
Definition: LumiSummary.cc:86
unsigned int numorbit_
Definition: LumiSummary.h:174
std::string lumiVersion() const
Definition: LumiSummary.cc:119
unsigned long long deadcount_
Definition: LumiSummary.h:164
float avginsdellumi_
Definition: LumiSummary.h:159
size_t nHLTPath() const
Definition: LumiSummary.cc:94
float deadFrac() const
Definition: LumiSummary.cc:41
bool isValid() const
Definition: LumiSummary.cc:78
std::vector< HLT > hltdata_
Definition: LumiSummary.h:168
unsigned long long bitzerocount() const
Definition: LumiSummary.cc:37
short lumiSecQual() const
Definition: LumiSummary.cc:29
unsigned int prescale
Definition: LumiSummary.h:33