CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

boost::shared_ptr< SiStripQualityproduce (const SiStripQualityRcd &)
 
 SiStripQualityESProducer (const edm::ParameterSet &)
 
 ~SiStripQualityESProducer ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- 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 ()
 

Private Types

typedef std::vector
< edm::ParameterSet
Parameters
 

Private Attributes

edm::FileInPath fp_
 
bool MergeList_
 
edm::ParameterSet pset_
 
boost::shared_ptr< SiStripQualityquality
 
Parameters toGet
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 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 21 of file SiStripQualityESProducer.h.

Member Typedef Documentation

Definition at line 34 of file SiStripQualityESProducer.h.

Constructor & Destructor Documentation

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

Definition at line 26 of file SiStripQualityESProducer.cc.

References quality, and edm::ESProducer::setWhatProduced().

26  :
27  pset_(iConfig),
28  toGet(iConfig.getParameter<Parameters>("ListOfRecordToMerge"))
29 {
30 
31  setWhatProduced(this);
32 
33  edm::LogInfo("SiStripQualityESProducer") << "ctor" << std::endl;
34 
35  quality.reset(new SiStripQuality());
36 }
T getParameter(std::string const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
boost::shared_ptr< SiStripQuality > quality
std::vector< edm::ParameterSet > Parameters
Definition: HLTMuonBPAG.cc:49
SiStripQualityESProducer::~SiStripQualityESProducer ( )
inline

Definition at line 24 of file SiStripQualityESProducer.h.

24 {};

Member Function Documentation

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< class >::product(), pset_, quality, ecalTPGAnalyzer_cfg::recordName, corrections_cfg::tagName, and toGet.

Referenced by python.JSONExport.JsonExport::export(), and python.HTMLExport.HTMLExport::export().

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

Member Data Documentation

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.

edm::ParameterSet SiStripQualityESProducer::pset_
private

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().