CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
IdealGeometryRecord
cpvToken_
 
edm::ESGetToken
< cms::DDCompactView,
IdealGeometryRecord
dd4hepcpvToken_
 
bool fromDD4hep_
 
bool fromDDD_
 
edm::ESGetToken
< MuonGeometryConstants,
IdealGeometryRecord
mdcToken_
 
edm::ESGetToken
< RecoIdealGeometry,
ME0RecoGeometryRcd
rigme0Token_
 

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 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={})
 
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 33 of file ME0GeometryESModule.cc.

Constructor & Destructor Documentation

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

Definition at line 51 of file ME0GeometryESModule.cc.

References cpvToken_, dd4hepcpvToken_, fromDD4hep_, fromDDD_, edm::ParameterSet::getParameter(), mdcToken_, 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:163
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > dd4hepcpvToken_
edm::ESGetToken< RecoIdealGeometry, ME0RecoGeometryRcd > rigme0Token_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESGetToken< MuonGeometryConstants, IdealGeometryRecord > mdcToken_

Member Function Documentation

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

Definition at line 67 of file ME0GeometryESModule.cc.

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

67  {
69  desc.add<bool>("fromDDD", true);
70  desc.add<bool>("fromDD4hep", false);
71  descriptions.add("me0Geometry", desc);
72 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
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_, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getTransientHandle(), mdcToken_, 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)
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvToken_
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > dd4hepcpvToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< RecoIdealGeometry, ME0RecoGeometryRcd > rigme0Token_
ME0Geometry * build(const RecoIdealGeometry &rgeo)
edm::ESGetToken< MuonGeometryConstants, IdealGeometryRecord > mdcToken_

Member Data Documentation

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

Definition at line 42 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

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

Definition at line 44 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

bool ME0GeometryESModule::fromDD4hep_
private

Definition at line 48 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

bool ME0GeometryESModule::fromDDD_
private

Definition at line 47 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

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

Definition at line 43 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().

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

Definition at line 45 of file ME0GeometryESModule.cc.

Referenced by ME0GeometryESModule(), and produce().