CMS 3D CMS Logo

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 bool DIPLumiDetail::isNull() const {
9  if (m_runnum == 0 && m_ls == 0) {
10  return true;
11  }
12  return false;
13 }
14 float DIPLumiDetail::lumiValue(unsigned int bx) const { return m_lumiValues[bx]; }
16  return ValueRange(m_lumiValues.begin(), m_lumiValues.end());
17 }
18 void DIPLumiDetail::filldata(std::vector<float>& lumivalues) { lumivalues.swap(m_lumiValues); }
19 void DIPLumiDetail::fillbxdata(unsigned int bxidx, float bxvalue) { m_lumiValues[bxidx] = bxvalue; }
20 unsigned int DIPLumiDetail::fromRun() const { return m_runnum; }
21 unsigned int DIPLumiDetail::fromLS() const { return m_ls; }
22 void DIPLumiDetail::setOrigin(unsigned int runnumber, unsigned int ls) {
24  m_ls = ls;
25 }
26 std::ostream& operator<<(std::ostream& s, DIPLumiDetail const& diplumiDetail) {
27  s << "\nDumping DIPLumiDetail\n";
28  std::cout.setf(std::ios::fixed, std::ios::floatfield);
29  std::cout.setf(std::ios::showpoint);
30  std::vector<float>::const_iterator lumivalueIt = diplumiDetail.lumiValues().first;
31  std::vector<float>::const_iterator lumivalueEnd = diplumiDetail.lumiValues().second;
32  for (unsigned int i = 0; lumivalueIt != lumivalueEnd; ++lumivalueIt, ++i) {
33  s << std::setw(10) << " bunch = " << i << " bunchlumi = " << *lumivalueIt << "\n";
34  }
35  s << "\n";
36  return s;
37 }
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
mps_fire.i
i
Definition: mps_fire.py:355
DIPLumiDetail::fromLS
unsigned int fromLS() const
Definition: DIPLumiDetail.cc:21
DIPLumiDetail::lumiValue
float lumiValue(unsigned int bx) const
Definition: DIPLumiDetail.cc:14
gather_cfg.cout
cout
Definition: gather_cfg.py:144
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
DIPLumiDetail::fillbxdata
void fillbxdata(unsigned int bxidx, float bxlumi)
Definition: DIPLumiDetail.cc:19
DIPLumiDetail::m_ls
unsigned int m_ls
Definition: DIPLumiDetail.h:25
alignCSCRings.s
s
Definition: alignCSCRings.py:92
DIPLumiDetail::ValueRange
std::pair< std::vector< float >::const_iterator, std::vector< float >::const_iterator > ValueRange
Definition: DIPLumiDetail.h:11
cond::runnumber
Definition: Time.h:19
DIPLumiDetail::setOrigin
void setOrigin(unsigned int runnumber, unsigned int ls)
Definition: DIPLumiDetail.cc:22
DIPLumiDetail::lumiValues
ValueRange lumiValues() const
Definition: DIPLumiDetail.cc:15
DIPLumiDetail::fromRun
unsigned int fromRun() const
Definition: DIPLumiDetail.cc:20
DIPLumiDetail::isNull
bool isNull() const
Definition: DIPLumiDetail.cc:8
DIPLumiDetail
Definition: DIPLumiDetail.h:7
DIPLumiDetail::m_runnum
unsigned int m_runnum
Definition: DIPLumiDetail.h:24
DIPLumiDetail.h
operator<<
std::ostream & operator<<(std::ostream &s, DIPLumiDetail const &diplumiDetail)
Definition: DIPLumiDetail.cc:26
DIPLumiDetail::DIPLumiDetail
DIPLumiDetail()
default constructor
Definition: DIPLumiDetail.cc:7
DIPLumiDetail::filldata
void filldata(std::vector< float > &lumivalues)
Definition: DIPLumiDetail.cc:18
DIPLumiDetail::m_lumiValues
std::vector< float > m_lumiValues
Definition: DIPLumiDetail.h:26