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 Attributes
trackerDTC::ProducerES Class Reference

Class to produce setup of Track Trigger emulators. More...

Inheritance diagram for trackerDTC::ProducerES:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

unique_ptr< Setupproduce (const SetupRcd &setupRcd)
 
 ProducerES (const ParameterSet &iConfig)
 
 ~ProducerES () override
 
- 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 Attributes

bool fromDD4hep_
 
ESGetToken
< TrackerDetToDTCELinkCablingMap,
TrackerDetToDTCELinkCablingMapRcd
getTokenCablingMap_
 
ESGetToken< DDCompactView,
IdealGeometryRecord
getTokenGeometryConfiguration_
 
ESGetToken< cms::DDCompactView,
IdealGeometryRecord
getTokenGeometryConfigurationDD4hep_
 
ESGetToken< MagneticField,
IdealMagneticFieldRecord
getTokenMagneticField_
 
ESGetToken< TrackerGeometry,
TrackerDigiGeometryRecord
getTokenTrackerGeometry_
 
ESGetToken< TrackerTopology,
TrackerTopologyRcd
getTokenTrackerTopology_
 
ESGetToken< StubAlgorithm,
TTStubAlgorithmRecord
getTokenTTStubAlgorithm_
 
const ParameterSet iConfig_
 

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

Class to produce setup of Track Trigger emulators.

Author
Thomas Schuh
Date
2020, Apr

Definition at line 23 of file ProducerES.cc.

Constructor & Destructor Documentation

trackerDTC::ProducerES::ProducerES ( const ParameterSet iConfig)

Definition at line 41 of file ProducerES.cc.

References fromDD4hep_, edm::ParameterSet::getParameter(), getTokenCablingMap_, getTokenGeometryConfiguration_, getTokenGeometryConfigurationDD4hep_, getTokenMagneticField_, getTokenTrackerGeometry_, getTokenTrackerTopology_, getTokenTTStubAlgorithm_, and edm::ESProducer::setWhatProduced().

41  : iConfig_(iConfig) {
42  fromDD4hep_ = iConfig.getParameter<bool>("fromDD4hep");
43  auto cc = setWhatProduced(this);
44  getTokenTTStubAlgorithm_ = cc.consumes();
45  getTokenMagneticField_ = cc.consumes();
46  getTokenTrackerGeometry_ = cc.consumes();
47  getTokenTrackerTopology_ = cc.consumes();
48  getTokenCablingMap_ = cc.consumes();
49  if (fromDD4hep_)
51  else
52  getTokenGeometryConfiguration_ = cc.consumes();
53  }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ESGetToken< DDCompactView, IdealGeometryRecord > getTokenGeometryConfiguration_
Definition: ProducerES.cc:36
ESGetToken< cms::DDCompactView, IdealGeometryRecord > getTokenGeometryConfigurationDD4hep_
Definition: ProducerES.cc:37
ESGetToken< TrackerTopology, TrackerTopologyRcd > getTokenTrackerTopology_
Definition: ProducerES.cc:34
ESGetToken< StubAlgorithm, TTStubAlgorithmRecord > getTokenTTStubAlgorithm_
Definition: ProducerES.cc:31
const ParameterSet iConfig_
Definition: ProducerES.cc:30
ESGetToken< MagneticField, IdealMagneticFieldRecord > getTokenMagneticField_
Definition: ProducerES.cc:32
ESGetToken< TrackerDetToDTCELinkCablingMap, TrackerDetToDTCELinkCablingMapRcd > getTokenCablingMap_
Definition: ProducerES.cc:35
ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > getTokenTrackerGeometry_
Definition: ProducerES.cc:33
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
trackerDTC::ProducerES::~ProducerES ( )
inlineoverride

Definition at line 26 of file ProducerES.cc.

26 {}

Member Function Documentation

unique_ptr< Setup > trackerDTC::ProducerES::produce ( const SetupRcd setupRcd)

Definition at line 55 of file ProducerES.cc.

References edm::ESHandleBase::description(), fromDD4hep_, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getHandle(), edm::getParameterSet(), getTokenCablingMap_, getTokenGeometryConfiguration_, getTokenGeometryConfigurationDD4hep_, getTokenMagneticField_, getTokenTrackerGeometry_, getTokenTrackerTopology_, getTokenTTStubAlgorithm_, iConfig_, HLT_FULL_cff::magneticField, and edm::eventsetup::ComponentDescription::pid_.

55  {
56  const MagneticField& magneticField = setupRcd.get(getTokenMagneticField_);
57  const TrackerGeometry& trackerGeometry = setupRcd.get(getTokenTrackerGeometry_);
58  const TrackerTopology& trackerTopology = setupRcd.get(getTokenTrackerTopology_);
59  const TrackerDetToDTCELinkCablingMap& cablingMap = setupRcd.get(getTokenCablingMap_);
60  const ESHandle<StubAlgorithm> handleStubAlgorithm = setupRcd.getHandle(getTokenTTStubAlgorithm_);
61  const ParameterSetID& pSetIdTTStubAlgorithm = handleStubAlgorithm.description()->pid_;
62  const StubAlgorithmOfficial& stubAlgoritm =
63  *dynamic_cast<const StubAlgorithmOfficial*>(&setupRcd.get(getTokenTTStubAlgorithm_));
64  const ParameterSet& pSetStubAlgorithm = getParameterSet(handleStubAlgorithm.description()->pid_);
65  if (fromDD4hep_) {
66  const ESHandle<cms::DDCompactView> handleGeometryConfiguration =
67  setupRcd.getHandle(getTokenGeometryConfigurationDD4hep_);
68  const ParameterSetID& pSetIdGeometryConfiguration = handleGeometryConfiguration.description()->pid_;
69  const ParameterSet& pSetGeometryConfiguration = getParameterSet(handleGeometryConfiguration.description()->pid_);
70  return make_unique<Setup>(iConfig_,
72  trackerGeometry,
73  trackerTopology,
74  cablingMap,
75  stubAlgoritm,
76  pSetStubAlgorithm,
77  pSetGeometryConfiguration,
78  pSetIdTTStubAlgorithm,
79  pSetIdGeometryConfiguration);
80  } else {
81  const ESHandle<DDCompactView> handleGeometryConfiguration = setupRcd.getHandle(getTokenGeometryConfiguration_);
82  const ParameterSetID& pSetIdGeometryConfiguration = handleGeometryConfiguration.description()->pid_;
83  const ParameterSet& pSetGeometryConfiguration = getParameterSet(handleGeometryConfiguration.description()->pid_);
84  return make_unique<Setup>(iConfig_,
86  trackerGeometry,
87  trackerTopology,
88  cablingMap,
89  stubAlgoritm,
90  pSetStubAlgorithm,
91  pSetGeometryConfiguration,
92  pSetIdTTStubAlgorithm,
93  pSetIdGeometryConfiguration);
94  }
95  }
ESGetToken< DDCompactView, IdealGeometryRecord > getTokenGeometryConfiguration_
Definition: ProducerES.cc:36
ESGetToken< cms::DDCompactView, IdealGeometryRecord > getTokenGeometryConfigurationDD4hep_
Definition: ProducerES.cc:37
ESGetToken< TrackerTopology, TrackerTopologyRcd > getTokenTrackerTopology_
Definition: ProducerES.cc:34
ESGetToken< StubAlgorithm, TTStubAlgorithmRecord > getTokenTTStubAlgorithm_
Definition: ProducerES.cc:31
ParameterSet const & getParameterSet(ParameterSetID const &id)
const ParameterSet iConfig_
Definition: ProducerES.cc:30
tuple magneticField
ESGetToken< MagneticField, IdealMagneticFieldRecord > getTokenMagneticField_
Definition: ProducerES.cc:32
edm::eventsetup::ComponentDescription const * description() const
Definition: ESHandle.cc:9
ESGetToken< TrackerDetToDTCELinkCablingMap, TrackerDetToDTCELinkCablingMapRcd > getTokenCablingMap_
Definition: ProducerES.cc:35
ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > getTokenTrackerGeometry_
Definition: ProducerES.cc:33
TTStubAlgorithm_official< Ref_Phase2TrackerDigi_ > StubAlgorithmOfficial
Definition: Setup.h:33

Member Data Documentation

bool trackerDTC::ProducerES::fromDD4hep_
private

Definition at line 38 of file ProducerES.cc.

Referenced by produce(), and ProducerES().

ESGetToken<TrackerDetToDTCELinkCablingMap, TrackerDetToDTCELinkCablingMapRcd> trackerDTC::ProducerES::getTokenCablingMap_
private

Definition at line 35 of file ProducerES.cc.

Referenced by produce(), and ProducerES().

ESGetToken<DDCompactView, IdealGeometryRecord> trackerDTC::ProducerES::getTokenGeometryConfiguration_
private

Definition at line 36 of file ProducerES.cc.

Referenced by produce(), and ProducerES().

ESGetToken<cms::DDCompactView, IdealGeometryRecord> trackerDTC::ProducerES::getTokenGeometryConfigurationDD4hep_
private

Definition at line 37 of file ProducerES.cc.

Referenced by produce(), and ProducerES().

ESGetToken<MagneticField, IdealMagneticFieldRecord> trackerDTC::ProducerES::getTokenMagneticField_
private

Definition at line 32 of file ProducerES.cc.

Referenced by produce(), and ProducerES().

ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerDTC::ProducerES::getTokenTrackerGeometry_
private

Definition at line 33 of file ProducerES.cc.

Referenced by produce(), and ProducerES().

ESGetToken<TrackerTopology, TrackerTopologyRcd> trackerDTC::ProducerES::getTokenTrackerTopology_
private

Definition at line 34 of file ProducerES.cc.

Referenced by produce(), and ProducerES().

ESGetToken<StubAlgorithm, TTStubAlgorithmRecord> trackerDTC::ProducerES::getTokenTTStubAlgorithm_
private

Definition at line 31 of file ProducerES.cc.

Referenced by produce(), and ProducerES().

const ParameterSet trackerDTC::ProducerES::iConfig_
private

Definition at line 30 of file ProducerES.cc.

Referenced by produce().