CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
MuonOffsetESProducer Class Reference
Inheritance diagram for MuonOffsetESProducer:
edm::ESProducer edm::ESProductResolverFactoryProducer edm::eventsetup::ESProductResolverProvider

Public Types

using ReturnType = std::unique_ptr< MuonOffsetMap >
 

Public Member Functions

 MuonOffsetESProducer (const edm::ParameterSet &)
 
ReturnType produce (const IdealGeometryRecord &)
 
- 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< cms::DDCompactView, IdealGeometryRecordcpvTokenDD4hep_
 
edm::ESGetToken< DDCompactView, IdealGeometryRecordcpvTokenDDD_
 
const bool fromDD4hep_
 
const std::vector< std::string > names_
 

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

Description: Produce offsets and tags for Muon volume copy numbers

Implementation: The constants are defined in XML as SpecPars

Definition at line 37 of file MuonOffsetESProducer.cc.

Member Typedef Documentation

◆ ReturnType

Definition at line 41 of file MuonOffsetESProducer.cc.

Constructor & Destructor Documentation

◆ MuonOffsetESProducer()

MuonOffsetESProducer::MuonOffsetESProducer ( const edm::ParameterSet iConfig)

Definition at line 53 of file MuonOffsetESProducer.cc.

References gpuPixelDoublets::cc, cpvTokenDD4hep_, cpvTokenDDD_, fromDD4hep_, and edm::ESProducer::setWhatProduced().

54  : fromDD4hep_(iConfig.getParameter<bool>("fromDD4hep")),
55  names_(iConfig.getParameter<std::vector<std::string>>("names")) {
56  auto cc = setWhatProduced(this);
57  if (fromDD4hep_) {
59  } else {
61  }
62 #ifdef EDM_ML_DEBUG
63  edm::LogVerbatim("MuonGeom") << "MuonOffsetESProducer::MuonOffsetESProducer called with dd4hep: " << fromDD4hep_;
64 #endif
65 }
Log< level::Info, true > LogVerbatim
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4hep_
const std::vector< std::string > names_

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 67 of file MuonOffsetESProducer.cc.

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

67  {
69  std::vector<std::string> names = {"MuonCommonNumbering",
70  "MuonBarrel",
71  "MuonEndcap",
72  "MuonBarrelWheels",
73  "MuonBarrelStation1",
74  "MuonBarrelStation2",
75  "MuonBarrelStation3",
76  "MuonBarrelStation4",
77  "MuonBarrelSuperLayer",
78  "MuonBarrelLayer",
79  "MuonBarrelWire",
80  "MuonRpcPlane1I",
81  "MuonRpcPlane1O",
82  "MuonRpcPlane2I",
83  "MuonRpcPlane2O",
84  "MuonRpcPlane3S",
85  "MuonRpcPlane4",
86  "MuonRpcChamberLeft",
87  "MuonRpcChamberMiddle",
88  "MuonRpcChamberRight",
89  "MuonRpcEndcap1",
90  "MuonRpcEndcap2",
91  "MuonRpcEndcap3",
92  "MuonRpcEndcap4",
93  "MuonRpcEndcapSector",
94  "MuonRpcEndcapChamberB1",
95  "MuonRpcEndcapChamberB2",
96  "MuonRpcEndcapChamberB3",
97  "MuonRpcEndcapChamberC1",
98  "MuonRpcEndcapChamberC2",
99  "MuonRpcEndcapChamberC3",
100  "MuonRpcEndcapChamberE1",
101  "MuonRpcEndcapChamberE2",
102  "MuonRpcEndcapChamberE3",
103  "MuonRpcEndcapChamberF1",
104  "MuonRpcEndcapChamberF2",
105  "MuonRpcEndcapChamberF3",
106  "MuonEndcapStation1",
107  "MuonEndcapStation2",
108  "MuonEndcapStation3",
109  "MuonEndcapStation4",
110  "MuonEndcapSubrings",
111  "MuonEndcapSectors",
112  "MuonEndcapLayers",
113  "MuonEndcapRing1",
114  "MuonEndcapRing2",
115  "MuonEndcapRing3",
116  "MuonEndcapRingA",
117  "MuonGEMEndcap",
118  "MuonGEMSector",
119  "MuonGEMChamber"};
120  desc.add<bool>("fromDD4hep", false);
121  desc.add<std::vector<std::string>>("names", names);
122  descriptions.add("muonOffsetESProducer", desc);
123 }
const std::string names[nVars_]
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

MuonOffsetESProducer::ReturnType MuonOffsetESProducer::produce ( const IdealGeometryRecord iRecord)

Definition at line 125 of file MuonOffsetESProducer.cc.

References cpvTokenDD4hep_, cpvTokenDDD_, fromDD4hep_, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getTransientHandle(), and names_.

125  {
126 #ifdef EDM_ML_DEBUG
127  edm::LogVerbatim("MuonGeom") << "MuonOffsetESProducer::produce(const IdealGeometryRecord& iRecord)";
128 #endif
129 
130  auto ptp = std::make_unique<MuonOffsetMap>();
131  MuonOffsetFromDD builder(names_);
132 
133  if (fromDD4hep_) {
134 #ifdef EDM_ML_DEBUG
135  edm::LogVerbatim("MuonGeom") << "MuonOffsetESProducer::Try to access cms::DDCompactView";
136 #endif
138  builder.build(&(*cpv), *ptp);
139  } else {
140 #ifdef EDM_ML_DEBUG
141  edm::LogVerbatim("MuonGeom") << "MuonOffsetESProducer::Try to access DDCompactView";
142 #endif
144  builder.build(&(*cpv), *ptp);
145  }
146  return ptp;
147 }
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
Log< level::Info, true > LogVerbatim
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4hep_
const std::vector< std::string > names_

Member Data Documentation

◆ cpvTokenDD4hep_

edm::ESGetToken<cms::DDCompactView, IdealGeometryRecord> MuonOffsetESProducer::cpvTokenDD4hep_
private

Definition at line 50 of file MuonOffsetESProducer.cc.

Referenced by MuonOffsetESProducer(), and produce().

◆ cpvTokenDDD_

edm::ESGetToken<DDCompactView, IdealGeometryRecord> MuonOffsetESProducer::cpvTokenDDD_
private

Definition at line 49 of file MuonOffsetESProducer.cc.

Referenced by MuonOffsetESProducer(), and produce().

◆ fromDD4hep_

const bool MuonOffsetESProducer::fromDD4hep_
private

Definition at line 47 of file MuonOffsetESProducer.cc.

Referenced by MuonOffsetESProducer(), and produce().

◆ names_

const std::vector<std::string> MuonOffsetESProducer::names_
private

Definition at line 48 of file MuonOffsetESProducer.cc.

Referenced by produce().