CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/RecoLuminosity/LumiProducer/src/DIPLumiSummary.cc

Go to the documentation of this file.
00001 #include "RecoLuminosity/LumiProducer/interface/DIPLumiSummary.h"
00002 
00003 #include <iomanip>
00004 #include <ostream>
00005 #include <iostream>
00006 bool 
00007 DIPLumiSummary::isNull()const{
00008   if(m_runnum==0 && m_ls==0){
00009     return true;
00010   }
00011   return false;
00012 }
00013 float 
00014 DIPLumiSummary::instDelLumi() const{
00015   return m_instlumi;
00016 }
00017 float 
00018 DIPLumiSummary::intgDelLumiByLS()const{
00019   if(m_dellumi<=0.0){return 0.0;}
00020   return m_dellumi;
00021 }
00022 float 
00023 DIPLumiSummary::intgRecLumiByLS()const{
00024   if(m_reclumi<=0.0){return 0.0;}
00025   return m_reclumi;
00026 }
00027 float 
00028 DIPLumiSummary::deadtimefraction() const{
00029   if(m_reclumi>0.0){
00030     m_deadfrac=1.0-(m_reclumi/m_dellumi);
00031   }
00032   return m_deadfrac;
00033 }
00034 int 
00035 DIPLumiSummary::cmsalive()const{
00036   return m_cmsalive;
00037 }
00038 unsigned int 
00039 DIPLumiSummary::fromRun()const{
00040   return m_runnum;
00041 }
00045 unsigned int 
00046 DIPLumiSummary::fromLS()const{
00047   return m_ls;
00048 }
00049 void 
00050 DIPLumiSummary::setOrigin(unsigned int runnumber,unsigned int ls){
00051   m_runnum=runnumber;
00052   m_ls=ls;
00053 }
00054 void setOrigin(unsigned int runnumber,unsigned int ls);
00055 std::ostream& operator<<(std::ostream& s, const DIPLumiSummary& diplumiSummary) {
00056   std::cout.setf(std::ios::fixed,std::ios::floatfield);
00057   std::cout.setf(std::ios::showpoint);
00058   s << "\nDumping DIPLumiSummary (/ub)\n\n";
00059   s << std::setw(20) << "instDelLumi = " << std::setprecision(3) << diplumiSummary.instDelLumi();
00060   s << std::setw(20) << "intgDelLumiByLS = " << std::setprecision(3) << diplumiSummary.intgDelLumiByLS();
00061   s << std::setw(20) << "intgRecLumiByLS = " << std::setprecision(3) << diplumiSummary.intgRecLumiByLS();
00062   s << std::setw(20) << "deadtimefraction = " << std::setprecision(3) << diplumiSummary.deadtimefraction();
00063   s << std::setw(15) << "cmsalive = " << diplumiSummary.cmsalive();
00064   s << "\n";
00065   return s<<"\n";
00066 }