Skip to content

Commit

Permalink
Merge pull request #36572 from bsunanda/Run3-gex105C
Browse files Browse the repository at this point in the history
Run3-gex105C Use ESGetToken in Geometry/CMSCommonData
  • Loading branch information
cmsbuild committed Dec 23, 2021
2 parents a4409ae + 0ab6fdb commit ba2a4cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Geometry/CMSCommonData/test/DDFilteredViewAnalyzer.cc
Expand Up @@ -21,6 +21,7 @@ class DDFilteredViewAnalyzer : public edm::one::EDAnalyzer<> {
std::string m_value;
bool m_shouldPrint;
DDCompOp m_comp;
edm::ESGetToken<DDCompactView, IdealGeometryRecord> ddToken_;
};

DDFilteredViewAnalyzer::DDFilteredViewAnalyzer(const edm::ParameterSet& pset) {
Expand All @@ -33,11 +34,11 @@ DDFilteredViewAnalyzer::DDFilteredViewAnalyzer(const edm::ParameterSet& pset) {
} else {
m_comp = DDCompOp::equals;
}
ddToken_ = esConsumes<DDCompactView, IdealGeometryRecord>();
}

void DDFilteredViewAnalyzer::analyze(const edm::Event&, const edm::EventSetup& iSetup) {
edm::ESTransientHandle<DDCompactView> cpv;
iSetup.get<IdealGeometryRecord>().get(cpv);
edm::ESTransientHandle<DDCompactView> cpv = iSetup.getTransientHandle(ddToken_);

DDValue val(m_attribute, m_value, 0.0);
DDSpecificsFilter filter;
Expand Down

0 comments on commit ba2a4cd

Please sign in to comment.