CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
tt::ProducerSetup Class Reference

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

Inheritance diagram for tt::ProducerSetup:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

unique_ptr< Setupproduce (const SetupRcd &setupRcd)
 
 ProducerSetup (const ParameterSet &iConfig)
 
 ~ProducerSetup () 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, TrackerDetToDTCELinkCablingMapRcdgetTokenCablingMap_
 
ESGetToken< DDCompactView, IdealGeometryRecordgetTokenGeometryConfiguration_
 
ESGetToken< cms::DDCompactView, IdealGeometryRecordgetTokenGeometryConfigurationDD4hep_
 
ESGetToken< MagneticField, IdealMagneticFieldRecordgetTokenMagneticField_
 
ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordgetTokenTrackerGeometry_
 
ESGetToken< TrackerTopology, TrackerTopologyRcdgetTokenTrackerTopology_
 
ESGetToken< StubAlgorithm, TTStubAlgorithmRecordgetTokenTTStubAlgorithm_
 
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 >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &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::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 21 of file ProducerSetup.cc.

Constructor & Destructor Documentation

◆ ProducerSetup()

tt::ProducerSetup::ProducerSetup ( const ParameterSet iConfig)

Definition at line 39 of file ProducerSetup.cc.

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

39  : iConfig_(iConfig) {
40  fromDD4hep_ = iConfig.getParameter<bool>("fromDD4hep");
41  auto cc = setWhatProduced(this);
42  getTokenTTStubAlgorithm_ = cc.consumes();
43  getTokenMagneticField_ = cc.consumes();
44  getTokenTrackerGeometry_ = cc.consumes();
45  getTokenTrackerTopology_ = cc.consumes();
46  getTokenCablingMap_ = cc.consumes();
47  if (fromDD4hep_)
49  else
51  }
ESGetToken< MagneticField, IdealMagneticFieldRecord > getTokenMagneticField_
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ESGetToken< cms::DDCompactView, IdealGeometryRecord > getTokenGeometryConfigurationDD4hep_
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
const ParameterSet iConfig_
ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > getTokenTrackerGeometry_
ESGetToken< TrackerDetToDTCELinkCablingMap, TrackerDetToDTCELinkCablingMapRcd > getTokenCablingMap_
ESGetToken< TrackerTopology, TrackerTopologyRcd > getTokenTrackerTopology_
ESGetToken< DDCompactView, IdealGeometryRecord > getTokenGeometryConfiguration_
ESGetToken< StubAlgorithm, TTStubAlgorithmRecord > getTokenTTStubAlgorithm_

◆ ~ProducerSetup()

tt::ProducerSetup::~ProducerSetup ( )
inlineoverride

Definition at line 24 of file ProducerSetup.cc.

24 {}

Member Function Documentation

◆ produce()

unique_ptr< Setup > tt::ProducerSetup::produce ( const SetupRcd setupRcd)

Definition at line 53 of file ProducerSetup.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_2022v15_cff::magneticField, and edm::eventsetup::ComponentDescription::pid_.

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

Member Data Documentation

◆ fromDD4hep_

bool tt::ProducerSetup::fromDD4hep_
private

Definition at line 36 of file ProducerSetup.cc.

Referenced by produce(), and ProducerSetup().

◆ getTokenCablingMap_

ESGetToken<TrackerDetToDTCELinkCablingMap, TrackerDetToDTCELinkCablingMapRcd> tt::ProducerSetup::getTokenCablingMap_
private

Definition at line 33 of file ProducerSetup.cc.

Referenced by produce(), and ProducerSetup().

◆ getTokenGeometryConfiguration_

ESGetToken<DDCompactView, IdealGeometryRecord> tt::ProducerSetup::getTokenGeometryConfiguration_
private

Definition at line 34 of file ProducerSetup.cc.

Referenced by produce(), and ProducerSetup().

◆ getTokenGeometryConfigurationDD4hep_

ESGetToken<cms::DDCompactView, IdealGeometryRecord> tt::ProducerSetup::getTokenGeometryConfigurationDD4hep_
private

Definition at line 35 of file ProducerSetup.cc.

Referenced by produce(), and ProducerSetup().

◆ getTokenMagneticField_

ESGetToken<MagneticField, IdealMagneticFieldRecord> tt::ProducerSetup::getTokenMagneticField_
private

Definition at line 30 of file ProducerSetup.cc.

Referenced by produce(), and ProducerSetup().

◆ getTokenTrackerGeometry_

ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> tt::ProducerSetup::getTokenTrackerGeometry_
private

Definition at line 31 of file ProducerSetup.cc.

Referenced by produce(), and ProducerSetup().

◆ getTokenTrackerTopology_

ESGetToken<TrackerTopology, TrackerTopologyRcd> tt::ProducerSetup::getTokenTrackerTopology_
private

Definition at line 32 of file ProducerSetup.cc.

Referenced by produce(), and ProducerSetup().

◆ getTokenTTStubAlgorithm_

ESGetToken<StubAlgorithm, TTStubAlgorithmRecord> tt::ProducerSetup::getTokenTTStubAlgorithm_
private

Definition at line 29 of file ProducerSetup.cc.

Referenced by produce(), and ProducerSetup().

◆ iConfig_

const ParameterSet tt::ProducerSetup::iConfig_
private

Definition at line 28 of file ProducerSetup.cc.

Referenced by produce().