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 :
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:71
L1 l1info(unsigned int idx) const
Definition: LumiSummary.cc:83
void swapHLTData(std::vector< HLT > &hltdata)
Definition: LumiSummary.cc:155
float lumiSectionLength() const
Definition: LumiSummary.cc:62
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:34
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
float avgInsRecLumi() const
Definition: LumiSummary.cc:99
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:26
void setlsnumber(unsigned int lsnumber)
Definition: LumiSummary.cc:142
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:107
void setOrbitData(unsigned int startorbit, unsigned int numorbit)
Definition: LumiSummary.cc:146
float intgDelLumi() const
Definition: LumiSummary.cc:18
unsigned int lsNumber() const
Definition: LumiSummary.cc:67
LumiSummary()
default constructor
Definition: LumiSummary.h:38
void copyL1Data(const std::vector< L1 > &l1data)
Definition: LumiSummary.cc:159
float avginsdellumierr_
Definition: LumiSummary.h:161
unsigned int numOrbit() const
Definition: LumiSummary.cc:75
float avgInsRecLumiErr() const
Definition: LumiSummary.cc:103
float avgInsDelLumi() const
Definition: LumiSummary.cc:10
float avgInsDelLumiErr() const
Definition: LumiSummary.cc:22
float liveFrac() const
Definition: LumiSummary.cc:54
void setLumiVersion(const std::string &lumiversion)
Definition: LumiSummary.cc:124
std::string lumiversion_
Definition: LumiSummary.h:157
void setLumiData(float instlumi, float instlumierr, short lumiquality)
Definition: LumiSummary.cc:128
void setBitZeroCount(unsigned long long bitzerocount)
Definition: LumiSummary.cc:138
void copyHLTData(const std::vector< HLT > &hltdata)
Definition: LumiSummary.cc:163
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
void setDeadCount(unsigned long long deadcount)
Definition: LumiSummary.cc:134
size_t nTriggerLine() const
Definition: LumiSummary.cc:91
short lumisecqual_
Definition: LumiSummary.h:163
void swapL1Data(std::vector< L1 > &l1data)
Definition: LumiSummary.cc:151
HLT hltinfo(unsigned int idx) const
Definition: LumiSummary.cc:87
unsigned int numorbit_
Definition: LumiSummary.h:174
std::string lumiVersion() const
Definition: LumiSummary.cc:120
unsigned long long deadcount_
Definition: LumiSummary.h:164
float avginsdellumi_
Definition: LumiSummary.h:159
size_t nHLTPath() const
Definition: LumiSummary.cc:95
float deadFrac() const
Definition: LumiSummary.cc:42
bool isValid() const
Definition: LumiSummary.cc:79
std::vector< HLT > hltdata_
Definition: LumiSummary.h:168
unsigned long long bitzerocount() const
Definition: LumiSummary.cc:38
short lumiSecQual() const
Definition: LumiSummary.cc:30
unsigned int prescale
Definition: LumiSummary.h:33