#include "DataFormats/Luminosity/interface/LumiDetails.h"
#include <iomanip>
Go to the source code of this file.
Functions | |
std::ostream & | operator<< (std::ostream &s, const LumiDetails &lumiDetails) |
std::ostream& operator<< | ( | std::ostream & | s, | |
const LumiDetails & | lumiDetails | |||
) |
Definition at line 20 of file LumiDetails.cc.
References i, LumiDetails::lumiEtSum(), LumiDetails::lumiEtSumErr(), LumiDetails::lumiEtSumQual(), LumiDetails::lumiOcc(), LumiDetails::lumiOccErr(), LumiDetails::lumiOccQual(), and python::StorageManager_cfg::maxSize.
00020 { 00021 00022 const std::vector<float>& lumietsum = lumiDetails.lumiEtSum(); 00023 const std::vector<float>& lumietsumerr = lumiDetails.lumiEtSumErr(); 00024 const std::vector<int>& lumietsumqual = lumiDetails.lumiEtSumQual(); 00025 const std::vector<float>& lumiocc = lumiDetails.lumiOcc(); 00026 const std::vector<float>& lumioccerr = lumiDetails.lumiOccErr(); 00027 const std::vector<int>& lumioccqual = lumiDetails.lumiOccQual(); 00028 00029 unsigned int maxSize = lumietsum.size(); 00030 if (lumietsumerr.size() > maxSize) maxSize = lumietsumerr.size(); 00031 if (lumietsumqual.size() > maxSize) maxSize = lumietsumqual.size(); 00032 if (lumiocc.size() > maxSize) maxSize = lumiocc.size(); 00033 if (lumioccerr.size() > maxSize) maxSize = lumioccerr.size(); 00034 if (lumioccqual.size() > maxSize) maxSize = lumioccqual.size(); 00035 00036 s << "\nDumping LumiDetails\n"; 00037 s << setw(12) << "etsum"; 00038 s << setw(12) << "etsumerr"; 00039 s << setw(12) << "etsumqual"; 00040 s << setw(12) << "occ"; 00041 s << setw(12) << "occerr"; 00042 s << setw(12) << "occqual"; 00043 s << "\n"; 00044 00045 for (unsigned int i = 0; i < maxSize; ++i) { 00046 00047 s << setw(12); 00048 i < lumietsum.size() ? s << lumietsum[i] : s << " "; 00049 00050 s << setw(12); 00051 i < lumietsumerr.size() ? s << lumietsumerr[i] : s << " "; 00052 00053 s << setw(12); 00054 i < lumietsumqual.size() ? s << lumietsumqual[i] : s << " "; 00055 00056 s << setw(12); 00057 i < lumiocc.size() ? s << lumiocc[i] : s << " "; 00058 00059 s << setw(12); 00060 i < lumioccerr.size() ? s << lumioccerr[i] : s << " "; 00061 00062 s << setw(12); 00063 i < lumioccqual.size() ? s << lumioccqual[i] : s << " "; 00064 00065 s << "\n"; 00066 } 00067 return s << "\n"; 00068 }