CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LumiSectionData.cc
Go to the documentation of this file.
2 #include <iostream>
3 lumi::LumiSectionData::LumiSectionData(): m_sectionid(0),m_versionid("-1"){
5 }
8  return m_versionid;
9 }
10 int
12  return m_sectionid;
13 }
14 size_t
16  return m_bx.size()/lumi::LUMIALGOMAX;
17 }
18 float
20  return m_lumiavg;
21 }
22 float
24  return m_lumierror;
25 }
26 float
28  return m_deadfrac;
29 }
30 unsigned long long
32  return m_startorbit;
33 }
34 int
36  return m_quality;
37 }
38 void
39 lumi::LumiSectionData::bunchCrossingInfo( const lumi::LumiAlgoType lumialgotype,std::vector<lumi::BunchCrossingInfo>& result )const {
40  result.clear();
41  size_t offset=lumialgotype*lumi::BXMAX;
42  std::copy(m_bx.begin()+offset,m_bx.begin()+offset+lumi::BXMAX,std::back_inserter(result));
43 }
44 
47  const LumiAlgoType lumialgotype )const{
48  int realIdx=BXIndex-lumi::BXMIN+lumialgotype*lumi::BXMAX;
49  return m_bx.at(realIdx);
50 }
53  return m_bx.begin()+lumialgotype*BXMAX;
54 }
57  return m_bx.end()-(lumi::BXMAX)*lumialgotype;
58 }
59 size_t
61  return m_hlt.size();
62 }
63 bool
65  return m_hlt.size()>0;
66 }
69  return m_hlt.begin();
70 }
73  return m_hlt.end();
74 }
75 bool
77  return m_trigger.size()>0;
78 }
81  return m_trigger.begin();
82 }
85  return m_trigger.end();
86 }
87 short
89  return m_quality;
90 }
91 void
93  m_versionid=-99;
94 }
95 void
97  m_versionid=versionid;
98 }
99 void
101  m_sectionid=sectionid;
102 }
103 void
105  m_lumiavg=avg;
106 }
107 void
109  m_quality=lumiquality;
110 }
111 void
113  m_deadfrac=deadfrac;
114 }
115 void
117  m_lumierror=lumierr;
118 }
119 void
120 lumi::LumiSectionData::setStartOrbit(unsigned long long orbtnumber){
121  m_startorbit=orbtnumber;
122 }
123 void
124 lumi::LumiSectionData::setBunchCrossingData(const std::vector<BunchCrossingInfo>& BXs,const LumiAlgoType algotype){
125  std::copy(BXs.begin(),BXs.begin()+lumi::BXMAX,std::back_inserter(m_bx));
126 }
127 void
128 lumi::LumiSectionData::setHLTData(const std::vector<HLTInfo>& hltdetail){
129  std::copy(hltdetail.begin(),hltdetail.end(),std::back_inserter(m_hlt));
130 }
131 void
132 lumi::LumiSectionData::setTriggerData(const std::vector<TriggerInfo>& triggerinfo){
133  std::copy(triggerinfo.begin(),triggerinfo.end(),std::back_inserter(m_trigger));
134 }
135 void
137  m_quality=qualityflag;
138 }
139 void
140 lumi::LumiSectionData::print( std::ostream& s ) const{
141  s<<"lumi section id :"<<m_sectionid <<", ";
142  s<<"lumi data version : "<<m_versionid<<", ";
143  s<<"lumi average : "<<m_lumiavg<<", ";
144  s<<"lumi error : "<<m_lumierror<<", ";
145  s<<"lumi quality : "<<m_quality<<", ";
146  s<<"lumi deadfrac : "<<m_deadfrac<<std::endl;
147  std::vector<lumi::TriggerInfo>::const_iterator trgit;
148  std::vector<lumi::TriggerInfo>::const_iterator trgitBeg=m_trigger.begin();
149  std::vector<lumi::TriggerInfo>::const_iterator trgitEnd=m_trigger.end();
150  unsigned int i=0;
151  for(trgit=trgitBeg;trgit!=trgitEnd;++trgit){
152  std::cout<<" trg "<<i<<" : name : "<<trgit->name<<" : count : "<<trgit->triggercount<<" : deadtime : "<< trgit->deadtimecount<<" : prescale : "<<trgit->prescale<<std::endl;
153  ++i;
154  }
155 }
std::vector< TriggerInfo >::const_iterator TriggerIterator
int i
Definition: DBlmapReader.cc:9
void setLumiQuality(int lumiquality)
unsigned long long startorbit() const
void setLumiAverage(float lumiavg)
std::vector< BunchCrossingInfo >::const_iterator BunchCrossingIterator
TriggerIterator trgEnd() const
void setBunchCrossingData(const std::vector< BunchCrossingInfo > &BXs, const LumiAlgoType algotype)
void setQualityFlag(short qualityflag)
std::string lumiVersion() const
float lumiAverage() const
BunchCrossingIterator bunchCrossingEnd(const LumiAlgoType lumialgotype) const
HLTIterator hltEnd() const
size_t nHLTPath() const
HLTIterator hltBegin() const
float lumiError() const
tuple result
Definition: query.py:137
float deadFraction() const
bool HLThasData() const
void bunchCrossingInfo(const LumiAlgoType lumialgotype, std::vector< BunchCrossingInfo > &result) const
static const int LUMIALGOMAX
TriggerIterator trgBegin() const
void setStartOrbit(unsigned long long orbtnumber)
unsigned int offset(bool)
size_t nBunchCrossing() const
std::vector< BunchCrossingInfo > m_bx
std::vector< HLTInfo >::const_iterator HLTIterator
short qualityFlag() const
void setTriggerData(const std::vector< TriggerInfo > &triggerinfo)
bool TriggerhasData() const
static const int BXMAX
void print(std::ostream &s) const
void setLumiSectionId(int sectionid)
void setLumiError(float lumierr)
int lumisectionID() const
BunchCrossingIterator bunchCrossingBegin(const LumiAlgoType lumialgotype) const
void setHLTData(const std::vector< HLTInfo > &hltdetail)
tuple cout
Definition: gather_cfg.py:121
void setLumiVersion(const std::string &versionid)
static const int BXMIN
void setDeadFraction(float deadfrac)