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 | Private Types | Private Attributes
StripCPEESProducer Class Reference
Inheritance diagram for StripCPEESProducer:
edm::ESProducer edm::ESProductResolverFactoryProducer edm::eventsetup::ESProductResolverProvider

Public Member Functions

std::unique_ptr< StripClusterParameterEstimatorproduce (const TkStripCPERecord &)
 
 StripCPEESProducer (const edm::ParameterSet &)
 
- 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)
 

Private Types

enum  CPE_t { SIMPLE, TRACKANGLE, GEOMETRIC, FAKE }
 

Private Attributes

edm::ESGetToken< SiStripBackPlaneCorrection, SiStripBackPlaneCorrectionDepRcdbackPlaneCorrectionToken_
 
edm::ESGetToken< SiStripConfObject, SiStripConfObjectRcdconfObjToken_
 
CPE_t cpeNum
 
edm::ESGetToken< SiStripLatency, SiStripLatencyRcdlatencyToken_
 
edm::ESGetToken< SiStripLorentzAngle, SiStripLorentzAngleDepRcdlorentzAngleToken_
 
edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagfieldToken_
 
edm::ParameterSet parametersPSet
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordpDDToken_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
static void prevalidate (ConfigurationDescriptions &)
 
- 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)
 

Detailed Description

Definition at line 19 of file StripCPEESProducer.cc.

Member Enumeration Documentation

◆ CPE_t

Constructor & Destructor Documentation

◆ StripCPEESProducer()

StripCPEESProducer::StripCPEESProducer ( const edm::ParameterSet p)

Definition at line 38 of file StripCPEESProducer.cc.

References backPlaneCorrectionToken_, gpuPixelDoublets::cc, confObjToken_, cpeNum, FAKE, GEOMETRIC, latencyToken_, lorentzAngleToken_, magfieldToken_, Skims_PA_cff::name, AlCaHLTBitMon_ParallelJobs::p, parametersPSet, pDDToken_, edm::ESProducer::setWhatProduced(), SIMPLE, AlCaHLTBitMon_QueryRunRegistry::string, and TRACKANGLE.

38  {
39  std::string name = p.getParameter<std::string>("ComponentName");
41  if (!p.exists("ComponentType"))
42  edm::LogWarning("StripCPEESProducer") << " the CPE producer should contain a ComponentType, probably identical to "
43  "ComponentName in the first step of migration. Falling back to:"
44  << type;
45  else
46  type = p.getParameter<std::string>("ComponentType");
47 
48  std::map<std::string, CPE_t> enumMap;
49  enumMap[std::string("SimpleStripCPE")] = SIMPLE;
50  enumMap[std::string("StripCPEfromTrackAngle")] = TRACKANGLE;
51  enumMap[std::string("StripCPEgeometric")] = GEOMETRIC;
52  enumMap[std::string("FakeStripCPE")] = FAKE;
53  if (enumMap.find(type) == enumMap.end())
54  throw cms::Exception("Unknown StripCPE type") << type;
55 
56  cpeNum = enumMap[type];
57  parametersPSet = (p.exists("parameters") ? p.getParameter<edm::ParameterSet>("parameters") : p);
58  auto cc = setWhatProduced(this, name);
59  pDDToken_ = cc.consumes();
60  magfieldToken_ = cc.consumes();
61  lorentzAngleToken_ = cc.consumes();
62  backPlaneCorrectionToken_ = cc.consumes();
63  confObjToken_ = cc.consumes();
64  latencyToken_ = cc.consumes();
65 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
edm::ParameterSet parametersPSet
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
edm::ESGetToken< SiStripLatency, SiStripLatencyRcd > latencyToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pDDToken_
edm::ESGetToken< SiStripBackPlaneCorrection, SiStripBackPlaneCorrectionDepRcd > backPlaneCorrectionToken_
edm::ESGetToken< SiStripConfObject, SiStripConfObjectRcd > confObjToken_
edm::ESGetToken< SiStripLorentzAngle, SiStripLorentzAngleDepRcd > lorentzAngleToken_

Member Function Documentation

◆ produce()

std::unique_ptr< StripClusterParameterEstimator > StripCPEESProducer::produce ( const TkStripCPERecord iRecord)

Definition at line 67 of file StripCPEESProducer.cc.

References backPlaneCorrectionToken_, confObjToken_, cpeNum, FAKE, GEOMETRIC, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), config_102169_raw_cff::latency, latencyToken_, lorentzAngleToken_, volumeBasedMagneticField_160812_cfi::magfield, magfieldToken_, parametersPSet, pDDToken_, SIMPLE, and TRACKANGLE.

67  {
68  TrackerGeometry const& pDD = iRecord.get(pDDToken_);
69  MagneticField const& magfield = iRecord.get(magfieldToken_);
70  SiStripLorentzAngle const& lorentzAngle = iRecord.get(lorentzAngleToken_);
71  SiStripBackPlaneCorrection const& backPlaneCorrection = iRecord.get(backPlaneCorrectionToken_);
72  SiStripConfObject const& confObj = iRecord.get(confObjToken_);
73  SiStripLatency const& latency = iRecord.get(latencyToken_);
74 
75  std::unique_ptr<StripClusterParameterEstimator> cpe;
76 
77  switch (cpeNum) {
78  case SIMPLE:
79  cpe = std::make_unique<StripCPE>(
80  parametersPSet, magfield, pDD, lorentzAngle, backPlaneCorrection, confObj, latency);
81  break;
82 
83  case TRACKANGLE:
84  cpe = std::make_unique<StripCPEfromTrackAngle>(
85  parametersPSet, magfield, pDD, lorentzAngle, backPlaneCorrection, confObj, latency);
86  break;
87 
88  case GEOMETRIC:
89  cpe = std::make_unique<StripCPEgeometric>(
90  parametersPSet, magfield, pDD, lorentzAngle, backPlaneCorrection, confObj, latency);
91  break;
92 
93  case FAKE:
94  cpe = std::make_unique<StripFakeCPE>();
95  break;
96  }
97 
98  return cpe;
99 }
edm::ParameterSet parametersPSet
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
edm::ESGetToken< SiStripLatency, SiStripLatencyRcd > latencyToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pDDToken_
edm::ESGetToken< SiStripBackPlaneCorrection, SiStripBackPlaneCorrectionDepRcd > backPlaneCorrectionToken_
edm::ESGetToken< SiStripConfObject, SiStripConfObjectRcd > confObjToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< SiStripLorentzAngle, SiStripLorentzAngleDepRcd > lorentzAngleToken_

Member Data Documentation

◆ backPlaneCorrectionToken_

edm::ESGetToken<SiStripBackPlaneCorrection, SiStripBackPlaneCorrectionDepRcd> StripCPEESProducer::backPlaneCorrectionToken_
private

Definition at line 33 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

◆ confObjToken_

edm::ESGetToken<SiStripConfObject, SiStripConfObjectRcd> StripCPEESProducer::confObjToken_
private

Definition at line 34 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

◆ cpeNum

CPE_t StripCPEESProducer::cpeNum
private

Definition at line 27 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

◆ latencyToken_

edm::ESGetToken<SiStripLatency, SiStripLatencyRcd> StripCPEESProducer::latencyToken_
private

Definition at line 35 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

◆ lorentzAngleToken_

edm::ESGetToken<SiStripLorentzAngle, SiStripLorentzAngleDepRcd> StripCPEESProducer::lorentzAngleToken_
private

Definition at line 32 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

◆ magfieldToken_

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

Definition at line 31 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

◆ parametersPSet

edm::ParameterSet StripCPEESProducer::parametersPSet
private

Definition at line 28 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

◆ pDDToken_

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

Definition at line 30 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().