CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
SiPixelQualityESProducer Class Reference
Inheritance diagram for SiPixelQualityESProducer:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProductResolverFactoryProducer edm::eventsetup::ESProductResolverProvider

Public Member Functions

std::unique_ptr< SiPixelQualityproduce (const SiPixelQualityRcd &iRecord)
 
 SiPixelQualityESProducer (const edm::ParameterSet &iConfig)
 
 ~SiPixelQualityESProducer () override=default
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
 ESProducer (ESProducer &&)=delete
 
ESResolverIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProduceroperator= (const ESProducer &)=delete
 
ESProduceroperator= (ESProducer &&)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESResolverIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProductResolverFactoryProducer
 ESProductResolverFactoryProducer ()
 
 ESProductResolverFactoryProducer (const ESProductResolverFactoryProducer &)=delete
 
const ESProductResolverFactoryProduceroperator= (const ESProductResolverFactoryProducer &)=delete
 
 ~ESProductResolverFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
void createKeyedResolvers (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
const ComponentDescriptiondescription () const
 
 ESProductResolverProvider ()
 
 ESProductResolverProvider (const ESProductResolverProvider &)=delete
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedResolverskeyedResolvers (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const ESProductResolverProvideroperator= (const ESProductResolverProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~ESProductResolverProvider () noexcept(false)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
bool concurrentFinder () const
 
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
 EventSetupRecordIntervalFinder (const EventSetupRecordIntervalFinder &)=delete
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
bool nonconcurrentAndIOVNeedsUpdate (const eventsetup::EventSetupRecordKey &key, const IOVSyncValue &syncValue) const
 
const EventSetupRecordIntervalFinderoperator= (const EventSetupRecordIntervalFinder &)=delete
 
void resetInterval (const eventsetup::EventSetupRecordKey &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 
- Static Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
static void prevalidate (ConfigurationDescriptions &)
 

Private Member Functions

void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
 

Private Attributes

edm::ESGetToken< SiPixelQuality, SiPixelQualityFromDbRcdsiPixelQualityFromDbToken_
 
edm::ESGetToken< SiStripDetVOff, SiPixelDetVOffRcdvoffToken_
 

Additional Inherited Members

- Protected Types inherited from edm::ESProductResolverFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::ESProductResolverProvider
using KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >>
 
- Protected Member Functions inherited from edm::ESProducer
ESConsumesInfoconsumesInfoPushBackNew ()
 
unsigned int consumesInfoSize () const
 
template<typename CallbackT , typename TList , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel)
 
template<typename CallbackT , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &)
 
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 TDecorator >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename TFunc >
auto setWhatProduced (TFunc &&func, const es::Label &iLabel={})
 
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator >
ESConsumesCollectorT< TRecord > setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProductResolverFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ESProductResolverFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedResolversVector registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::ESProductResolverProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Detailed Description

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

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

Definition at line 34 of file SiPixelQualityESProducer.cc.

Constructor & Destructor Documentation

◆ SiPixelQualityESProducer()

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

Definition at line 52 of file SiPixelQualityESProducer.cc.

References AlignmentProducer_cff::appendToDataLabel, edm::eventsetup::ESProductResolverProvider::description(), edm::ParameterSet::getParameter(), edm::eventsetup::ComponentDescription::label_, edm::ESProducer::setWhatProduced(), siPixelQualityFromDbToken_, AlCaHLTBitMon_QueryRunRegistry::string, and voffToken_.

52  {
53  // setWhatProduced internally uses "appendToDataLabel" to name the output product of this ESProducer
54  auto const& appendToDataLabel = iConfig.getParameter<std::string>("appendToDataLabel");
55  auto esCC = setWhatProduced(this);
56 
57  // "siPixelQualityFromDbLabel" corresponds to the Label of a tag with Record
58  // "SiPixelQualityFromDbRcd" in the EventSetup (normally provided by the GlobalTag)
59  auto const& siPixelQualityFromDbLabel = iConfig.getParameter<std::string>("siPixelQualityFromDbLabel");
60  siPixelQualityFromDbToken_ = esCC.consumes(edm::ESInputTag{"", siPixelQualityFromDbLabel});
61  voffToken_ = esCC.consumes();
62 
63  findingRecord<SiPixelQualityRcd>();
64 
65  edm::LogInfo("SiPixelQualityESProducer")
66  << "Module = \"" << description().label_ << "\" (appendToDataLabel = \"" << appendToDataLabel
67  << "\", siPixelQualityFromDbLabel = \"" << siPixelQualityFromDbLabel << "\")";
68 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
const ComponentDescription & description() const
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ESGetToken< SiStripDetVOff, SiPixelDetVOffRcd > voffToken_
Log< level::Info, false > LogInfo
edm::ESGetToken< SiPixelQuality, SiPixelQualityFromDbRcd > siPixelQualityFromDbToken_

◆ ~SiPixelQualityESProducer()

SiPixelQualityESProducer::~SiPixelQualityESProducer ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

void SiPixelQualityESProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 98 of file SiPixelQualityESProducer.cc.

References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

98  {
100  desc.add<std::string>("siPixelQualityFromDbLabel", "");
101  {
103  desc_ps.add<std::string>("record", "SiPixelQualityFromDbRcd");
104  desc_ps.add<std::string>("tag", "");
105  std::vector<edm::ParameterSet> default_ps;
106  default_ps.reserve(2);
107  {
109  temp.addParameter<std::string>("record", "SiPixelQualityFromDbRcd");
110  temp.addParameter<std::string>("tag", "");
111  default_ps.push_back(temp);
112  }
113  {
115  temp.addParameter<std::string>("record", "SiPixelDetVOffRcd");
116  temp.addParameter<std::string>("tag", "");
117  default_ps.push_back(temp);
118  }
119  desc.addVPSet("ListOfRecordToMerge", desc_ps, default_ps);
120  }
121  descriptions.addWithDefaultLabel(desc);
122 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
ParameterDescriptionBase * add(U const &iLabel, T const &value)

◆ produce()

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

Definition at line 70 of file SiPixelQualityESProducer.cc.

References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), siPixelQualityFromDbToken_, and voffToken_.

70  {
72  // errortype "whole" = int 0 in DB BadRocs = 65535 //
73  // errortype "tbmA" = int 1 in DB BadRocs = 255 //
74  // errortype "tbmB" = int 2 in DB Bad Rocs = 65280 //
75  // errortype "none" = int 3 in DB //
77 
78  //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)
79  //SiPixelQuality * obj = new SiPixelQuality();
80  //SiPixelQuality::disabledModuleType BadModule;
81  //BadModule.DetID = 1; BadModule.errorType = 0; BadModule.BadRocs = 65535; obj->addDisabledModule(BadModule);
82 
83  //now the dbobject is the one copied from the db
84  auto dbptr = std::make_unique<SiPixelQuality>(iRecord.get(siPixelQualityFromDbToken_));
85 
86  //here is the magic line in which it switches off Bad Modules
87  dbptr->add(&(iRecord.get(voffToken_)));
88  return dbptr;
89 }
edm::ESGetToken< SiStripDetVOff, SiPixelDetVOffRcd > voffToken_
edm::ESGetToken< SiPixelQuality, SiPixelQualityFromDbRcd > siPixelQualityFromDbToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const

◆ setIntervalFor()

void SiPixelQualityESProducer::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue iosv,
edm::ValidityInterval oValidity 
)
overrideprivatevirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 91 of file SiPixelQualityESProducer.cc.

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

93  {
95  oValidity = infinity;
96 }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
const double infinity

Member Data Documentation

◆ siPixelQualityFromDbToken_

edm::ESGetToken<SiPixelQuality, SiPixelQualityFromDbRcd> SiPixelQualityESProducer::siPixelQualityFromDbToken_
private

Definition at line 48 of file SiPixelQualityESProducer.cc.

Referenced by produce(), and SiPixelQualityESProducer().

◆ voffToken_

edm::ESGetToken<SiStripDetVOff, SiPixelDetVOffRcd> SiPixelQualityESProducer::voffToken_
private

Definition at line 49 of file SiPixelQualityESProducer.cc.

Referenced by produce(), and SiPixelQualityESProducer().