From d65073f403e3c5e10701e4c37439c4b0e8e44516 Mon Sep 17 00:00:00 2001 From: mmusich Date: Sat, 10 Jun 2023 10:37:21 +0200 Subject: [PATCH] re-work AlignmentStats in order to comply with deleted TrackerGeometry copy-constructor --- Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.cc | 4 ++-- Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.cc index f4b14382b0bd5..0e707d7fc6d6e 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.cc @@ -88,7 +88,7 @@ void AlignmentStats::beginJob() { // const edm::EventSetup &iSetup void AlignmentStats::analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) { //load list of detunits needed then in endJob if (!trackerGeometry_) { - trackerGeometry_ = std::make_unique(iSetup.getData(esTokenTkGeo_)); + trackerGeometry_ = &iSetup.getData(esTokenTkGeo_); } if (!trackerTopology_) { @@ -308,7 +308,7 @@ void AlignmentStats::endJob() { */ std::unique_ptr theAliTracker = - std::make_unique(trackerGeometry_.get(), trackerTopology_.get()); + std::make_unique(trackerGeometry_, trackerTopology_.get()); const auto &Detunitslist = theAliTracker->deepComponents(); int ndetunits = Detunitslist.size(); edm::LogInfo("AlignmentStats") << "Number of DetUnits in the AlignableTracker: " << ndetunits; diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.h b/Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.h index 2cc85a1828a74..495693bc0845b 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.h +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.h @@ -73,7 +73,7 @@ class AlignmentStats : public edm::one::EDAnalyzer<> { DetHitMap overlapmap_; std::unique_ptr trackerTopology_; - std::unique_ptr trackerGeometry_; + const TrackerGeometry *trackerGeometry_; }; #endif