CMS 3D CMS Logo

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

#include <CalibTracker/SiPixelESProducer/src/SiPixelQualityESProducer.cc>

Inheritance diagram for SiPixelQualityESProducer:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

std::unique_ptr< SiPixelQualityproduce (const SiPixelQualityRcd &iRecord)
 
std::unique_ptr< SiPixelQualityproduceWithLabel (const SiPixelQualityRcd &iRecord)
 
 SiPixelQualityESProducer (const edm::ParameterSet &iConfig)
 
 ~SiPixelQualityESProducer () 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)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Protected Member Functions

void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
 
- 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 &)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Private Types

typedef std::vector< edm::ParameterSetParameters
 

Private Member Functions

std::unique_ptr< SiPixelQualityget_pointer (const SiPixelQualityRcd &iRecord, std::string label)
 

Private Attributes

edm::FileInPath fp_
 
std::string label
 
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 &)
 

Detailed Description

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

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

Definition at line 39 of file SiPixelQualityESProducer.h.

Member Typedef Documentation

Definition at line 60 of file SiPixelQualityESProducer.h.

Constructor & Destructor Documentation

SiPixelQualityESProducer::SiPixelQualityESProducer ( const edm::ParameterSet iConfig)

Definition at line 38 of file SiPixelQualityESProducer.cc.

References label, produceWithLabel(), and edm::ESProducer::setWhatProduced().

39  : //fp_(conf_.getParameter<edm::FileInPath>("file")),
40  label(conf_.exists("siPixelQualityLabel")?conf_.getParameter<std::string>("siPixelQualityLabel"):""),
41  toGet(conf_.getParameter<Parameters>("ListOfRecordToMerge"))
42 {
43  edm::LogInfo("SiPixelQualityESProducer::SiPixelQualityESProducer");
44  //the following line is needed to tell the framework what
45  // data is being produced
46  setWhatProduced(this);
47  if (label == "forDigitizer"){
49  }
50  findingRecord<SiPixelQualityRcd>();
51 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
std::unique_ptr< SiPixelQuality > produceWithLabel(const SiPixelQualityRcd &iRecord)
vector< ParameterSet > Parameters
SiPixelQualityESProducer::~SiPixelQualityESProducer ( )
override

Definition at line 53 of file SiPixelQualityESProducer.cc.

54 {
55 
56  // do anything here that needs to be done at desctruction time
57  // (e.g. close files, deallocate resources etc.)
58 
59 }

Member Function Documentation

std::unique_ptr< SiPixelQuality > SiPixelQualityESProducer::get_pointer ( const SiPixelQualityRcd iRecord,
std::string  label 
)
private

Definition at line 61 of file SiPixelQualityESProducer.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), edm::ESHandle< T >::product(), align_cfg::recordName, AlCaHLTBitMon_QueryRunRegistry::string, and toGet.

Referenced by produce(), and produceWithLabel().

61  {
62 
63 
65 
67  // errortype "whole" = int 0 in DB BadRocs = 65535 //
68  // errortype "tbmA" = int 1 in DB BadRocs = 255 //
69  // errortype "tbmB" = int 2 in DB Bad Rocs = 65280 //
70  // errortype "none" = int 3 in DB //
72 
73  //if I have understood this is the one got from the DB or file, but in any case the ORIGINAL(maybe i need to get the record for it)
74  //SiPixelQuality * obj = new SiPixelQuality();
75  //SiPixelQuality::disabledModuleType BadModule;
76  //BadModule.DetID = 1; BadModule.errorType = 0; BadModule.BadRocs = 65535; obj->addDisabledModule(BadModule);
77 
78  //start with the record thta existed already to decouple the debugging
79  //here i can do whatever i need with the detVoff
80 
83 
84  for( Parameters::iterator itToGet = toGet.begin(); itToGet != toGet.end(); ++itToGet ) {
85 
86  recordName = itToGet->getParameter<std::string>("record");
87 
88  if (recordName=="SiPixelDetVOffRcd")
89  iRecord.getRecord<SiPixelDetVOffRcd>().get(Voff);
90  if (recordName=="SiPixelQualityFromDbRcd"){
91  iRecord.getRecord<SiPixelQualityFromDbRcd>().get(label, dbobject);
92  }
93  } //end getting the records from the parameters
94 
95  //now the dbobject is the one copied from the db
96  auto dbptr = std::make_unique<SiPixelQuality>(*(dbobject));
97 
98  //here is the magic line in which it switches off Bad Modules
99  dbptr->add(Voff.product());
100  return dbptr;
101 }
T const * product() const
Definition: ESHandle.h:86
std::unique_ptr< SiPixelQuality > SiPixelQualityESProducer::produce ( const SiPixelQualityRcd iRecord)

Definition at line 104 of file SiPixelQualityESProducer.cc.

References get_pointer().

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

105 {
106  return get_pointer(iRecord, "");
107 }
std::unique_ptr< SiPixelQuality > get_pointer(const SiPixelQualityRcd &iRecord, std::string label)
std::unique_ptr< SiPixelQuality > SiPixelQualityESProducer::produceWithLabel ( const SiPixelQualityRcd iRecord)

Definition at line 108 of file SiPixelQualityESProducer.cc.

References get_pointer(), and label.

Referenced by SiPixelQualityESProducer().

109 {
110  return get_pointer(iRecord, label);
111 }
std::unique_ptr< SiPixelQuality > get_pointer(const SiPixelQualityRcd &iRecord, std::string label)
void SiPixelQualityESProducer::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue iosv,
edm::ValidityInterval oValidity 
)
overrideprotectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 113 of file SiPixelQualityESProducer.cc.

References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), and infinity.

115  {
117  oValidity = infinity;
118 }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
const double infinity

Member Data Documentation

edm::FileInPath SiPixelQualityESProducer::fp_
private

Definition at line 59 of file SiPixelQualityESProducer.h.

std::string SiPixelQualityESProducer::label
private
Parameters SiPixelQualityESProducer::toGet
private

Definition at line 61 of file SiPixelQualityESProducer.h.

Referenced by get_pointer().