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::ESProductResolverFactoryProducer edm::eventsetup::ESProductResolverProvider

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
 
 ESProducer (ESProducer &&)=delete
 
ESResolverIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProduceroperator= (const ESProducer &)=delete
 
ESProduceroperator= (ESProducer &&)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESResolverIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProductResolverFactoryProducer
 ESProductResolverFactoryProducer ()
 
 ESProductResolverFactoryProducer (const ESProductResolverFactoryProducer &)=delete
 
const ESProductResolverFactoryProduceroperator= (const ESProductResolverFactoryProducer &)=delete
 
 ~ESProductResolverFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
void createKeyedResolvers (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
const ComponentDescriptiondescription () const
 
 ESProductResolverProvider ()
 
 ESProductResolverProvider (const ESProductResolverProvider &)=delete
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedResolverskeyedResolvers (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const ESProductResolverProvideroperator= (const ESProductResolverProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~ESProductResolverProvider () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 
- Static Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
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::ESProductResolverFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::ESProductResolverProvider
using KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >>
 
- Protected Member Functions inherited from edm::ESProducer
ESConsumesInfoconsumesInfoPushBackNew ()
 
unsigned int consumesInfoSize () const
 
template<typename CallbackT , typename TList , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel)
 
template<typename CallbackT , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &)
 
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 TDecorator >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TDecorator &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::ESProductResolverFactoryProducer
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::ESProductResolverFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedResolversVector registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::ESProductResolverProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Definition at line 33 of file ME0GeometryESModule.cc.

Constructor & Destructor Documentation

◆ ME0GeometryESModule()

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

Definition at line 51 of file ME0GeometryESModule.cc.

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

51  {
52  fromDDD_ = p.getParameter<bool>("fromDDD");
53  fromDD4hep_ = p.getParameter<bool>("fromDD4hep");
54  auto cc = setWhatProduced(this);
55  if (fromDDD_) {
56  cpvToken_ = cc.consumes();
57  mdcToken_ = cc.consumes();
58  } else if (fromDD4hep_) {
59  dd4hepcpvToken_ = cc.consumes();
60  mdcToken_ = cc.consumes();
61  } else {
62  rigme0Token_ = cc.consumes();
63  }
64  edm::LogVerbatim("GEMGeometry") << "ME0GeometryESModule::initailized with flags " << fromDDD_ << ":" << fromDD4hep_;
65 }
Log< level::Info, true > LogVerbatim
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > dd4hepcpvToken_
edm::ESGetToken< RecoIdealGeometry, ME0RecoGeometryRcd > rigme0Token_
edm::ESGetToken< MuonGeometryConstants, IdealGeometryRecord > mdcToken_

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 67 of file ME0GeometryESModule.cc.

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

67  {
69  desc.add<bool>("fromDDD", true);
70  desc.add<bool>("fromDD4hep", false);
71  descriptions.add("me0Geometry", desc);
72 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

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

Definition at line 74 of file ME0GeometryESModule.cc.

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

74  {
75  edm::LogVerbatim("GEMGeometry") << "ME0GeometryESModule::produce with fromDDD = " << fromDDD_ << " fromDD4hep "
76  << fromDD4hep_;
77  if (fromDDD_) {
78  edm::LogVerbatim("ME0GeometryESModule") << "(0) ME0GeometryESModule - DDD ";
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("ME0GeometryESModule") << "(0) ME0GeometryESModule - DD4hep ";
86  edm::LogVerbatim("GEMGeometry") << "ME0GeometryESModule::produce :: ME0GeometryBuilder builder DD4hep";
87  auto cpv = record.getTransientHandle(dd4hepcpvToken_);
88  const auto& mdc = record.get(mdcToken_);
89  ME0GeometryBuilder builder;
90  return std::unique_ptr<ME0Geometry>(builder.build(cpv.product(), mdc));
91  } else {
92  edm::LogVerbatim("ME0GeometryESModule") << "(0) ME0GeometryESModule - DB ";
93  edm::LogVerbatim("GEMGeometry") << "ME0GeometryESModule::produce :: ME0GeometryBuilderFromCondDB builder";
94  const auto& rigme0 = record.get(rigme0Token_);
96  return std::unique_ptr<ME0Geometry>(builder.build(rigme0));
97  }
98 }
Log< level::Info, true > LogVerbatim
ME0Geometry * build(const DDCompactView *cview, const MuonGeometryConstants &muonConstants)
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > dd4hepcpvToken_
edm::ESGetToken< RecoIdealGeometry, ME0RecoGeometryRcd > rigme0Token_
ME0Geometry * build(const RecoIdealGeometry &rgeo)
edm::ESGetToken< MuonGeometryConstants, IdealGeometryRecord > mdcToken_

Member Data Documentation

◆ cpvToken_

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

Definition at line 42 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

◆ dd4hepcpvToken_

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

Definition at line 44 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

◆ fromDD4hep_

bool ME0GeometryESModule::fromDD4hep_
private

Definition at line 48 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

◆ fromDDD_

bool ME0GeometryESModule::fromDDD_
private

Definition at line 47 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

◆ mdcToken_

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

Definition at line 43 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

◆ rigme0Token_

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

Definition at line 45 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().