![]() |
![]() |
#include <DQM/SiStripCommissioningClients/interface/FedCablingHistograms.h>
Public Types | |
typedef std::map< uint32_t, FedCablingAnalysis * > | Analyses |
typedef SummaryPlotFactory < FedCablingAnalysis * > | Factory |
Public Member Functions | |
void | createSummaryHisto (const sistrip::Monitorable &, const sistrip::Presentation &, const std::string &top_level_dir, const sistrip::Granularity &) |
FedCablingHistograms (DQMStore *) | |
FedCablingHistograms (DQMOldReceiver *) | |
void | histoAnalysis (bool debug) |
void | printAnalyses () |
virtual | ~FedCablingHistograms () |
Protected Attributes | |
Analyses | data_ |
std::auto_ptr< Factory > | factory_ |
Definition at line 11 of file FedCablingHistograms.h.
typedef std::map<uint32_t,FedCablingAnalysis*> FedCablingHistograms::Analyses |
FedCablingHistograms::FedCablingHistograms | ( | DQMOldReceiver * | mui | ) |
Definition at line 19 of file FedCablingHistograms.cc.
References LogTrace, and sistrip::mlDqmClient_.
00020 : CommissioningHistograms( mui, sistrip::FED_CABLING ), 00021 factory_( new Factory ) 00022 { 00023 LogTrace(mlDqmClient_) 00024 << "[FedCablingHistograms::" << __func__ << "]" 00025 << " Constructing object..."; 00026 }
FedCablingHistograms::FedCablingHistograms | ( | DQMStore * | bei | ) |
Definition at line 30 of file FedCablingHistograms.cc.
References LogTrace, and sistrip::mlDqmClient_.
00031 : CommissioningHistograms( bei, sistrip::FED_CABLING ), 00032 factory_( new Factory ) 00033 { 00034 LogTrace(mlDqmClient_) 00035 << "[FedCablingHistograms::" << __func__ << "]" 00036 << " Constructing object..."; 00037 }
FedCablingHistograms::~FedCablingHistograms | ( | ) | [virtual] |
Definition at line 41 of file FedCablingHistograms.cc.
References LogTrace, and sistrip::mlDqmClient_.
00041 { 00042 LogTrace(mlDqmClient_) 00043 << "[FedCablingHistograms::" << __func__ << "]" 00044 << " Destructing object..."; 00045 }
void FedCablingHistograms::createSummaryHisto | ( | const sistrip::Monitorable & | histo, | |
const sistrip::Presentation & | type, | |||
const std::string & | top_level_dir, | |||
const sistrip::Granularity & | gran | |||
) | [virtual] |
Reimplemented from CommissioningHistograms.
Definition at line 124 of file FedCablingHistograms.cc.
References data_, factory_, histoAnalysis(), CommissioningHistograms::histogram(), LogTrace, sistrip::mlDqmClient_, summary, sistrip::UNKNOWN_VIEW, and SiStripEnumsAndStrings::view().
00127 { 00128 LogTrace(mlDqmClient_) 00129 << "[FedCablingHistograms::" << __func__ << "]"; 00130 00131 // Check view 00132 sistrip::View view = SiStripEnumsAndStrings::view(dir); 00133 if ( view == sistrip::UNKNOWN_VIEW ) { return; } 00134 00135 // Analyze histograms if not done already 00136 if ( data_.empty() ) { histoAnalysis( false ); } 00137 00138 // Extract data to be histogrammed 00139 uint32_t xbins = factory_->init( histo, type, view, dir, gran, data_ ); 00140 00141 // Create summary histogram (if it doesn't already exist) 00142 TH1* summary = histogram( histo, type, view, dir, xbins ); 00143 00144 // Fill histogram with data 00145 factory_->fill( *summary ); 00146 00147 }
Reimplemented from CommissioningHistograms.
Definition at line 49 of file FedCablingHistograms.cc.
References CommissioningAlgorithm::analysis(), begin, data_, extract(), CommissioningHistograms::histos(), FedCablingAnalysis::isValid(), iter, LogTrace, sistrip::mlDqmClient_, and TrackValidation_HighPurity_cff::valid.
Referenced by createSummaryHisto().
00049 { 00050 LogTrace(mlDqmClient_) 00051 << "[FedCablingHistograms::" << __func__ << "]"; 00052 00053 uint16_t valid = 0; 00054 HistosMap::const_iterator iter; 00055 Analyses::iterator ianal; 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 << "[FedCablingHistograms::" << __func__ << "]" 00071 << " Zero histograms found!"; 00072 continue; 00073 } 00074 00075 // Retrieve pointers to histos 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 FedCablingAnalysis* anal = new FedCablingAnalysis( iter->first ); 00085 FedCablingAlgorithm algo( anal ); 00086 algo.analysis( profs ); 00087 data_[iter->first] = anal; 00088 if ( anal->isValid() ) { valid++; } 00089 00090 } 00091 00092 if ( !histos().empty() ) { 00093 edm::LogVerbatim(mlDqmClient_) 00094 << "[FedCablingHistograms::" << __func__ << "]" 00095 << " Analyzed histograms for " << histos().size() 00096 << " FED channels, of which " << valid 00097 << " (" << 100 * valid / histos().size() 00098 << "%) are valid."; 00099 } else { 00100 edm::LogWarning(mlDqmClient_) 00101 << "[FedCablingHistograms::" << __func__ << "]" 00102 << " No histograms to analyze!"; 00103 } 00104 00105 }
void FedCablingHistograms::printAnalyses | ( | ) | [virtual] |
Reimplemented from CommissioningHistograms.
Definition at line 109 of file FedCablingHistograms.cc.
References data_, LogTrace, sistrip::mlDqmClient_, and ss.
00109 { 00110 Analyses::iterator ianal = data_.begin(); 00111 Analyses::iterator janal = data_.end(); 00112 for ( ; ianal != janal; ++ianal ) { 00113 if ( ianal->second ) { 00114 std::stringstream ss; 00115 ianal->second->print( ss ); 00116 if ( ianal->second->isValid() ) { LogTrace(mlDqmClient_) << ss.str(); 00117 } else { edm::LogWarning(mlDqmClient_) << ss.str(); } 00118 } 00119 } 00120 }
Analyses FedCablingHistograms::data_ [protected] |
Reimplemented from CommissioningHistograms.
Definition at line 36 of file FedCablingHistograms.h.
Referenced by createSummaryHisto(), histoAnalysis(), and printAnalyses().
std::auto_ptr<Factory> FedCablingHistograms::factory_ [protected] |
Reimplemented from CommissioningHistograms.
Definition at line 38 of file FedCablingHistograms.h.
Referenced by createSummaryHisto().