test
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 
17 #include <vector>
18 #include <iosfwd>
19 #include <string>
20 class LumiSummary {
21  public:
22  class L1{
23  public:
26  unsigned int prescale;
27  };
28  class HLT{
29  public:
32  unsigned int prescale;
33  };
34 
35  public:
38  lumiversion_("-1"),
39  avginsdellumi_(0.0),
40  avginsdellumierr_(0.0),
41  lumisecqual_(0),
42  deadcount_(0),
43  bitzerocount_(),
44  lsnumber_(0),
45  startorbit_(0),
46  numorbit_(0)
47  {
48  hltdata_.reserve(100);
49  l1data_.reserve(192);
50  }
51 
53  LumiSummary(float avginsdellumi,
54  float avginsdellumierr,
55  short lumisecqual,
56  unsigned long long deadcount,
57  unsigned long long bitzerocount,
58  unsigned int lsnumber,
59  const std::vector<L1>& l1in,
60  const std::vector<HLT>& hltin,
61  unsigned int startorbit,
62  unsigned int numorbit,
63  const std::string& lumiversion):
64  lumiversion_(lumiversion),
65  avginsdellumi_(avginsdellumi),
66  avginsdellumierr_(avginsdellumierr),
67  lumisecqual_(lumisecqual),
68  deadcount_(deadcount), bitzerocount_(bitzerocount), lsnumber_(lsnumber),
69  hltdata_(hltin), l1data_(l1in),
70  startorbit_(startorbit),numorbit_(numorbit)
71  { }
72 
80  float avgInsDelLumi() const;
84  float avgInsDelLumiErr() const;
90  float intgDelLumi()const;
91  short lumiSecQual() const ;
95  unsigned long long deadcount() const;
99  unsigned long long bitzerocount() const;
106  float deadFrac() const ;
113  float liveFrac() const;
117  float lumiSectionLength() const;
118  unsigned int lsNumber() const;
119  unsigned int startOrbit() const;
120  unsigned int numOrbit() const;
123  bool isValid() const;
124  //retrieve trigger bit by bit number 0-191(algo,tech)
125  L1 l1info(unsigned int idx)const;
126  HLT hltinfo(unsigned int idx)const;
127  size_t nTriggerLine()const;
128  size_t nHLTPath()const;
130  float avgInsRecLumi() const;
132  float avgInsRecLumiErr() const;
134  float intgRecLumi()const;
135  bool isProductEqual(LumiSummary const& next) const;
140  std::string lumiVersion()const;
141  //
142  //setters
143  //
144  void setLumiVersion(const std::string& lumiversion);
145  void setLumiData(float instlumi,float instlumierr,short lumiquality);
146  void setDeadCount(unsigned long long deadcount);
147  void setBitZeroCount(unsigned long long bitzerocount);
148  void setlsnumber(unsigned int lsnumber);
149  void setOrbitData(unsigned int startorbit,unsigned int numorbit);
150  void swapL1Data(std::vector<L1>& l1data);
151  void swapHLTData(std::vector<HLT>& hltdata);
152  void copyL1Data(const std::vector<L1>& l1data);
153  void copyHLTData(const std::vector<HLT>& hltdata);
154 
155  private :
157  //instant lumi , selected from best algorithm
159  //instant lumierror
161  //detector quality flag use HF,HLX
163  unsigned long long deadcount_;
164  unsigned long long bitzerocount_;
165  unsigned int lsnumber_;
166  //contains about 100 - 200 hlt paths
167  std::vector<HLT> hltdata_;
168  //contains 128 + 64 triggers
169  std::vector<L1> l1data_;
170  //first orbit number of this LS
171  unsigned int startorbit_;
172  //number of orbits in this LS
173  unsigned int numorbit_;
174 };
175 
176 std::ostream& operator<<(std::ostream& s, const LumiSummary& lumiSummary);
177 
178 #endif // DataFormats_Luminosity_LumiSummary_h
unsigned long long bitzerocount_
Definition: LumiSummary.h:164
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:171
tuple lumiSummary
Definition: runregparse.py:290
~LumiSummary()
destructor
Definition: LumiSummary.h:74
unsigned long long deadcount() const
Definition: LumiSummary.cc:33
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
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:53
float intgRecLumi() const
Definition: LumiSummary.cc:25
void setlsnumber(unsigned int lsnumber)
Definition: LumiSummary.cc:141
unsigned int lsnumber_
Definition: LumiSummary.h:165
std::vector< L1 > l1data_
Definition: LumiSummary.h:169
tuple hltdata
Definition: dataDML.py:2371
unsigned int prescale
Definition: LumiSummary.h:26
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:37
void copyL1Data(const std::vector< L1 > &l1data)
Definition: LumiSummary.cc:158
float avginsdellumierr_
Definition: LumiSummary.h:160
unsigned int numOrbit() const
Definition: LumiSummary.cc:74
float avgInsRecLumiErr() const
Definition: LumiSummary.cc:102
float avgInsDelLumi() const
Definition: LumiSummary.cc:9
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:156
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
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
void setDeadCount(unsigned long long deadcount)
Definition: LumiSummary.cc:133
size_t nTriggerLine() const
Definition: LumiSummary.cc:90
short lumisecqual_
Definition: LumiSummary.h:162
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:173
std::string lumiVersion() const
Definition: LumiSummary.cc:119
unsigned long long deadcount_
Definition: LumiSummary.h:163
float avginsdellumi_
Definition: LumiSummary.h:158
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:167
unsigned long long bitzerocount() const
Definition: LumiSummary.cc:37
short lumiSecQual() const
Definition: LumiSummary.cc:29
unsigned int prescale
Definition: LumiSummary.h:32