From b9e1929c5e8b0269eef89c0c4feaa1bbb8712f58 Mon Sep 17 00:00:00 2001 From: Marco Musich Date: Wed, 29 Oct 2014 17:28:59 +0100 Subject: [PATCH 1/2] Fixing overdoing of EventSetup pointer initialization --- .../OfflineValidation/plugins/TrackerOfflineValidation.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Alignment/OfflineValidation/plugins/TrackerOfflineValidation.cc b/Alignment/OfflineValidation/plugins/TrackerOfflineValidation.cc index a10948e98818f..e4fc817489f87 100644 --- a/Alignment/OfflineValidation/plugins/TrackerOfflineValidation.cc +++ b/Alignment/OfflineValidation/plugins/TrackerOfflineValidation.cc @@ -382,7 +382,9 @@ TrackerOfflineValidation::~TrackerOfflineValidation() void TrackerOfflineValidation::checkBookHists(const edm::EventSetup& es) { - lastSetup_ = &es; + if(lastSetup_==nullptr){ + lastSetup_ = &es; + } es.get().get( tkGeom_ ); const TrackerGeometry *newBareTkGeomPtr = &(*tkGeom_); if (newBareTkGeomPtr == bareTkGeomPtr_) return; // already booked hists, nothing changed From 1b280fffad9f11e1a1cf676b078ec49d99e41b7f Mon Sep 17 00:00:00 2001 From: Marco Musich Date: Tue, 4 Nov 2014 20:16:31 +0100 Subject: [PATCH 2/2] reverting commits b9e1929c5e8b0269eef89c0c4feaa1bbb8712f58 and 078138b30daa90abfea2e7eb7538aed987e9e7e1 Reverting commits regarding unsafe treatment of EventSetup --- .../OfflineValidation/plugins/TrackerOfflineValidation.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/Alignment/OfflineValidation/plugins/TrackerOfflineValidation.cc b/Alignment/OfflineValidation/plugins/TrackerOfflineValidation.cc index e4fc817489f87..af17c9dd50655 100644 --- a/Alignment/OfflineValidation/plugins/TrackerOfflineValidation.cc +++ b/Alignment/OfflineValidation/plugins/TrackerOfflineValidation.cc @@ -382,9 +382,6 @@ TrackerOfflineValidation::~TrackerOfflineValidation() void TrackerOfflineValidation::checkBookHists(const edm::EventSetup& es) { - if(lastSetup_==nullptr){ - lastSetup_ = &es; - } es.get().get( tkGeom_ ); const TrackerGeometry *newBareTkGeomPtr = &(*tkGeom_); if (newBareTkGeomPtr == bareTkGeomPtr_) return; // already booked hists, nothing changed