CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
RPCGeometryESModule Class Reference

#include <RPCGeometryESModule.h>

Inheritance diagram for RPCGeometryESModule:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

std::unique_ptr< RPCGeometryproduce (const MuonGeometryRecord &record)
 
 RPCGeometryESModule (const edm::ParameterSet &p)
 
 ~RPCGeometryESModule () override=default
 
- 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)
 

Private Attributes

const bool comp11_
 
edm::ESGetToken< cms::MuonNumbering, MuonNumberingRecorddd4hepConstantsToken_
 
edm::ESGetToken< MuonDDDConstants, MuonNumberingRecorddddConstantsToken_
 
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecordidealDD4hepGeomToken_
 
edm::ESGetToken< DDCompactView, IdealGeometryRecordidealGeomToken_
 
edm::ESGetToken< RecoIdealGeometry, RPCRecoGeometryRcdrecoIdealToken_
 
const bool useDD4hep_
 
const bool useDDD_
 

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={})
 
- 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 30 of file RPCGeometryESModule.h.

Constructor & Destructor Documentation

RPCGeometryESModule::RPCGeometryESModule ( const edm::ParameterSet p)

Definition at line 31 of file RPCGeometryESModule.cc.

References dd4hepConstantsToken_, dddConstantsToken_, edm::ParameterSet::getUntrackedParameter(), idealDD4hepGeomToken_, idealGeomToken_, AlCaHLTBitMon_ParallelJobs::p, recoIdealToken_, edm::ESProducer::setWhatProduced(), useDD4hep_, and useDDD_.

32  : comp11_{p.getUntrackedParameter<bool>("compatibiltyWith11", true)},
33  useDDD_{p.getUntrackedParameter<bool>("useDDD", true)},
34  useDD4hep_{p.getUntrackedParameter<bool>("useDD4hep", false)} {
35  auto cc = setWhatProduced(this);
36 
37  const edm::ESInputTag kEmptyTag;
38  if (useDDD_) {
39  idealGeomToken_ = cc.consumesFrom<DDCompactView, IdealGeometryRecord>(kEmptyTag);
40  dddConstantsToken_ = cc.consumesFrom<MuonDDDConstants, MuonNumberingRecord>(kEmptyTag);
41  } else if (useDD4hep_) {
42  idealDD4hepGeomToken_ = cc.consumesFrom<cms::DDCompactView, IdealGeometryRecord>(kEmptyTag);
43  dd4hepConstantsToken_ = cc.consumesFrom<cms::MuonNumbering, MuonNumberingRecord>(kEmptyTag);
44  } else {
45  recoIdealToken_ = cc.consumesFrom<RecoIdealGeometry, RPCRecoGeometryRcd>(kEmptyTag);
46  }
47 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< DDCompactView, IdealGeometryRecord > idealGeomToken_
edm::ESGetToken< MuonDDDConstants, MuonNumberingRecord > dddConstantsToken_
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
edm::ESGetToken< RecoIdealGeometry, RPCRecoGeometryRcd > recoIdealToken_
edm::ESGetToken< cms::MuonNumbering, MuonNumberingRecord > dd4hepConstantsToken_
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > idealDD4hepGeomToken_
RPCGeometryESModule::~RPCGeometryESModule ( )
overridedefault

Member Function Documentation

std::unique_ptr< RPCGeometry > RPCGeometryESModule::produce ( const MuonGeometryRecord record)

Definition at line 49 of file RPCGeometryESModule.cc.

References RPCGeometryBuilderFromCondDB::build(), RPCGeometryBuilderFromDDD::build(), comp11_, dd4hepConstantsToken_, dddConstantsToken_, DEFINE_FWK_EVENTSETUP_MODULE, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getTransientHandle(), idealDD4hepGeomToken_, idealGeomToken_, recoIdealToken_, useDD4hep_, and useDDD_.

49  {
50  if (useDDD_) {
52 
53  auto const& mdc = record.get(dddConstantsToken_);
55  return std::unique_ptr<RPCGeometry>(builder.build(&(*cpv), mdc));
56  } else if (useDD4hep_) {
58 
59  auto const& mdc = record.get(dd4hepConstantsToken_);
61  return std::unique_ptr<RPCGeometry>(builder.build(&(*cpv), mdc));
62  } else {
63  auto const& rigrpc = record.get(recoIdealToken_);
65  return std::unique_ptr<RPCGeometry>(builder.build(rigrpc));
66  }
67 }
edm::ESGetToken< DDCompactView, IdealGeometryRecord > idealGeomToken_
edm::ESGetToken< MuonDDDConstants, MuonNumberingRecord > dddConstantsToken_
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< RecoIdealGeometry, RPCRecoGeometryRcd > recoIdealToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< cms::MuonNumbering, MuonNumberingRecord > dd4hepConstantsToken_
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > idealDD4hepGeomToken_

Member Data Documentation

const bool RPCGeometryESModule::comp11_
private

Definition at line 47 of file RPCGeometryESModule.h.

Referenced by produce().

edm::ESGetToken<cms::MuonNumbering, MuonNumberingRecord> RPCGeometryESModule::dd4hepConstantsToken_
private

Definition at line 42 of file RPCGeometryESModule.h.

Referenced by produce(), and RPCGeometryESModule().

edm::ESGetToken<MuonDDDConstants, MuonNumberingRecord> RPCGeometryESModule::dddConstantsToken_
private

Definition at line 39 of file RPCGeometryESModule.h.

Referenced by produce(), and RPCGeometryESModule().

edm::ESGetToken<cms::DDCompactView, IdealGeometryRecord> RPCGeometryESModule::idealDD4hepGeomToken_
private

Definition at line 41 of file RPCGeometryESModule.h.

Referenced by produce(), and RPCGeometryESModule().

edm::ESGetToken<DDCompactView, IdealGeometryRecord> RPCGeometryESModule::idealGeomToken_
private

Definition at line 38 of file RPCGeometryESModule.h.

Referenced by produce(), and RPCGeometryESModule().

edm::ESGetToken<RecoIdealGeometry, RPCRecoGeometryRcd> RPCGeometryESModule::recoIdealToken_
private

Definition at line 45 of file RPCGeometryESModule.h.

Referenced by produce(), and RPCGeometryESModule().

const bool RPCGeometryESModule::useDD4hep_
private

Definition at line 49 of file RPCGeometryESModule.h.

Referenced by produce(), and RPCGeometryESModule().

const bool RPCGeometryESModule::useDDD_
private

Definition at line 48 of file RPCGeometryESModule.h.

Referenced by produce(), and RPCGeometryESModule().