Skip to content

Commit

Permalink
re-work AlignmentStats in order to comply with deleted TrackerGeometr…
Browse files Browse the repository at this point in the history
…y copy-constructor
  • Loading branch information
mmusich committed Jun 10, 2023
1 parent 410b7d1 commit d65073f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<TrackerGeometry>(iSetup.getData(esTokenTkGeo_));
trackerGeometry_ = &iSetup.getData(esTokenTkGeo_);
}

if (!trackerTopology_) {
Expand Down Expand Up @@ -308,7 +308,7 @@ void AlignmentStats::endJob() {
*/

std::unique_ptr<AlignableTracker> theAliTracker =
std::make_unique<AlignableTracker>(trackerGeometry_.get(), trackerTopology_.get());
std::make_unique<AlignableTracker>(trackerGeometry_, trackerTopology_.get());
const auto &Detunitslist = theAliTracker->deepComponents();
int ndetunits = Detunitslist.size();
edm::LogInfo("AlignmentStats") << "Number of DetUnits in the AlignableTracker: " << ndetunits;
Expand Down
2 changes: 1 addition & 1 deletion Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class AlignmentStats : public edm::one::EDAnalyzer<> {
DetHitMap overlapmap_;

std::unique_ptr<TrackerTopology> trackerTopology_;
std::unique_ptr<TrackerGeometry> trackerGeometry_;
const TrackerGeometry *trackerGeometry_;
};

#endif

0 comments on commit d65073f

Please sign in to comment.