CMS 3D CMS Logo

LumiSectionData.cc
Go to the documentation of this file.
2 #include <iostream>
3 lumi::LumiSectionData::LumiSectionData() : m_sectionid(0), m_versionid("-1") {
4  m_bx.reserve(lumi::BXMAX * LUMIALGOMAX);
5 }
6 std::string lumi::LumiSectionData::lumiVersion() const { return m_versionid; }
7 int lumi::LumiSectionData::lumisectionID() const { return m_sectionid; }
8 size_t lumi::LumiSectionData::nBunchCrossing() const { return m_bx.size() / lumi::LUMIALGOMAX; }
9 float lumi::LumiSectionData::lumiAverage() const { return m_lumiavg; }
10 float lumi::LumiSectionData::lumiError() const { return m_lumierror; }
11 float lumi::LumiSectionData::deadFraction() const { return m_deadfrac; }
12 unsigned long long lumi::LumiSectionData::startorbit() const { return m_startorbit; }
13 int lumi::LumiSectionData::lumiquality() const { return m_quality; }
15  std::vector<lumi::BunchCrossingInfo>& result) const {
16  result.clear();
17  size_t offset = lumialgotype * lumi::BXMAX;
18  std::copy(m_bx.begin() + offset, m_bx.begin() + offset + lumi::BXMAX, std::back_inserter(result));
19 }
20 
22  const LumiAlgoType lumialgotype) const {
23  int realIdx = BXIndex - lumi::BXMIN + lumialgotype * lumi::BXMAX;
24  return m_bx.at(realIdx);
25 }
27  return m_bx.begin() + lumialgotype * BXMAX;
28 }
30  return m_bx.end() - (lumi::BXMAX)*lumialgotype;
31 }
32 size_t lumi::LumiSectionData::nHLTPath() const { return m_hlt.size(); }
33 bool lumi::LumiSectionData::HLThasData() const { return !m_hlt.empty(); }
34 lumi::HLTIterator lumi::LumiSectionData::hltBegin() const { return m_hlt.begin(); }
35 lumi::HLTIterator lumi::LumiSectionData::hltEnd() const { return m_hlt.end(); }
36 bool lumi::LumiSectionData::TriggerhasData() const { return !m_trigger.empty(); }
37 lumi::TriggerIterator lumi::LumiSectionData::trgBegin() const { return m_trigger.begin(); }
38 lumi::TriggerIterator lumi::LumiSectionData::trgEnd() const { return m_trigger.end(); }
39 short lumi::LumiSectionData::qualityFlag() const { return m_quality; }
40 void lumi::LumiSectionData::setLumiNull() { m_versionid = -99; }
41 void lumi::LumiSectionData::setLumiVersion(const std::string& versionid) { m_versionid = versionid; }
42 void lumi::LumiSectionData::setLumiSectionId(int sectionid) { m_sectionid = sectionid; }
43 void lumi::LumiSectionData::setLumiAverage(float avg) { m_lumiavg = avg; }
44 void lumi::LumiSectionData::setLumiQuality(int lumiquality) { m_quality = lumiquality; }
45 void lumi::LumiSectionData::setDeadFraction(float deadfrac) { m_deadfrac = deadfrac; }
46 void lumi::LumiSectionData::setLumiError(float lumierr) { m_lumierror = lumierr; }
47 void lumi::LumiSectionData::setStartOrbit(unsigned long long orbtnumber) { m_startorbit = orbtnumber; }
48 void lumi::LumiSectionData::setBunchCrossingData(const std::vector<BunchCrossingInfo>& BXs,
49  const LumiAlgoType algotype) {
50  std::copy(BXs.begin(), BXs.begin() + lumi::BXMAX, std::back_inserter(m_bx));
51 }
52 void lumi::LumiSectionData::setHLTData(const std::vector<HLTInfo>& hltdetail) {
53  std::copy(hltdetail.begin(), hltdetail.end(), std::back_inserter(m_hlt));
54 }
55 void lumi::LumiSectionData::setTriggerData(const std::vector<TriggerInfo>& triggerinfo) {
56  std::copy(triggerinfo.begin(), triggerinfo.end(), std::back_inserter(m_trigger));
57 }
58 void lumi::LumiSectionData::setQualityFlag(short qualityflag) { m_quality = qualityflag; }
59 void lumi::LumiSectionData::print(std::ostream& s) const {
60  s << "lumi section id :" << m_sectionid << ", ";
61  s << "lumi data version : " << m_versionid << ", ";
62  s << "lumi average : " << m_lumiavg << ", ";
63  s << "lumi error : " << m_lumierror << ", ";
64  s << "lumi quality : " << m_quality << ", ";
65  s << "lumi deadfrac : " << m_deadfrac << std::endl;
66  std::vector<lumi::TriggerInfo>::const_iterator trgit;
67  std::vector<lumi::TriggerInfo>::const_iterator trgitBeg = m_trigger.begin();
68  std::vector<lumi::TriggerInfo>::const_iterator trgitEnd = m_trigger.end();
69  unsigned int i = 0;
70  for (trgit = trgitBeg; trgit != trgitEnd; ++trgit) {
71  std::cout << " trg " << i << " : name : " << trgit->name << " : count : " << trgit->triggercount
72  << " : deadtime : " << trgit->deadtimecount << " : prescale : " << trgit->prescale << std::endl;
73  ++i;
74  }
75 }
lumi::LUMIALGOMAX
static const int LUMIALGOMAX
Definition: LumiSectionData.h:23
lumi::LumiSectionData::setLumiVersion
void setLumiVersion(const std::string &versionid)
Definition: LumiSectionData.cc:41
mps_fire.i
i
Definition: mps_fire.py:355
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
lumi::LumiSectionData::lumiquality
int lumiquality() const
Definition: LumiSectionData.cc:13
gather_cfg.cout
cout
Definition: gather_cfg.py:144
lumi::LumiSectionData::hltBegin
HLTIterator hltBegin() const
Definition: LumiSectionData.cc:34
lumi::LumiSectionData::setLumiError
void setLumiError(float lumierr)
Definition: LumiSectionData.cc:46
lumi::LumiSectionData::hltEnd
HLTIterator hltEnd() const
Definition: LumiSectionData.cc:35
lumi::LumiSectionData::lumiAverage
float lumiAverage() const
Definition: LumiSectionData.cc:9
alignCSCRings.s
s
Definition: alignCSCRings.py:92
lumi::LumiSectionData::lumiVersion
std::string lumiVersion() const
Definition: LumiSectionData.cc:6
lumi::LumiSectionData::TriggerhasData
bool TriggerhasData() const
Definition: LumiSectionData.cc:36
lumi::LumiSectionData::setQualityFlag
void setQualityFlag(short qualityflag)
Definition: LumiSectionData.cc:58
lumi::LumiSectionData::setLumiAverage
void setLumiAverage(float lumiavg)
Definition: LumiSectionData.cc:43
lumi::LumiSectionData::bunchCrossingBegin
BunchCrossingIterator bunchCrossingBegin(const LumiAlgoType lumialgotype) const
Definition: LumiSectionData.cc:26
lumi::TriggerIterator
std::vector< TriggerInfo >::const_iterator TriggerIterator
Definition: LumiSectionData.h:67
lumi::LumiSectionData::lumisectionID
int lumisectionID() const
Definition: LumiSectionData.cc:7
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
lumi::LumiSectionData::setBunchCrossingData
void setBunchCrossingData(const std::vector< BunchCrossingInfo > &BXs, const LumiAlgoType algotype)
Definition: LumiSectionData.cc:48
lumi::LumiSectionData::setStartOrbit
void setStartOrbit(unsigned long long orbtnumber)
Definition: LumiSectionData.cc:47
lumi::LumiSectionData::setTriggerData
void setTriggerData(const std::vector< TriggerInfo > &triggerinfo)
Definition: LumiSectionData.cc:55
lumi::LumiAlgoType
LumiAlgoType
Definition: LumiSectionData.h:25
lumi::LumiSectionData::print
void print(std::ostream &s) const
Definition: LumiSectionData.cc:59
lumi::LumiSectionData::startorbit
unsigned long long startorbit() const
Definition: LumiSectionData.cc:12
lumi::BunchCrossingInfo
Definition: LumiSectionData.h:52
lumi::LumiSectionData::LumiSectionData
LumiSectionData()
Definition: LumiSectionData.cc:3
lumi::LumiSectionData::nBunchCrossing
size_t nBunchCrossing() const
Definition: LumiSectionData.cc:8
lumi::LumiSectionData::setLumiQuality
void setLumiQuality(int lumiquality)
Definition: LumiSectionData.cc:44
lumi::LumiSectionData::qualityFlag
short qualityFlag() const
Definition: LumiSectionData.cc:39
lumi::LumiSectionData::deadFraction
float deadFraction() const
Definition: LumiSectionData.cc:11
lumi::LumiSectionData::trgBegin
TriggerIterator trgBegin() const
Definition: LumiSectionData.cc:37
lumi::LumiSectionData::HLThasData
bool HLThasData() const
Definition: LumiSectionData.cc:33
lumi::LumiSectionData::bunchCrossingEnd
BunchCrossingIterator bunchCrossingEnd(const LumiAlgoType lumialgotype) const
Definition: LumiSectionData.cc:29
lumi::BunchCrossingIterator
std::vector< BunchCrossingInfo >::const_iterator BunchCrossingIterator
Definition: LumiSectionData.h:65
lumi::LumiSectionData::setLumiNull
void setLumiNull()
Definition: LumiSectionData.cc:40
lumi::BXMAX
static const int BXMAX
Definition: LumiSectionData.h:22
lumi::LumiSectionData::setLumiSectionId
void setLumiSectionId(int sectionid)
Definition: LumiSectionData.cc:42
lumi::LumiSectionData::lumiError
float lumiError() const
Definition: LumiSectionData.cc:10
mps_fire.result
result
Definition: mps_fire.py:303
lumi::LumiSectionData::nHLTPath
size_t nHLTPath() const
Definition: LumiSectionData.cc:32
lumi::LumiSectionData::bunchCrossingInfo
void bunchCrossingInfo(const LumiAlgoType lumialgotype, std::vector< BunchCrossingInfo > &result) const
Definition: LumiSectionData.cc:14
lumi::LumiSectionData::m_bx
std::vector< BunchCrossingInfo > m_bx
Definition: LumiSectionData.h:123
LumiSectionData.h
lumi::LumiSectionData::setDeadFraction
void setDeadFraction(float deadfrac)
Definition: LumiSectionData.cc:45
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
lumi::HLTIterator
std::vector< HLTInfo >::const_iterator HLTIterator
Definition: LumiSectionData.h:66
lumi::LumiSectionData::setHLTData
void setHLTData(const std::vector< HLTInfo > &hltdetail)
Definition: LumiSectionData.cc:52
lumi::LumiSectionData::trgEnd
TriggerIterator trgEnd() const
Definition: LumiSectionData.cc:38
lumi::BXMIN
static const int BXMIN
Definition: LumiSectionData.h:21