CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Types | 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)
 
 SiPixelQualityESProducer (const edm::ParameterSet &iConfig)
 
 ~SiPixelQualityESProducer ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()(false)
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer () noexcept(false)
 
- 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::ComponentDescription
descriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set
< eventsetup::EventSetupRecordKey
findingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Protected Member Functions

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

Private Types

typedef std::vector
< edm::ParameterSet
Parameters
 

Private Attributes

edm::FileInPath fp_
 
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
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- 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 58 of file SiPixelQualityESProducer.h.

Constructor & Destructor Documentation

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

Definition at line 38 of file SiPixelQualityESProducer.cc.

References edm::ESProducer::setWhatProduced().

39  : //fp_(conf_.getParameter<edm::FileInPath>("file")),
40  toGet(conf_.getParameter<Parameters>("ListOfRecordToMerge"))
41 {
42  edm::LogInfo("SiPixelQualityESProducer::SiPixelQualityESProducer");
43  //the following line is needed to tell the framework what
44  // data is being produced
45  setWhatProduced(this);
46  findingRecord<SiPixelQualityRcd>();
47 }
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
vector< ParameterSet > Parameters
SiPixelQualityESProducer::~SiPixelQualityESProducer ( )

Definition at line 50 of file SiPixelQualityESProducer.cc.

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

Member Function Documentation

std::unique_ptr< SiPixelQuality > SiPixelQualityESProducer::produce ( const SiPixelQualityRcd iRecord)

Definition at line 58 of file SiPixelQualityESProducer.cc.

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

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

59 {
60 
62 
64  // errortype "whole" = int 0 in DB BadRocs = 65535 //
65  // errortype "tbmA" = int 1 in DB BadRocs = 255 //
66  // errortype "tbmB" = int 2 in DB Bad Rocs = 65280 //
67  // errortype "none" = int 3 in DB //
69 
70  //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)
71  //SiPixelQuality * obj = new SiPixelQuality();
72  //SiPixelQuality::disabledModuleType BadModule;
73  //BadModule.DetID = 1; BadModule.errorType = 0; BadModule.BadRocs = 65535; obj->addDisabledModule(BadModule);
74 
75  //start with the record thta existed already to decouple the debugging
76  //here i can do whatever i need with the detVoff
77 
80 
81  for( Parameters::iterator itToGet = toGet.begin(); itToGet != toGet.end(); ++itToGet ) {
82 
83  recordName = itToGet->getParameter<std::string>("record");
84 
85  if (recordName=="SiPixelDetVOffRcd")
86  iRecord.getRecord<SiPixelDetVOffRcd>().get(Voff);
87  if (recordName=="SiPixelQualityFromDbRcd")
88  iRecord.getRecord<SiPixelQualityFromDbRcd>().get(dbobject);
89  } //end getting the records from the parameters
90 
91  //now the dbobject is the one copied from the db
92  //here make a copy of dbobject, but now the label has to be empty not to interfeare with the Reco
93  auto dbptr = std::make_unique<SiPixelQuality>(*(dbobject));
94 
95  //here is the magic line in which it switches off Bad Modules
96  dbptr->add(Voff.product());
97 
98  return dbptr;
99 }
tuple recordName
Definition: align_cfg.py:66
T const * product() const
Definition: ESHandle.h:86
void SiPixelQualityESProducer::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue iosv,
edm::ValidityInterval oValidity 
)
protectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 101 of file SiPixelQualityESProducer.cc.

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

103  {
105  oValidity = infinity;
106 }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
static const IOVSyncValue & beginOfTime()
const double infinity

Member Data Documentation

edm::FileInPath SiPixelQualityESProducer::fp_
private

Definition at line 57 of file SiPixelQualityESProducer.h.

Parameters SiPixelQualityESProducer::toGet
private

Definition at line 59 of file SiPixelQualityESProducer.h.

Referenced by produce().