CMS 3D CMS Logo

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:
24  L1() : triggernameidx(-1), prescale(0) {}
26  unsigned int prescale;
27  };
28  class HLT {
29  public:
30  HLT() : pathnameidx(-1), prescale(0) {}
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  hltdata_.reserve(100);
48  l1data_.reserve(192);
49  }
50 
52  LumiSummary(float avginsdellumi,
53  float avginsdellumierr,
54  short lumisecqual,
55  unsigned long long deadcount,
56  unsigned long long bitzerocount,
57  unsigned int lsnumber,
58  const std::vector<L1>& l1in,
59  const std::vector<HLT>& hltin,
60  unsigned int startorbit,
61  unsigned int numorbit,
62  const std::string& lumiversion)
64  avginsdellumi_(avginsdellumi),
65  avginsdellumierr_(avginsdellumierr),
66  lumisecqual_(lumisecqual),
69  lsnumber_(lsnumber),
70  hltdata_(hltin),
71  l1data_(l1in),
72  startorbit_(startorbit),
73  numorbit_(numorbit) {}
74 
82  float avgInsDelLumi() const;
86  float avgInsDelLumiErr() const;
92  float intgDelLumi() const;
93  short lumiSecQual() const;
97  unsigned long long deadcount() const;
101  unsigned long long bitzerocount() const;
108  float deadFrac() const;
115  float liveFrac() const;
119  float lumiSectionLength() const;
120  unsigned int lsNumber() const;
121  unsigned int startOrbit() const;
122  unsigned int numOrbit() const;
125  bool isValid() const;
126  //retrieve trigger bit by bit number 0-191(algo,tech)
127  L1 l1info(unsigned int idx) const;
128  HLT hltinfo(unsigned int idx) const;
129  size_t nTriggerLine() const;
130  size_t nHLTPath() const;
132  float avgInsRecLumi() const;
134  float avgInsRecLumiErr() const;
136  float intgRecLumi() const;
137  bool isProductEqual(LumiSummary const& next) const;
142  std::string lumiVersion() const;
143  //
144  //setters
145  //
147  void setLumiData(float instlumi, float instlumierr, short lumiquality);
148  void setDeadCount(unsigned long long deadcount);
149  void setBitZeroCount(unsigned long long bitzerocount);
150  void setlsnumber(unsigned int lsnumber);
151  void setOrbitData(unsigned int startorbit, unsigned int numorbit);
152  void swapL1Data(std::vector<L1>& l1data);
153  void swapHLTData(std::vector<HLT>& hltdata);
154  void copyL1Data(const std::vector<L1>& l1data);
155  void copyHLTData(const std::vector<HLT>& hltdata);
156 
157 private:
159  //instant lumi , selected from best algorithm
161  //instant lumierror
163  //detector quality flag use HF,HLX
165  unsigned long long deadcount_;
166  unsigned long long bitzerocount_;
167  unsigned int lsnumber_;
168  //contains about 100 - 200 hlt paths
169  std::vector<HLT> hltdata_;
170  //contains 128 + 64 triggers
171  std::vector<L1> l1data_;
172  //first orbit number of this LS
173  unsigned int startorbit_;
174  //number of orbits in this LS
175  unsigned int numorbit_;
176 };
177 
178 std::ostream& operator<<(std::ostream& s, const LumiSummary& lumiSummary);
179 
180 #endif // DataFormats_Luminosity_LumiSummary_h
LumiSummary::nHLTPath
size_t nHLTPath() const
Definition: LumiSummary.cc:54
LumiSummary::deadFrac
float deadFrac() const
Definition: LumiSummary.cc:22
LumiSummary::intgDelLumi
float intgDelLumi() const
Definition: LumiSummary.cc:16
PixelRegions::L1
Definition: PixelRegionContainers.h:32
FastTimerService_cff.lumiversion
lumiversion
Definition: FastTimerService_cff.py:13
LumiSummary::numOrbit
unsigned int numOrbit() const
Definition: LumiSummary.cc:49
LumiSummary::L1::prescale
unsigned int prescale
Definition: LumiSummary.h:26
LumiSummary::lumiversion_
std::string lumiversion_
Definition: LumiSummary.h:158
LumiSummary::HLT::HLT
HLT()
Definition: LumiSummary.h:30
LumiSummary::hltinfo
HLT hltinfo(unsigned int idx) const
Definition: LumiSummary.cc:52
operator<<
std::ostream & operator<<(std::ostream &s, const LumiSummary &lumiSummary)
Definition: LumiSummary.cc:81
LumiSummary::lumiSectionLength
float lumiSectionLength() const
Definition: LumiSummary.cc:43
LumiSummary::bitzerocount
unsigned long long bitzerocount() const
Definition: LumiSummary.cc:21
LumiSummary::~LumiSummary
~LumiSummary()
destructor
Definition: LumiSummary.h:76
LumiSummary::isProductEqual
bool isProductEqual(LumiSummary const &next) const
Definition: LumiSummary.cc:57
LumiSummary::setOrbitData
void setOrbitData(unsigned int startorbit, unsigned int numorbit)
Definition: LumiSummary.cc:73
LumiSummary::avgInsDelLumi
float avgInsDelLumi() const
Definition: LumiSummary.cc:8
LumiSummary::LumiSummary
LumiSummary()
default constructor
Definition: LumiSummary.h:37
LumiSummary::deadcount
unsigned long long deadcount() const
Definition: LumiSummary.cc:20
LumiSummary::avgInsDelLumiErr
float avgInsDelLumiErr() const
Definition: LumiSummary.cc:17
LumiSummary::swapHLTData
void swapHLTData(std::vector< HLT > &hltdata)
Definition: LumiSummary.cc:78
LumiSummary::liveFrac
float liveFrac() const
Definition: LumiSummary.cc:35
LumiSummary::L1
Definition: LumiSummary.h:22
LumiSummary::hltdata_
std::vector< HLT > hltdata_
Definition: LumiSummary.h:169
LumiSummary::LumiSummary
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:52
LumiSummary::HLT::prescale
unsigned int prescale
Definition: LumiSummary.h:32
LumiSummary::avginsdellumierr_
float avginsdellumierr_
Definition: LumiSummary.h:162
LumiSummary::setlsnumber
void setlsnumber(unsigned int lsnumber)
Definition: LumiSummary.cc:72
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
LumiSummary::isValid
bool isValid() const
Definition: LumiSummary.cc:50
LumiSummary::nTriggerLine
size_t nTriggerLine() const
Definition: LumiSummary.cc:53
alignCSCRings.s
s
Definition: alignCSCRings.py:92
LumiSummary::lumiSecQual
short lumiSecQual() const
Definition: LumiSummary.cc:19
LumiSummary::setLumiData
void setLumiData(float instlumi, float instlumierr, short lumiquality)
Definition: LumiSummary.cc:65
LumiSummary::copyL1Data
void copyL1Data(const std::vector< L1 > &l1data)
Definition: LumiSummary.cc:79
LumiSummary
Definition: LumiSummary.h:20
LumiSummary::L1::triggernameidx
int triggernameidx
Definition: LumiSummary.h:25
LumiSummary::copyHLTData
void copyHLTData(const std::vector< HLT > &hltdata)
Definition: LumiSummary.cc:80
LumiSummary::avgInsRecLumi
float avgInsRecLumi() const
Definition: LumiSummary.cc:55
LumiSummary::startOrbit
unsigned int startOrbit() const
Definition: LumiSummary.cc:48
LumiSummary::setLumiVersion
void setLumiVersion(const std::string &lumiversion)
Definition: LumiSummary.cc:64
LumiSummary::swapL1Data
void swapL1Data(std::vector< L1 > &l1data)
Definition: LumiSummary.cc:77
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LumiSummary::setDeadCount
void setDeadCount(unsigned long long deadcount)
Definition: LumiSummary.cc:70
LumiSummary::avginsdellumi_
float avginsdellumi_
Definition: LumiSummary.h:160
LumiSummary::numorbit_
unsigned int numorbit_
Definition: LumiSummary.h:175
LumiSummary::lumisecqual_
short lumisecqual_
Definition: LumiSummary.h:164
LumiSummary::intgRecLumi
float intgRecLumi() const
Definition: LumiSummary.cc:18
LumiSummary::lsNumber
unsigned int lsNumber() const
Definition: LumiSummary.cc:47
LumiSummary::setBitZeroCount
void setBitZeroCount(unsigned long long bitzerocount)
Definition: LumiSummary.cc:71
bphysicsOniaDQM_cfi.lumiSummary
lumiSummary
Definition: bphysicsOniaDQM_cfi.py:8
LumiSummary::l1data_
std::vector< L1 > l1data_
Definition: LumiSummary.h:171
prescale
Definition: PrescaleEventFilter.cc:32
LumiSummary::lsnumber_
unsigned int lsnumber_
Definition: LumiSummary.h:167
trackingPlots.HLT
HLT
Definition: trackingPlots.py:1393
LumiSummary::bitzerocount_
unsigned long long bitzerocount_
Definition: LumiSummary.h:166
LumiSummary::HLT
Definition: LumiSummary.h:28
LumiSummary::avgInsRecLumiErr
float avgInsRecLumiErr() const
Definition: LumiSummary.cc:56
LumiSummary::deadcount_
unsigned long long deadcount_
Definition: LumiSummary.h:165
LumiSummary::HLT::pathnameidx
int pathnameidx
Definition: LumiSummary.h:31
LumiSummary::startorbit_
unsigned int startorbit_
Definition: LumiSummary.h:173
LumiSummary::L1::L1
L1()
Definition: LumiSummary.h:24
LumiSummary::l1info
L1 l1info(unsigned int idx) const
Definition: LumiSummary.cc:51
LumiSummary::lumiVersion
std::string lumiVersion() const
Definition: LumiSummary.cc:63
GetRecoTauVFromDQM_MC_cff.next
next
Definition: GetRecoTauVFromDQM_MC_cff.py:31