File indexing completed on 2024-10-30 00:11:38
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include "Geometry/ForwardGeometry/plugins/ZdcTopologyEP.h"
0015 #include "Geometry/HcalCommonData/interface/HcalDDDRecConstants.h"
0016 #include "FWCore/Utilities/interface/Exception.h"
0017 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0018 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0019 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0020
0021
0022
0023 ZdcTopologyEP::ZdcTopologyEP(const edm::ParameterSet& conf)
0024 : m_hdcToken{setWhatProduced(this, &ZdcTopologyEP::produce).consumes<HcalDDDRecConstants>(edm::ESInputTag{})} {
0025 #ifdef EDM_ML_DEBUG
0026 edm::LogVerbatim("HCalGeom") << "ZdcTopologyEP::ZdcTopologyEP";
0027 #endif
0028 }
0029
0030 void ZdcTopologyEP::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0031 edm::ParameterSetDescription desc;
0032 descriptions.add("zdcTopologyEP", desc);
0033 }
0034
0035
0036 ZdcTopologyEP::ReturnType ZdcTopologyEP::produce(const HcalRecNumberingRecord& iRecord) {
0037 #ifdef EDM_ML_DEBUG
0038 edm::LogVerbatim("HCalGeom") << "ZdcTopologyEP::produce(const HcalRecNumberingRecord& iRecord)";
0039 #endif
0040 const HcalDDDRecConstants& hdc = iRecord.get(m_hdcToken);
0041
0042 #ifdef EDM_ML_DEBUG
0043 edm::LogVerbatim("HCalGeom") << "mode = " << hdc.getTopoMode();
0044 #endif
0045 ReturnType myTopo(new ZdcTopology(&hdc));
0046 return myTopo;
0047 }