#include <SamplingHistograms.h>
Public Member Functions | |
virtual void | configure (const edm::ParameterSet &, const edm::EventSetup &) |
void | histoAnalysis (bool debug) |
SamplingHistograms (const edm::ParameterSet &pset, DQMStore *, const sistrip::RunType &task=sistrip::APV_LATENCY) | |
virtual | ~SamplingHistograms () |
Private Attributes | |
int | latencyCode_ |
float | sOnCut_ |
Definition at line 10 of file SamplingHistograms.h.
SamplingHistograms::SamplingHistograms | ( | const edm::ParameterSet & | pset, |
DQMStore * | bei, | ||
const sistrip::RunType & | task = sistrip::APV_LATENCY |
||
) |
Definition at line 19 of file SamplingHistograms.cc.
References sistrip::collate_, CommissioningHistograms::factory_, DQMStore::get(), MonitorElement::getIntValue(), latencyCode_, LogTrace, sistrip::mlDqmClient_, and sistrip::root_.
: CommissioningHistograms( pset.getParameter<edm::ParameterSet>("SamplingParameters"), bei, task ), sOnCut_(3) { LogTrace(mlDqmClient_) << "[SamplingHistograms::" << __func__ << "]" << " Constructing object..."; factory_ = auto_ptr<SamplingSummaryFactory>( new SamplingSummaryFactory ); // retreive the latency code from the root file std::string dataPath = std::string(sistrip::collate_) + "/" + sistrip::root_ + "/latencyCode"; MonitorElement* codeElement = bei->get(dataPath); if(codeElement) latencyCode_ = codeElement->getIntValue() ; else latencyCode_ = 0; }
SamplingHistograms::~SamplingHistograms | ( | ) | [virtual] |
Definition at line 40 of file SamplingHistograms.cc.
References LogTrace, and sistrip::mlDqmClient_.
{ LogTrace(mlDqmClient_) << "[SamplingHistograms::" << __func__ << "]" << " Deleting object..."; }
void SamplingHistograms::configure | ( | const edm::ParameterSet & | pset, |
const edm::EventSetup & | |||
) | [virtual] |
Reimplemented from CommissioningHistograms.
Reimplemented in FineDelayHistosUsingDb, and LatencyHistosUsingDb.
Definition at line 87 of file SamplingHistograms.cc.
References sOnCut_.
{ //TODO: should use the parameter set. Why is this crashing ??? // sOnCut_ = pset.getParameter<double>("SignalToNoiseCut"); sOnCut_ = 3.; }
void SamplingHistograms::histoAnalysis | ( | bool | debug | ) | [virtual] |
Reimplemented from CommissioningHistograms.
Definition at line 48 of file SamplingHistograms.cc.
References CommissioningAlgorithm::analysis(), begin, CommissioningHistograms::data(), extract(), CommissioningHistograms::histos(), latencyCode_, sistrip::mlDqmClient_, CommissioningHistograms::pset(), SamplingAnalysis::setSoNcut(), and sOnCut_.
{ // Clear map holding analysis objects Analyses::iterator ianal; for ( ianal = data().begin(); ianal != data().end(); ianal++ ) { if ( ianal->second ) { delete ianal->second; } } data().clear(); // Iterate through map containing vectors of profile histograms HistosMap::const_iterator iter = histos().begin(); for ( ; iter != histos().end(); iter++ ) { // Check vector of histos is not empty (should be 1 histo) if ( iter->second.empty() ) { edm::LogWarning(mlDqmClient_) << "[SamplingHistograms::" << __func__ << "]" << " Zero collation histograms found!"; continue; } // Retrieve pointers to profile histos for this FED channel vector<TH1*> profs; Histos::const_iterator ihis = iter->second.begin(); for ( ; ihis != iter->second.end(); ihis++ ) { TProfile* prof = ExtractTObject<TProfile>().extract( (*ihis)->me_ ); if ( prof ) { profs.push_back(prof); } } // Perform histo analysis SamplingAnalysis* anal = new SamplingAnalysis( iter->first ); anal->setSoNcut(sOnCut_); SamplingAlgorithm algo( this->pset(), anal, latencyCode_ ); algo.analysis( profs ); data()[iter->first] = anal; } }
int SamplingHistograms::latencyCode_ [private] |
Definition at line 25 of file SamplingHistograms.h.
Referenced by histoAnalysis(), and SamplingHistograms().
float SamplingHistograms::sOnCut_ [private] |
Definition at line 23 of file SamplingHistograms.h.
Referenced by configure(), and histoAnalysis().