CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 useLAAlignmentOffsets = p.getParameter<bool>("useLAAlignmentOffsets");
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 
70  //std::cout<<" ESProducer "<<myname<<" "<<useLAWidthFromDB_<<" "<<useLAAlignmentOffsets_<<" "
71  // <<UseErrorsFromTemplates_<<std::endl; //dk
72 }

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

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 99 of file PixelCPEGenericESProducer.cc.

99  {
101 
102  // from PixelCPEBase
104 
105  // from PixelCPEGeneric
107 
108  // specific to PixelCPEGenericESProducer
109  desc.add<std::string>("ComponentName", "PixelCPEGeneric");
110  desc.add<edm::ESInputTag>("MagneticFieldRecord", edm::ESInputTag(""));
111  desc.add<bool>("useLAAlignmentOffsets", false);
112  desc.add<bool>("DoLorentz", false);
113  descriptions.add("_generic_default", desc);
114 }

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 74 of file PixelCPEGenericESProducer.cc.

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

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
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
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.useLAAlignmentOffsets
useLAAlignmentOffsets
Definition: HLT_FULL_cff.py:7581
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PixelCPEGenericESProducer::pDDToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pDDToken_
Definition: PixelCPEGenericESProducer.cc:30
PixelCPEGenericESProducer::genErrorDBObjectToken_
edm::ESGetToken< SiPixelGenErrorDBObject, SiPixelGenErrorDBObjectRcd > genErrorDBObjectToken_
Definition: PixelCPEGenericESProducer.cc:34
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:628
PixelCPEBase::fillPSetDescription
static void fillPSetDescription(edm::ParameterSetDescription &desc)
Definition: PixelCPEBase.cc:465
PixelCPEGenericESProducer::magfieldToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
Definition: PixelCPEGenericESProducer.cc:29
SiPixelGenErrorDBObject
Definition: SiPixelGenErrorDBObject.h:16
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46