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)
 
std::unique_ptr< ME0Geometryproduce (const MuonGeometryRecord &record)
 
 ~ME0GeometryESModule () override
 
- 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 () 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

edm::ESGetToken< DDCompactView, IdealGeometryRecordcpvToken_
 
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecorddd4hepcpvToken_
 
edm::ESGetToken< cms::MuonNumbering, MuonNumberingRecorddd4hepmdcToken_
 
edm::ESGetToken< MuonGeometryConstants, IdealGeometryRecordmdcToken_
 
edm::ESGetToken< RecoIdealGeometry, ME0RecoGeometryRcdrigme0Token_
 
bool useDD4hep_
 
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 char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &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 37 of file ME0GeometryESModule.cc.

Constructor & Destructor Documentation

◆ ME0GeometryESModule()

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

Definition at line 55 of file ME0GeometryESModule.cc.

55  {
56  useDDD_ = p.getParameter<bool>("useDDD");
57  useDD4hep_ = p.getUntrackedParameter<bool>("useDD4hep", false);
58  auto cc = setWhatProduced(this);
59  if (useDDD_) {
60  cc.setConsumes(cpvToken_).setConsumes(mdcToken_);
61  } else if (useDD4hep_) {
62  cc.setConsumes(dd4hepcpvToken_).setConsumes(dd4hepmdcToken_);
63  } else {
64  cc.setConsumes(rigme0Token_);
65  }
66 }

References AlCaHLTBitMon_ParallelJobs::p.

◆ ~ME0GeometryESModule()

ME0GeometryESModule::~ME0GeometryESModule ( )
override

Definition at line 68 of file ME0GeometryESModule.cc.

68 {}

Member Function Documentation

◆ produce()

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

Definition at line 70 of file ME0GeometryESModule.cc.

70  {
71  LogTrace("ME0GeometryESModule") << "ME0GeometryESModule::produce with useDDD = " << useDDD_;
72  if (useDDD_) {
73  LogTrace("ME0GeometryESModule") << "ME0GeometryESModule::produce :: ME0GeometryBuilder builder";
74  auto cpv = record.getTransientHandle(cpvToken_);
75  const auto& mdc = record.get(mdcToken_);
76  ME0GeometryBuilder builder;
77  return std::unique_ptr<ME0Geometry>(builder.build(cpv.product(), mdc));
78  } else if (useDD4hep_) {
79  LogTrace("ME0GeometryESModule") << "ME0GeometryESModule::produce :: ME0GeometryBuilder builder DD4hep";
80  auto cpv = record.getTransientHandle(dd4hepcpvToken_);
81  const auto& mdc = record.get(dd4hepmdcToken_);
82  ME0GeometryBuilder builder;
83  return std::unique_ptr<ME0Geometry>(builder.build(cpv.product(), mdc));
84  } else {
85  LogTrace("ME0GeometryESModule") << "ME0GeometryESModule::produce :: ME0GeometryBuilderFromCondDB builder";
86  const auto& rigme0 = record.get(rigme0Token_);
88  return std::unique_ptr<ME0Geometry>(builder.build(rigme0));
89  }
90 }

References ME0GeometryBuilderFromCondDB::build(), ME0GeometryBuilder::build(), LogTrace, and GlobalPosition_Frontier_DevDB_cff::record.

Member Data Documentation

◆ cpvToken_

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

Definition at line 45 of file ME0GeometryESModule.cc.

◆ dd4hepcpvToken_

edm::ESGetToken<cms::DDCompactView, IdealGeometryRecord> ME0GeometryESModule::dd4hepcpvToken_
private

Definition at line 47 of file ME0GeometryESModule.cc.

◆ dd4hepmdcToken_

edm::ESGetToken<cms::MuonNumbering, MuonNumberingRecord> ME0GeometryESModule::dd4hepmdcToken_
private

Definition at line 48 of file ME0GeometryESModule.cc.

◆ mdcToken_

edm::ESGetToken<MuonGeometryConstants, IdealGeometryRecord> ME0GeometryESModule::mdcToken_
private

Definition at line 46 of file ME0GeometryESModule.cc.

◆ rigme0Token_

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

Definition at line 49 of file ME0GeometryESModule.cc.

◆ useDD4hep_

bool ME0GeometryESModule::useDD4hep_
private

Definition at line 52 of file ME0GeometryESModule.cc.

◆ useDDD_

bool ME0GeometryESModule::useDDD_
private

Definition at line 51 of file ME0GeometryESModule.cc.

ME0GeometryESModule::rigme0Token_
edm::ESGetToken< RecoIdealGeometry, ME0RecoGeometryRcd > rigme0Token_
Definition: ME0GeometryESModule.cc:49
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
GlobalPosition_Frontier_DevDB_cff.record
record
Definition: GlobalPosition_Frontier_DevDB_cff.py:10
ME0GeometryBuilderFromCondDB::build
ME0Geometry * build(const RecoIdealGeometry &rgeo)
Definition: ME0GeometryBuilderFromCondDB.cc:31
cc
ME0GeometryESModule::useDD4hep_
bool useDD4hep_
Definition: ME0GeometryESModule.cc:52
ME0GeometryESModule::mdcToken_
edm::ESGetToken< MuonGeometryConstants, IdealGeometryRecord > mdcToken_
Definition: ME0GeometryESModule.cc:46
ME0GeometryBuilderFromCondDB
Definition: ME0GeometryBuilderFromCondDB.h:20
ME0GeometryESModule::cpvToken_
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_
Definition: ME0GeometryESModule.cc:45
ME0GeometryBuilder
Definition: ME0GeometryBuilder.h:34
ME0GeometryBuilder::build
ME0Geometry * build(const DDCompactView *cview, const MuonGeometryConstants &muonConstants)
Definition: ME0GeometryBuilder.cc:42
ME0GeometryESModule::dd4hepcpvToken_
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > dd4hepcpvToken_
Definition: ME0GeometryESModule.cc:47
ME0GeometryESModule::useDDD_
bool useDDD_
Definition: ME0GeometryESModule.cc:51
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
ME0GeometryESModule::dd4hepmdcToken_
edm::ESGetToken< cms::MuonNumbering, MuonNumberingRecord > dd4hepmdcToken_
Definition: ME0GeometryESModule.cc:48