#include <DQM/SiStripCommissioningClients/interface/VpspScanHistograms.h>
Public Member Functions | |
void | histoAnalysis (bool debug) |
void | printAnalyses () |
VpspScanHistograms (DQMStore *) | |
VpspScanHistograms (DQMOldReceiver *) | |
virtual | ~VpspScanHistograms () |
Definition at line 9 of file VpspScanHistograms.h.
VpspScanHistograms::VpspScanHistograms | ( | DQMOldReceiver * | mui | ) |
Definition at line 18 of file VpspScanHistograms.cc.
References CommissioningHistograms::factory_, LogTrace, and sistrip::mlDqmClient_.
00019 : CommissioningHistograms( mui, sistrip::VPSP_SCAN ) 00020 { 00021 factory_ = auto_ptr<VpspScanSummaryFactory>( new VpspScanSummaryFactory ); 00022 LogTrace(mlDqmClient_) 00023 << "[VpspScanHistograms::" << __func__ << "]" 00024 << " Constructing object..."; 00025 }
VpspScanHistograms::VpspScanHistograms | ( | DQMStore * | bei | ) |
Definition at line 29 of file VpspScanHistograms.cc.
References LogTrace, and sistrip::mlDqmClient_.
00030 : CommissioningHistograms( bei, sistrip::VPSP_SCAN ) 00031 { 00032 LogTrace(mlDqmClient_) 00033 << "[VpspScanHistograms::" << __func__ << "]" 00034 << " Constructing object..."; 00035 }
VpspScanHistograms::~VpspScanHistograms | ( | ) | [virtual] |
Definition at line 39 of file VpspScanHistograms.cc.
References LogTrace, and sistrip::mlDqmClient_.
00039 { 00040 LogTrace(mlDqmClient_) 00041 << "[VpspScanHistograms::" << __func__ << "]" 00042 << " Denstructing object..."; 00043 }
Reimplemented from CommissioningHistograms.
Definition at line 47 of file VpspScanHistograms.cc.
References CommissioningAlgorithm::analysis(), begin, count, CommissioningHistograms::data(), empty, lat::endl(), HLT_VtxMuL3::errors, extract(), CommissioningAnalysis::getErrorCodes(), CommissioningHistograms::histos(), VpspScanAnalysis::isValid(), iter, LogTrace, sistrip::mlDqmClient_, ss, and TrackValidation_HighPurity_cff::valid.
00047 { 00048 LogTrace(mlDqmClient_) 00049 << "[VpspScanHistograms::" << __func__ << "]"; 00050 00051 // Some initialisation 00052 uint16_t valid = 0; 00053 HistosMap::const_iterator iter; 00054 Analyses::iterator ianal; 00055 std::map<std::string,uint16_t> errors; 00056 00057 // Clear map holding analysis objects 00058 for ( ianal = data().begin(); ianal != data().end(); ianal++ ) { 00059 if ( ianal->second ) { delete ianal->second; } 00060 } 00061 data().clear(); 00062 00063 // Iterate through map containing histograms 00064 for ( iter = histos().begin(); 00065 iter != histos().end(); iter++ ) { 00066 00067 // Check vector of histos is not empty 00068 if ( iter->second.empty() ) { 00069 edm::LogWarning(mlDqmClient_) 00070 << "[VpspScanHistograms::" << __func__ << "]" 00071 << " Zero histograms found!" << endl; 00072 continue; 00073 } 00074 00075 // Retrieve pointers to profile histos for this FED channel 00076 std::vector<TH1*> profs; 00077 Histos::const_iterator ihis = iter->second.begin(); 00078 for ( ; ihis != iter->second.end(); ihis++ ) { 00079 TProfile* prof = ExtractTObject<TProfile>().extract( (*ihis)->me_ ); 00080 if ( prof ) { profs.push_back(prof); } 00081 } 00082 00083 // Perform histo analysis 00084 VpspScanAnalysis* anal = new VpspScanAnalysis( iter->first ); 00085 VpspScanAlgorithm algo( anal ); 00086 algo.analysis( profs ); 00087 data()[iter->first] = anal; 00088 if ( anal->isValid() ) { valid++; } 00089 if ( !anal->getErrorCodes().empty() ) { 00090 errors[anal->getErrorCodes()[0]]++; 00091 } 00092 00093 } 00094 00095 if ( !histos().empty() ) { 00096 edm::LogVerbatim(mlDqmClient_) 00097 << "[VpspScanHistograms::" << __func__ << "]" 00098 << " Analyzed histograms for " << histos().size() 00099 << " FED channels, of which " << valid 00100 << " (" << 100 * valid / histos().size() 00101 << "%) are valid."; 00102 if ( !errors.empty() ) { 00103 uint16_t count = 0; 00104 std::stringstream ss; 00105 ss << std::endl; 00106 std::map<std::string,uint16_t>::const_iterator ii; 00107 for ( ii = errors.begin(); ii != errors.end(); ++ii ) { 00108 ss << " " << ii->first << ": " << ii->second << std::endl; 00109 count += ii->second; 00110 } 00111 edm::LogWarning(mlDqmClient_) 00112 << "[VpspScanHistograms::" << __func__ << "]" 00113 << " Found " << count << " errors (" 00114 << 100 * count / histos().size() << "%): " 00115 << ss.str(); 00116 } 00117 } else { 00118 edm::LogWarning(mlDqmClient_) 00119 << "[VpspScanHistograms::" << __func__ << "]" 00120 << " No histograms to analyze!"; 00121 } 00122 00123 }
void VpspScanHistograms::printAnalyses | ( | ) | [virtual] |
Reimplemented from CommissioningHistograms.
Definition at line 127 of file VpspScanHistograms.cc.
References CommissioningHistograms::data(), LogTrace, sistrip::mlDqmClient_, and ss.
00127 { 00128 Analyses::iterator ianal = data().begin(); 00129 Analyses::iterator janal = data().end(); 00130 for ( ; ianal != janal; ++ianal ) { 00131 if ( ianal->second ) { 00132 std::stringstream ss; 00133 ianal->second->print( ss, 1 ); 00134 ianal->second->print( ss, 2 ); 00135 if ( ianal->second->isValid() ) { LogTrace(mlDqmClient_) << ss.str(); 00136 } else { edm::LogWarning(mlDqmClient_) << ss.str(); } 00137 } 00138 } 00139 }