CMS 3D CMS Logo

List of all members | Public Member Functions | Static 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)
 
- 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)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 

Private Attributes

edm::ESGetToken< DDCompactView, IdealGeometryRecordcpvToken_
 
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecorddd4hepcpvToken_
 
bool fromDD4hep_
 
bool fromDDD_
 
edm::ESGetToken< MuonGeometryConstants, IdealGeometryRecordmdcToken_
 
edm::ESGetToken< RecoIdealGeometry, ME0RecoGeometryRcdrigme0Token_
 

Additional Inherited Members

- 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={})
 
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

Definition at line 34 of file ME0GeometryESModule.cc.

Constructor & Destructor Documentation

◆ ME0GeometryESModule()

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

Definition at line 52 of file ME0GeometryESModule.cc.

52  {
53  fromDDD_ = p.getParameter<bool>("fromDDD");
54  fromDD4hep_ = p.getParameter<bool>("fromDD4hep");
55  auto cc = setWhatProduced(this);
56  if (fromDDD_) {
57  cpvToken_ = cc.consumes();
58  mdcToken_ = cc.consumes();
59  } else if (fromDD4hep_) {
60  dd4hepcpvToken_ = cc.consumes();
61  mdcToken_ = cc.consumes();
62  } else {
63  rigme0Token_ = cc.consumes();
64  }
65  edm::LogVerbatim("GEMGeometry") << "ME0GeometryESModule::initailized with flags " << fromDDD_ << ":" << fromDD4hep_;
66 }

References cpvToken_, dd4hepcpvToken_, fromDD4hep_, fromDDD_, mdcToken_, AlCaHLTBitMon_ParallelJobs::p, rigme0Token_, and edm::ESProducer::setWhatProduced().

Member Function Documentation

◆ fillDescriptions()

void ME0GeometryESModule::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 68 of file ME0GeometryESModule.cc.

68  {
70  desc.add<bool>("fromDDD", true);
71  desc.add<bool>("fromDD4hep", false);
72  descriptions.add("me0Geometry", desc);
73 }

References edm::ConfigurationDescriptions::add(), and submitPVResolutionJobs::desc.

◆ produce()

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

Definition at line 75 of file ME0GeometryESModule.cc.

75  {
76  edm::LogVerbatim("GEMGeometry") << "ME0GeometryESModule::produce with fromDDD = " << fromDDD_ << " fromDD4hep "
77  << fromDD4hep_;
78  if (fromDDD_) {
79  edm::LogVerbatim("GEMGeometry") << "ME0GeometryESModule::produce :: ME0GeometryBuilder builder";
80  auto cpv = record.getTransientHandle(cpvToken_);
81  const auto& mdc = record.get(mdcToken_);
82  ME0GeometryBuilder builder;
83  return std::unique_ptr<ME0Geometry>(builder.build(cpv.product(), mdc));
84  } else if (fromDD4hep_) {
85  edm::LogVerbatim("GEMGeometry") << "ME0GeometryESModule::produce :: ME0GeometryBuilder builder DD4hep";
86  auto cpv = record.getTransientHandle(dd4hepcpvToken_);
87  const auto& mdc = record.get(mdcToken_);
88  ME0GeometryBuilder builder;
89  return std::unique_ptr<ME0Geometry>(builder.build(cpv.product(), mdc));
90  } else {
91  edm::LogVerbatim("GEMGeometry") << "ME0GeometryESModule::produce :: ME0GeometryBuilderFromCondDB builder";
92  const auto& rigme0 = record.get(rigme0Token_);
94  return std::unique_ptr<ME0Geometry>(builder.build(rigme0));
95  }
96 }

References ME0GeometryBuilderFromCondDB::build(), ME0GeometryBuilder::build(), cpvToken_, dd4hepcpvToken_, fromDD4hep_, fromDDD_, mdcToken_, GlobalPosition_Frontier_DevDB_cff::record, and rigme0Token_.

Member Data Documentation

◆ cpvToken_

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

Definition at line 43 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

◆ dd4hepcpvToken_

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

Definition at line 45 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

◆ fromDD4hep_

bool ME0GeometryESModule::fromDD4hep_
private

Definition at line 49 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

◆ fromDDD_

bool ME0GeometryESModule::fromDDD_
private

Definition at line 48 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

◆ mdcToken_

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

Definition at line 44 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

◆ rigme0Token_

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

Definition at line 46 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

ME0GeometryESModule::rigme0Token_
edm::ESGetToken< RecoIdealGeometry, ME0RecoGeometryRcd > rigme0Token_
Definition: ME0GeometryESModule.cc:46
ME0GeometryESModule::fromDDD_
bool fromDDD_
Definition: ME0GeometryESModule.cc:48
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ME0GeometryESModule::fromDD4hep_
bool fromDD4hep_
Definition: ME0GeometryESModule.cc:49
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
GlobalPosition_Frontier_DevDB_cff.record
record
Definition: GlobalPosition_Frontier_DevDB_cff.py:10
ME0GeometryBuilderFromCondDB::build
ME0Geometry * build(const RecoIdealGeometry &rgeo)
Definition: ME0GeometryBuilderFromCondDB.cc:31
ME0GeometryESModule::mdcToken_
edm::ESGetToken< MuonGeometryConstants, IdealGeometryRecord > mdcToken_
Definition: ME0GeometryESModule.cc:44
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
ME0GeometryBuilderFromCondDB
Definition: ME0GeometryBuilderFromCondDB.h:20
ME0GeometryESModule::cpvToken_
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_
Definition: ME0GeometryESModule.cc:43
ME0GeometryBuilder
Definition: ME0GeometryBuilder.h:31
ME0GeometryBuilder::build
ME0Geometry * build(const DDCompactView *cview, const MuonGeometryConstants &muonConstants)
Definition: ME0GeometryBuilder.cc:41
cc
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
ME0GeometryESModule::dd4hepcpvToken_
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > dd4hepcpvToken_
Definition: ME0GeometryESModule.cc:45