CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
PixelCPEGenericESProducer Class Reference
Inheritance diagram for PixelCPEGenericESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 PixelCPEGenericESProducer (const edm::ParameterSet &p)
 
std::unique_ptr< PixelClusterParameterEstimatorproduce (const TkPixelCPERecord &)
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Static Public Member Functions

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

Private Attributes

edm::ESGetToken< SiPixelGenErrorDBObject, SiPixelGenErrorDBObjectRcdgenErrorDBObjectToken_
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdhTTToken_
 
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcdlorentzAngleToken_
 
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcdlorentzAngleWidthToken_
 
edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagfieldToken_
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordpDDToken_
 
edm::ParameterSet pset_
 
bool UseErrorsFromTemplates_
 
bool useLAWidthFromDB_
 

Additional Inherited Members

- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &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={})
 
void usesResources (std::vector< std::string > const &)
 
- 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 EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Definition at line 22 of file PixelCPEGenericESProducer.cc.

Constructor & Destructor Documentation

◆ PixelCPEGenericESProducer()

PixelCPEGenericESProducer::PixelCPEGenericESProducer ( const edm::ParameterSet p)

Definition at line 43 of file PixelCPEGenericESProducer.cc.

43  {
44  std::string myname = p.getParameter<std::string>("ComponentName");
45  // Use LA-width from DB. If both (upper and this) are false LA-width is calcuated from LA-offset
46  useLAWidthFromDB_ = p.getParameter<bool>("useLAWidthFromDB");
47  // Use Alignment LA-offset
48  const bool doLorentzFromAlignment = p.getParameter<bool>("doLorentzFromAlignment");
49  char const* laLabel = ""; // standard LA, from calibration, label=""
51  laLabel = "fromAlignment";
52  }
53 
54  auto magname = p.getParameter<edm::ESInputTag>("MagneticFieldRecord");
55  UseErrorsFromTemplates_ = p.getParameter<bool>("UseErrorsFromTemplates");
56 
57  pset_ = p;
58  auto c = setWhatProduced(this, myname);
59  magfieldToken_ = c.consumes(magname);
60  pDDToken_ = c.consumes();
61  hTTToken_ = c.consumes();
62  lorentzAngleToken_ = c.consumes(edm::ESInputTag("", laLabel));
63  if (useLAWidthFromDB_) {
64  lorentzAngleWidthToken_ = c.consumes(edm::ESInputTag("", "forWidth"));
65  }
67  genErrorDBObjectToken_ = c.consumes();
68  }
69 }

References c, HLT_FULL_cff::doLorentzFromAlignment, AlCaHLTBitMon_ParallelJobs::p, and AlCaHLTBitMon_QueryRunRegistry::string.

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 96 of file PixelCPEGenericESProducer.cc.

96  {
98 
99  // from PixelCPEBase
101 
102  // from PixelCPEGeneric
104 
105  // specific to PixelCPEGenericESProducer
106  desc.add<std::string>("ComponentName", "PixelCPEGeneric");
107  desc.add<edm::ESInputTag>("MagneticFieldRecord", edm::ESInputTag(""));
108  descriptions.add("_generic_default", desc);
109 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, PixelCPEGeneric::fillPSetDescription(), PixelCPEBase::fillPSetDescription(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ produce()

std::unique_ptr< PixelClusterParameterEstimator > PixelCPEGenericESProducer::produce ( const TkPixelCPERecord iRecord)

Definition at line 71 of file PixelCPEGenericESProducer.cc.

71  {
72  // add the new la width object
73  const SiPixelLorentzAngle* lorentzAngleWidthProduct = nullptr;
74  if (useLAWidthFromDB_) { // use the width LA
75  lorentzAngleWidthProduct = &iRecord.get(lorentzAngleWidthToken_);
76  }
77  //std::cout<<" la width "<<lorentzAngleWidthProduct<<std::endl; //dk
78 
79  const SiPixelGenErrorDBObject* genErrorDBObjectProduct = nullptr;
80 
81  // Errors take only from new GenError
82  if (UseErrorsFromTemplates_) { // do only when generrors are needed
83  genErrorDBObjectProduct = &iRecord.get(genErrorDBObjectToken_);
84  //} else {
85  //std::cout<<" pass an empty GenError pointer"<<std::endl;
86  }
87  return std::make_unique<PixelCPEGeneric>(pset_,
88  &iRecord.get(magfieldToken_),
89  iRecord.get(pDDToken_),
90  iRecord.get(hTTToken_),
91  &iRecord.get(lorentzAngleToken_),
92  genErrorDBObjectProduct,
93  lorentzAngleWidthProduct);
94 }

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

Member Data Documentation

◆ genErrorDBObjectToken_

edm::ESGetToken<SiPixelGenErrorDBObject, SiPixelGenErrorDBObjectRcd> PixelCPEGenericESProducer::genErrorDBObjectToken_
private

Definition at line 34 of file PixelCPEGenericESProducer.cc.

◆ hTTToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> PixelCPEGenericESProducer::hTTToken_
private

Definition at line 31 of file PixelCPEGenericESProducer.cc.

◆ lorentzAngleToken_

edm::ESGetToken<SiPixelLorentzAngle, SiPixelLorentzAngleRcd> PixelCPEGenericESProducer::lorentzAngleToken_
private

Definition at line 32 of file PixelCPEGenericESProducer.cc.

◆ lorentzAngleWidthToken_

edm::ESGetToken<SiPixelLorentzAngle, SiPixelLorentzAngleRcd> PixelCPEGenericESProducer::lorentzAngleWidthToken_
private

Definition at line 33 of file PixelCPEGenericESProducer.cc.

◆ magfieldToken_

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> PixelCPEGenericESProducer::magfieldToken_
private

Definition at line 29 of file PixelCPEGenericESProducer.cc.

◆ pDDToken_

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> PixelCPEGenericESProducer::pDDToken_
private

Definition at line 30 of file PixelCPEGenericESProducer.cc.

◆ pset_

edm::ParameterSet PixelCPEGenericESProducer::pset_
private

Definition at line 36 of file PixelCPEGenericESProducer.cc.

◆ UseErrorsFromTemplates_

bool PixelCPEGenericESProducer::UseErrorsFromTemplates_
private

Definition at line 38 of file PixelCPEGenericESProducer.cc.

◆ useLAWidthFromDB_

bool PixelCPEGenericESProducer::useLAWidthFromDB_
private

Definition at line 37 of file PixelCPEGenericESProducer.cc.

edm::ESInputTag
Definition: ESInputTag.h:87
PixelCPEGenericESProducer::hTTToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > hTTToken_
Definition: PixelCPEGenericESProducer.cc:31
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
PixelCPEGenericESProducer::UseErrorsFromTemplates_
bool UseErrorsFromTemplates_
Definition: PixelCPEGenericESProducer.cc:38
PixelCPEGenericESProducer::lorentzAngleToken_
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcd > lorentzAngleToken_
Definition: PixelCPEGenericESProducer.cc:32
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
SiPixelLorentzAngle
Definition: SiPixelLorentzAngle.h:11
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
HLT_FULL_cff.doLorentzFromAlignment
doLorentzFromAlignment
Definition: HLT_FULL_cff.py:7587
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PixelCPEGenericESProducer::pDDToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pDDToken_
Definition: PixelCPEGenericESProducer.cc:30
PixelCPEGenericESProducer::genErrorDBObjectToken_
edm::ESGetToken< SiPixelGenErrorDBObject, SiPixelGenErrorDBObjectRcd > genErrorDBObjectToken_
Definition: PixelCPEGenericESProducer.cc:34
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PixelCPEGenericESProducer::useLAWidthFromDB_
bool useLAWidthFromDB_
Definition: PixelCPEGenericESProducer.cc:37
PixelCPEGenericESProducer::pset_
edm::ParameterSet pset_
Definition: PixelCPEGenericESProducer.cc:36
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
PixelCPEGenericESProducer::lorentzAngleWidthToken_
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcd > lorentzAngleWidthToken_
Definition: PixelCPEGenericESProducer.cc:33
PixelCPEGeneric::fillPSetDescription
static void fillPSetDescription(edm::ParameterSetDescription &desc)
Definition: PixelCPEGeneric.cc:439
PixelCPEBase::fillPSetDescription
static void fillPSetDescription(edm::ParameterSetDescription &desc)
Definition: PixelCPEBase.cc:467
PixelCPEGenericESProducer::magfieldToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
Definition: PixelCPEGenericESProducer.cc:29
SiPixelGenErrorDBObject
Definition: SiPixelGenErrorDBObject.h:16
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56