File indexing completed on 2024-04-06 12:26:37
0001 #include "RecoLuminosity/LumiProducer/interface/DIPLumiSummary.h"
0002
0003 #include <iomanip>
0004 #include <ostream>
0005 #include <iostream>
0006 bool DIPLumiSummary::isNull() const {
0007 if (m_runnum == 0 && m_ls == 0) {
0008 return true;
0009 }
0010 return false;
0011 }
0012 float DIPLumiSummary::instDelLumi() const { return m_instlumi; }
0013 float DIPLumiSummary::intgDelLumiByLS() const {
0014 if (m_dellumi <= 0.0) {
0015 return 0.0;
0016 }
0017 return m_dellumi;
0018 }
0019 float DIPLumiSummary::intgRecLumiByLS() const {
0020 if (m_reclumi <= 0.0) {
0021 return 0.0;
0022 }
0023 return m_reclumi;
0024 }
0025 float DIPLumiSummary::deadtimefraction() const { return m_deadfrac; }
0026 int DIPLumiSummary::cmsalive() const { return m_cmsalive; }
0027 unsigned int DIPLumiSummary::fromRun() const { return m_runnum; }
0028
0029
0030
0031 unsigned int DIPLumiSummary::fromLS() const { return m_ls; }
0032 void DIPLumiSummary::setOrigin(unsigned int runnumber, unsigned int ls) {
0033 m_runnum = runnumber;
0034 m_ls = ls;
0035 }
0036 void setOrigin(unsigned int runnumber, unsigned int ls);
0037 std::ostream& operator<<(std::ostream& s, const DIPLumiSummary& diplumiSummary) {
0038 std::cout.setf(std::ios::fixed, std::ios::floatfield);
0039 std::cout.setf(std::ios::showpoint);
0040 s << "\nDumping DIPLumiSummary (/ub)\n\n";
0041 s << std::setw(20) << "instDelLumi = " << std::setprecision(3) << diplumiSummary.instDelLumi();
0042 s << std::setw(20) << "intgDelLumiByLS = " << std::setprecision(3) << diplumiSummary.intgDelLumiByLS();
0043 s << std::setw(20) << "intgRecLumiByLS = " << std::setprecision(3) << diplumiSummary.intgRecLumiByLS();
0044 s << std::setw(20) << "deadtimefraction = " << std::setprecision(3) << diplumiSummary.deadtimefraction();
0045 s << std::setw(15) << "cmsalive = " << diplumiSummary.cmsalive();
0046 s << "\n";
0047 return s << "\n";
0048 }