CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ME0GeometryESModule Class Reference
Inheritance diagram for ME0GeometryESModule:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 ME0GeometryESModule (const edm::ParameterSet &p)
 Constructor. More...
 
std::unique_ptr< ME0Geometryproduce (const MuonGeometryRecord &record)
 Produce ME0Geometry. More...
 
 ~ME0GeometryESModule () override
 Destructor. More...
 
- 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

edm::ESGetToken< DDCompactView, IdealGeometryRecordcpvToken_
 
edm::ESGetToken< MuonDDDConstants, MuonNumberingRecordmdcToken_
 
edm::ESGetToken< RecoIdealGeometry, ME0RecoGeometryRcdrigme0Token_
 
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 29 of file ME0GeometryESModule.cc.

Constructor & Destructor Documentation

ME0GeometryESModule::ME0GeometryESModule ( const edm::ParameterSet p)

Constructor.

Definition at line 48 of file ME0GeometryESModule.cc.

References edm::ParameterSet::getParameter().

48  {
49  useDDD_ = p.getParameter<bool>("useDDD");
50  auto cc = setWhatProduced(this);
51  if (useDDD_) {
52  cc.setConsumes(cpvToken_).setConsumes(mdcToken_);
53  } else {
54  cc.setConsumes(rigme0Token_);
55  }
56 }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_
edm::ESGetToken< RecoIdealGeometry, ME0RecoGeometryRcd > rigme0Token_
edm::ESGetToken< MuonDDDConstants, MuonNumberingRecord > mdcToken_
ME0GeometryESModule::~ME0GeometryESModule ( )
override

Destructor.

Definition at line 58 of file ME0GeometryESModule.cc.

58 {}

Member Function Documentation

std::unique_ptr< ME0Geometry > ME0GeometryESModule::produce ( const MuonGeometryRecord record)

Produce ME0Geometry.

Definition at line 60 of file ME0GeometryESModule.cc.

References ME0GeometryBuilderFromDDD::build(), ME0GeometryBuilderFromCondDB::build(), DEFINE_FWK_EVENTSETUP_MODULE, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getTransientHandle(), and LogTrace.

60  {
61  LogTrace("ME0GeometryESModule") << "ME0GeometryESModule::produce with useDDD = " << useDDD_;
62 
63  if (useDDD_) {
64  LogTrace("ME0GeometryESModule") << "ME0GeometryESModule::produce :: ME0GeometryBuilderFromDDD builder";
65  auto cpv = record.getTransientHandle(cpvToken_);
66  const auto& mdc = record.get(mdcToken_);
68  return std::unique_ptr<ME0Geometry>(builder.build(cpv.product(), mdc));
69  } else {
70  LogTrace("ME0GeometryESModule") << "ME0GeometryESModule::produce :: ME0GeometryBuilderFromCondDB builder";
71  const auto& rigme0 = record.get(rigme0Token_);
73  return std::unique_ptr<ME0Geometry>(builder.build(rigme0));
74  }
75 }
ME0Geometry * build(const DDCompactView *cview, const MuonDDDConstants &muonConstants)
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< RecoIdealGeometry, ME0RecoGeometryRcd > rigme0Token_
#define LogTrace(id)
edm::ESGetToken< MuonDDDConstants, MuonNumberingRecord > mdcToken_
ME0Geometry * build(const RecoIdealGeometry &rgeo)

Member Data Documentation

edm::ESGetToken<DDCompactView, IdealGeometryRecord> ME0GeometryESModule::cpvToken_
private

Definition at line 41 of file ME0GeometryESModule.cc.

edm::ESGetToken<MuonDDDConstants, MuonNumberingRecord> ME0GeometryESModule::mdcToken_
private

Definition at line 42 of file ME0GeometryESModule.cc.

edm::ESGetToken<RecoIdealGeometry, ME0RecoGeometryRcd> ME0GeometryESModule::rigme0Token_
private

Definition at line 43 of file ME0GeometryESModule.cc.

bool ME0GeometryESModule::useDDD_
private

Definition at line 45 of file ME0GeometryESModule.cc.