test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DIPLumiDetail.cc
Go to the documentation of this file.
2 
3 #include <iomanip>
4 #include <ostream>
5 #include <iostream>
6 
7 DIPLumiDetail::DIPLumiDetail():m_runnum(0),m_ls(0),m_lumiValues(3564){
8 }
9 bool
11  if(m_runnum==0&&m_ls==0){
12  return true;
13  }
14  return false;
15 }
16 float
17 DIPLumiDetail::lumiValue(unsigned int bx) const {
18  return m_lumiValues[bx];
19 }
22  return ValueRange(m_lumiValues.begin(),m_lumiValues.end());
23 }
24 void
25 DIPLumiDetail::filldata(std::vector<float>& lumivalues){
26  lumivalues.swap(m_lumiValues);
27 }
28 void
29 DIPLumiDetail::fillbxdata(unsigned int bxidx,float bxvalue){
30  m_lumiValues[bxidx]=bxvalue;
31 }
32 unsigned int
34  return m_runnum;
35 }
36 unsigned int
38  return m_ls;
39 }
40 void
41 DIPLumiDetail::setOrigin(unsigned int runnumber,unsigned int ls){
43  m_ls=ls;
44 }
45 std::ostream& operator<<(std::ostream& s, DIPLumiDetail const& diplumiDetail) {
46  s << "\nDumping DIPLumiDetail\n";
47  std::cout.setf(std::ios::fixed,std::ios::floatfield);
48  std::cout.setf(std::ios::showpoint);
49  std::vector<float>::const_iterator lumivalueIt= diplumiDetail.lumiValues().first;
50  std::vector<float>::const_iterator lumivalueEnd = diplumiDetail.lumiValues().second;
51  for(unsigned int i=0; lumivalueIt!=lumivalueEnd;++lumivalueIt,++i){
52  s<<std::setw(10)<<" bunch = "<<i<<" bunchlumi = "<<*lumivalueIt << "\n";
53  }
54  s<<"\n";
55  return s;
56 }
int i
Definition: DBlmapReader.cc:9
float lumiValue(unsigned int bx) const
def ls
Definition: eostools.py:348
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
unsigned int m_ls
Definition: DIPLumiDetail.h:24
bool isNull() const
ValueRange lumiValues() const
unsigned int fromRun() const
std::pair< std::vector< float >::const_iterator, std::vector< float >::const_iterator > ValueRange
Definition: DIPLumiDetail.h:11
unsigned int fromLS() const
std::vector< float > m_lumiValues
Definition: DIPLumiDetail.h:25
DIPLumiDetail()
default constructor
Definition: DIPLumiDetail.cc:7
unsigned int m_runnum
Definition: DIPLumiDetail.h:23
void setOrigin(unsigned int runnumber, unsigned int ls)
void filldata(std::vector< float > &lumivalues)
tuple cout
Definition: gather_cfg.py:145
void fillbxdata(unsigned int bxidx, float bxlumi)