#include <CalibTracker/SiStripESProducers/plugins/real/SiStripQualityESProducer.cc>
Public Member Functions | |
boost::shared_ptr< SiStripQuality > | produce (const SiStripQualityRcd &) |
SiStripQualityESProducer (const edm::ParameterSet &) | |
~SiStripQualityESProducer () | |
Private Types | |
typedef std::vector < edm::ParameterSet > | Parameters |
Private Attributes | |
edm::FileInPath | fp_ |
bool | MergeList_ |
edm::ParameterSet | pset_ |
boost::shared_ptr< SiStripQuality > | quality |
Parameters | toGet |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 21 of file SiStripQualityESProducer.h.
typedef std::vector< edm::ParameterSet > SiStripQualityESProducer::Parameters [private] |
Definition at line 34 of file SiStripQualityESProducer.h.
SiStripQualityESProducer::SiStripQualityESProducer | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 26 of file SiStripQualityESProducer.cc.
References quality, edm::ESProducer::setWhatProduced(), and AlCaHarvesting_cff::SiStripQuality.
: pset_(iConfig), toGet(iConfig.getParameter<Parameters>("ListOfRecordToMerge")) { setWhatProduced(this); edm::LogInfo("SiStripQualityESProducer") << "ctor" << std::endl; quality.reset(new SiStripQuality()); }
SiStripQualityESProducer::~SiStripQualityESProducer | ( | ) | [inline] |
Definition at line 24 of file SiStripQualityESProducer.h.
{};
boost::shared_ptr< SiStripQuality > SiStripQualityESProducer::produce | ( | const SiStripQualityRcd & | iRecord | ) |
Definition at line 39 of file SiStripQualityESProducer.cc.
References edm::ParameterSet::getParameter(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), VarParsing::obj, edm::ESHandle< T >::product(), pset_, quality, ecalTPGAnalyzer_cfg::recordName, corrections_cfg::tagName, and toGet.
{ edm::LogInfo("SiStripQualityESProducer") << "produce called" << std::endl; quality->clear(); edm::ESHandle<SiStripBadStrip> obj; edm::ESHandle<SiStripDetCabling> cabling; edm::ESHandle<SiStripDetVOff> Voff; edm::ESHandle<RunInfo> runInfo; std::string tagName; std::string recordName; bool doRunInfo = false; std::string runInfoTagName = ""; // Set the debug output level quality->setPrintDebugOutput( pset_.getParameter<bool>("PrintDebugOutput") ); // Set the protection against empty RunInfo objects quality->setUseEmptyRunInfo( pset_.getParameter<bool>("UseEmptyRunInfo") ); for( Parameters::iterator itToGet = toGet.begin(); itToGet != toGet.end(); ++itToGet ) { tagName = itToGet->getParameter<std::string>("tag"); recordName = itToGet->getParameter<std::string>("record"); edm::LogInfo("SiStripQualityESProducer") << "[SiStripQualityESProducer::produce] Getting data from record " << recordName << " with tag " << tagName << std::endl; if (recordName=="SiStripBadModuleRcd"){ iRecord.getRecord<SiStripBadModuleRcd>().get(tagName,obj); quality->add( obj.product() ); } else if (recordName=="SiStripBadFiberRcd"){ iRecord.getRecord<SiStripBadFiberRcd>().get(tagName,obj); quality->add( obj.product() ); } else if (recordName=="SiStripBadChannelRcd"){ iRecord.getRecord<SiStripBadChannelRcd>().get(tagName,obj); quality->add( obj.product() ); } else if (recordName=="SiStripBadStripRcd"){ iRecord.getRecord<SiStripBadStripRcd>().get(tagName,obj); quality->add( obj.product() ); } else if (recordName=="SiStripDetCablingRcd"){ iRecord.getRecord<SiStripDetCablingRcd>().get(tagName,cabling); quality->add( cabling.product() ); } else if (recordName=="SiStripDetVOffRcd"){ iRecord.getRecord<SiStripDetVOffRcd>().get(tagName,Voff); quality->add( Voff.product() ); } else if (recordName=="RunInfoRcd") { runInfoTagName = tagName; doRunInfo = true; } else { edm::LogError("SiStripQualityESProducer") << "[SiStripQualityESProducer::produce] Skipping the requested data for unexisting record " << recordName << " with tag " << tagName << std::endl; continue; } } // We do this after all the others so we know it is done after the DetCabling (if any) if( doRunInfo ) { iRecord.getRecord<RunInfoRcd>().get(runInfoTagName,runInfo); quality->add( runInfo.product() ); } quality->cleanUp(); if(pset_.getParameter<bool>("ReduceGranularity")){ quality->ReduceGranularity(pset_.getParameter<double>("ThresholdForReducedGranularity")); quality->cleanUp(true); } quality->fillBadComponents(); return quality; }
edm::FileInPath SiStripQualityESProducer::fp_ [private] |
Definition at line 31 of file SiStripQualityESProducer.h.
bool SiStripQualityESProducer::MergeList_ [private] |
Definition at line 32 of file SiStripQualityESProducer.h.
Definition at line 30 of file SiStripQualityESProducer.h.
Referenced by produce().
boost::shared_ptr<SiStripQuality> SiStripQualityESProducer::quality [private] |
Definition at line 37 of file SiStripQualityESProducer.h.
Referenced by produce(), and SiStripQualityESProducer().
Parameters SiStripQualityESProducer::toGet [private] |
Definition at line 35 of file SiStripQualityESProducer.h.
Referenced by produce().