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
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename Record >
void updateFromMayConsumes (unsigned int iIndex, const Record &iRecord)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(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 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 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 ( const edm::ParameterSet p)

Definition at line 43 of file PixelCPEGenericESProducer.cc.

References HltBtagPostValidation_cff::c, genErrorDBObjectToken_, edm::ParameterSet::getParameter(), hTTToken_, lorentzAngleToken_, lorentzAngleWidthToken_, magfieldToken_, AlCaHLTBitMon_ParallelJobs::p, pDDToken_, pset_, edm::ESProducer::setWhatProduced(), AlCaHLTBitMon_QueryRunRegistry::string, UseErrorsFromTemplates_, HLT_2018_cff::useLAAlignmentOffsets, and useLAWidthFromDB_.

Referenced by fillDescriptions().

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=""
50  if (useLAAlignmentOffsets) {
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  c.setConsumes(magfieldToken_, magname)
60  .setConsumes(pDDToken_)
61  .setConsumes(hTTToken_)
62  .setConsumes(lorentzAngleToken_, edm::ESInputTag("", laLabel));
63  if (useLAWidthFromDB_) {
64  c.setConsumes(lorentzAngleWidthToken_, edm::ESInputTag("", "forWidth"));
65  }
66  if (UseErrorsFromTemplates_) {
67  c.setConsumes(genErrorDBObjectToken_);
68  }
69 
70  //std::cout<<" ESProducer "<<myname<<" "<<useLAWidthFromDB_<<" "<<useLAAlignmentOffsets_<<" "
71  // <<UseErrorsFromTemplates_<<std::endl; //dk
72 }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcd > lorentzAngleToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > hTTToken_
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcd > lorentzAngleWidthToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pDDToken_
edm::ESGetToken< SiPixelGenErrorDBObject, SiPixelGenErrorDBObjectRcd > genErrorDBObjectToken_

Member Function Documentation

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

Definition at line 99 of file PixelCPEGenericESProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), DEFINE_FWK_EVENTSETUP_MODULE, PixelCPEGeneric::fillPSetDescription(), PixelCPEBase::fillPSetDescription(), PixelCPEGenericESProducer(), and AlCaHLTBitMon_QueryRunRegistry::string.

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 }
static void fillPSetDescription(edm::ParameterSetDescription &desc)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillPSetDescription(edm::ParameterSetDescription &desc)
std::unique_ptr< PixelClusterParameterEstimator > PixelCPEGenericESProducer::produce ( const TkPixelCPERecord iRecord)

Definition at line 74 of file PixelCPEGenericESProducer.cc.

References genErrorDBObjectToken_, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), hTTToken_, lorentzAngleToken_, lorentzAngleWidthToken_, magfieldToken_, pDDToken_, pset_, UseErrorsFromTemplates_, and useLAWidthFromDB_.

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 }
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcd > lorentzAngleToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > hTTToken_
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleRcd > lorentzAngleWidthToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pDDToken_
edm::ESGetToken< SiPixelGenErrorDBObject, SiPixelGenErrorDBObjectRcd > genErrorDBObjectToken_

Member Data Documentation

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

Definition at line 34 of file PixelCPEGenericESProducer.cc.

Referenced by PixelCPEGenericESProducer(), and produce().

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

Definition at line 31 of file PixelCPEGenericESProducer.cc.

Referenced by PixelCPEGenericESProducer(), and produce().

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

Definition at line 32 of file PixelCPEGenericESProducer.cc.

Referenced by PixelCPEGenericESProducer(), and produce().

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

Definition at line 33 of file PixelCPEGenericESProducer.cc.

Referenced by PixelCPEGenericESProducer(), and produce().

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

Definition at line 29 of file PixelCPEGenericESProducer.cc.

Referenced by PixelCPEGenericESProducer(), and produce().

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

Definition at line 30 of file PixelCPEGenericESProducer.cc.

Referenced by PixelCPEGenericESProducer(), and produce().

edm::ParameterSet PixelCPEGenericESProducer::pset_
private

Definition at line 36 of file PixelCPEGenericESProducer.cc.

Referenced by PixelCPEGenericESProducer(), and produce().

bool PixelCPEGenericESProducer::UseErrorsFromTemplates_
private

Definition at line 38 of file PixelCPEGenericESProducer.cc.

Referenced by PixelCPEGenericESProducer(), and produce().

bool PixelCPEGenericESProducer::useLAWidthFromDB_
private

Definition at line 37 of file PixelCPEGenericESProducer.cc.

Referenced by PixelCPEGenericESProducer(), and produce().