CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Attributes
SiStripQualityESProducer Class Reference

#include <CalibTracker/SiStripESProducers/plugins/real/SiStripQualityESProducer.cc>

Inheritance diagram for SiStripQualityESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

std::unique_ptr< SiStripQualityproduce (const SiStripQualityRcd &)
 
 SiStripQualityESProducer (const edm::ParameterSet &)
 
 ~SiStripQualityESProducer () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Types

typedef std::vector< edm::ParameterSetParameters
 

Private Attributes

edm::FileInPath fp_
 
bool MergeList_
 
edm::ParameterSet pset_
 
Parameters toGet
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 20 of file SiStripQualityESProducer.h.

Member Typedef Documentation

Definition at line 33 of file SiStripQualityESProducer.h.

Constructor & Destructor Documentation

SiStripQualityESProducer::SiStripQualityESProducer ( const edm::ParameterSet iConfig)

Definition at line 25 of file SiStripQualityESProducer.cc.

References edm::ESProducer::setWhatProduced().

25  :
26  pset_(iConfig),
27  toGet(iConfig.getParameter<Parameters>("ListOfRecordToMerge"))
28 {
29 
30  setWhatProduced(this);
31 
32  edm::LogInfo("SiStripQualityESProducer") << "ctor" << std::endl;
33 
34 }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
vector< ParameterSet > Parameters
SiStripQualityESProducer::~SiStripQualityESProducer ( )
inlineoverride

Definition at line 23 of file SiStripQualityESProducer.h.

References produce().

23 {};

Member Function Documentation

std::unique_ptr< SiStripQuality > SiStripQualityESProducer::produce ( const SiStripQualityRcd iRecord)

Definition at line 37 of file SiStripQualityESProducer.cc.

References edm::ParameterSet::getParameter(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), hgcalPlots::obj, edm::ESHandle< T >::product(), pset_, jets_cff::quality, align_cfg::recordName, AlCaHLTBitMon_QueryRunRegistry::string, JetPlusTrackCorrections_cff::tagName, and toGet.

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), HTMLExport.HTMLExportStatic::export(), and ~SiStripQualityESProducer().

38 {
39  auto quality = std::make_unique<SiStripQuality>();
40  edm::LogInfo("SiStripQualityESProducer") << "produce called" << std::endl;
41 
42  quality->clear();
43 
47  edm::ESHandle<RunInfo> runInfo;
48 
51 
52  bool doRunInfo = false;
53  std::string runInfoTagName = "";
54 
55  // Set the debug output level
56  quality->setPrintDebugOutput( pset_.getParameter<bool>("PrintDebugOutput") );
57  // Set the protection against empty RunInfo objects
58  quality->setUseEmptyRunInfo( pset_.getParameter<bool>("UseEmptyRunInfo") );
59 
60  for( Parameters::iterator itToGet = toGet.begin(); itToGet != toGet.end(); ++itToGet ) {
61  tagName = itToGet->getParameter<std::string>("tag");
62  recordName = itToGet->getParameter<std::string>("record");
63 
64  edm::LogInfo("SiStripQualityESProducer") << "[SiStripQualityESProducer::produce] Getting data from record " << recordName << " with tag " << tagName << std::endl;
65 
66  if (recordName=="SiStripBadModuleRcd"){
67  iRecord.getRecord<SiStripBadModuleRcd>().get(tagName,obj);
68  quality->add( obj.product() );
69  } else if (recordName=="SiStripBadModuleFedErrRcd"){
70  iRecord.getRecord<SiStripBadModuleFedErrRcd>().get(tagName,obj);
71  quality->add( obj.product() );
72  } else if (recordName=="SiStripBadFiberRcd"){
73  iRecord.getRecord<SiStripBadFiberRcd>().get(tagName,obj);
74  quality->add( obj.product() );
75  } else if (recordName=="SiStripBadChannelRcd"){
76  iRecord.getRecord<SiStripBadChannelRcd>().get(tagName,obj);
77  quality->add( obj.product() );
78  } else if (recordName=="SiStripBadStripRcd"){
79  iRecord.getRecord<SiStripBadStripRcd>().get(tagName,obj);
80  quality->add( obj.product() );
81  } else if (recordName=="SiStripDetCablingRcd"){
82  iRecord.getRecord<SiStripDetCablingRcd>().get(tagName,cabling);
83  quality->add( cabling.product() );
84  } else if (recordName=="SiStripDetVOffRcd"){
85  iRecord.getRecord<SiStripDetVOffRcd>().get(tagName,Voff);
86  quality->add( Voff.product() );
87  } else if (recordName=="RunInfoRcd") {
88  runInfoTagName = tagName;
89  doRunInfo = true;
90  } else {
91  edm::LogError("SiStripQualityESProducer") << "[SiStripQualityESProducer::produce] Skipping the requested data for unexisting record " << recordName << " with tag " << tagName << std::endl;
92  continue;
93  }
94  }
95  // We do this after all the others so we know it is done after the DetCabling (if any)
96  if( doRunInfo ) {
97  iRecord.getRecord<RunInfoRcd>().get(runInfoTagName,runInfo);
98  quality->add( runInfo.product() );
99  }
100 
101  quality->cleanUp();
102 
103  if(pset_.getParameter<bool>("ReduceGranularity")){
104  quality->ReduceGranularity(pset_.getParameter<double>("ThresholdForReducedGranularity"));
105  quality->cleanUp(true);
106  }
107 
108  quality->fillBadComponents();
109 
110  return quality;
111 }
T getParameter(std::string const &) const
T const * product() const
Definition: ESHandle.h:86

Member Data Documentation

edm::FileInPath SiStripQualityESProducer::fp_
private

Definition at line 30 of file SiStripQualityESProducer.h.

bool SiStripQualityESProducer::MergeList_
private

Definition at line 31 of file SiStripQualityESProducer.h.

edm::ParameterSet SiStripQualityESProducer::pset_
private

Definition at line 29 of file SiStripQualityESProducer.h.

Referenced by produce().

Parameters SiStripQualityESProducer::toGet
private

Definition at line 34 of file SiStripQualityESProducer.h.

Referenced by produce().