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::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

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
 
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< cms::DDCompactView, IdealGeometryRecordcpvTokenDD4Hep_
 
edm::ESGetToken< DDCompactView, IdealGeometryRecordcpvTokenDDD_
 
const bool fromDD4Hep_
 
const std::vector< std::string > names_
 

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

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.

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 }

References cpvTokenDD4Hep_, cpvTokenDDD_, fromDD4Hep_, and edm::ESProducer::setWhatProduced().

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 67 of file MuonOffsetESProducer.cc.

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 }

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

◆ produce()

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

Definition at line 125 of file MuonOffsetESProducer.cc.

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 }

References MuonOffsetFromDD::build(), cpvTokenDD4Hep_, cpvTokenDDD_, fromDD4Hep_, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getTransientHandle(), and 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().

edm::ESInputTag
Definition: ESInputTag.h:87
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:124
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
edm::eventsetup::DependentRecordImplementation::getTransientHandle
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:92
MuonOffsetESProducer::names_
const std::vector< std::string > names_
Definition: MuonOffsetESProducer.cc:48
MuonOffsetESProducer::cpvTokenDDD_
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
Definition: MuonOffsetESProducer.cc:49
MuonOffsetFromDD
Definition: MuonOffsetFromDD.h:14
cc
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
MuonOffsetESProducer::cpvTokenDD4Hep_
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4Hep_
Definition: MuonOffsetESProducer.cc:50
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
cms::DDCompactView
Definition: DDCompactView.h:31
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MuonOffsetESProducer::fromDD4Hep_
const bool fromDD4Hep_
Definition: MuonOffsetESProducer.cc:47
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25