CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Types | Private Attributes
StripCPEESProducer Class Reference
Inheritance diagram for StripCPEESProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

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

Private Types

enum  CPE_t { SIMPLE, TRACKANGLE, GEOMETRIC, FAKE }
 

Private Attributes

edm::ESGetToken
< SiStripBackPlaneCorrection,
SiStripBackPlaneCorrectionDepRcd
backPlaneCorrectionToken_
 
edm::ESGetToken
< SiStripConfObject,
SiStripConfObjectRcd
confObjToken_
 
CPE_t cpeNum
 
edm::ESGetToken
< SiStripLatency,
SiStripLatencyRcd
latencyToken_
 
edm::ESGetToken
< SiStripLorentzAngle,
SiStripLorentzAngleDepRcd
lorentzAngleToken_
 
edm::ESGetToken< MagneticField,
IdealMagneticFieldRecord
magfieldToken_
 
edm::ParameterSet parametersPSet
 
edm::ESGetToken
< TrackerGeometry,
TrackerDigiGeometryRecord
pDDToken_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- 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={})
 
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 19 of file StripCPEESProducer.cc.

Member Enumeration Documentation

Constructor & Destructor Documentation

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

Definition at line 38 of file StripCPEESProducer.cc.

References backPlaneCorrectionToken_, confObjToken_, cpeNum, edm::ParameterSet::exists(), FAKE, GEOMETRIC, edm::ParameterSet::getParameter(), latencyToken_, lorentzAngleToken_, magfieldToken_, mergeVDriftHistosByStation::name, 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:163
edm::ParameterSet parametersPSet
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
edm::ESGetToken< SiStripLatency, SiStripLatencyRcd > latencyToken_
bool exists(std::string const &parameterName) const
checks if a parameter exists
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pDDToken_
edm::ESGetToken< SiStripBackPlaneCorrection, SiStripBackPlaneCorrectionDepRcd > backPlaneCorrectionToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESGetToken< SiStripConfObject, SiStripConfObjectRcd > confObjToken_
edm::ESGetToken< SiStripLorentzAngle, SiStripLorentzAngleDepRcd > lorentzAngleToken_

Member Function Documentation

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(), beam_dqm_sourceclient-live_cfg::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_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pDDToken_
edm::ESGetToken< SiStripBackPlaneCorrection, SiStripBackPlaneCorrectionDepRcd > backPlaneCorrectionToken_
edm::ESGetToken< SiStripConfObject, SiStripConfObjectRcd > confObjToken_
edm::ESGetToken< SiStripLorentzAngle, SiStripLorentzAngleDepRcd > lorentzAngleToken_

Member Data Documentation

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

Definition at line 33 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

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

Definition at line 34 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

CPE_t StripCPEESProducer::cpeNum
private

Definition at line 27 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

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

Definition at line 35 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

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

Definition at line 32 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

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

Definition at line 31 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

edm::ParameterSet StripCPEESProducer::parametersPSet
private

Definition at line 28 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().

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

Definition at line 30 of file StripCPEESProducer.cc.

Referenced by produce(), and StripCPEESProducer().