From 1fe90bfff28d2a496210fdbe07244e4da34a8c08 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Wed, 7 May 2014 11:30:34 -0500 Subject: [PATCH 1/2] Make mutable in EventSetupRecord atomic The transient access bool is now atomic since multiple threads could attempt to change it. --- FWCore/Framework/interface/EventSetupRecord.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FWCore/Framework/interface/EventSetupRecord.h b/FWCore/Framework/interface/EventSetupRecord.h index 291bea2ca4e18..43ae60f5d9992 100644 --- a/FWCore/Framework/interface/EventSetupRecord.h +++ b/FWCore/Framework/interface/EventSetupRecord.h @@ -57,6 +57,7 @@ using the 'setEventSetup' and 'clearEventSetup' functions. // system include files #include #include +#include // forward declarations namespace cms { @@ -212,7 +213,7 @@ namespace edm { std::map proxies_ ; EventSetup const* eventSetup_; unsigned long long cacheIdentifier_; - mutable bool transientAccessRequested_; + mutable std::atomic transientAccessRequested_; }; } } From 3c362c7c407abe4aee1cba81c563439abc423971 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Thu, 8 May 2014 17:58:36 +0200 Subject: [PATCH 2/2] Avoid having EventSetupRecord begin parsed by ROOT The EventSetupRecord now uses and std::atomic which is unparseable by ROOT. Changed cases where ROOT parsed the classes to use forward declarations instead. This did require adding the missing include to a source file. --- CondFormats/SiPixelObjects/interface/SiPixelQuality.h | 5 ++++- CondTools/SiPixel/test/SiPixelBadModuleReader.cc | 1 + DPGAnalysis/SiStripTools/interface/Multiplicities.h | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CondFormats/SiPixelObjects/interface/SiPixelQuality.h b/CondFormats/SiPixelObjects/interface/SiPixelQuality.h index 4ceff118f51f9..931cf86051fe9 100644 --- a/CondFormats/SiPixelObjects/interface/SiPixelQuality.h +++ b/CondFormats/SiPixelObjects/interface/SiPixelQuality.h @@ -14,13 +14,16 @@ #include "DataFormats/DetId/interface/DetId.h" #include "DataFormats/GeometryVector/interface/LocalPoint.h" #include "CondFormats/SiPixelObjects/interface/GlobalPixel.h" -#include "CondFormats/DataRecord/interface/SiPixelFedCablingMapRcd.h" #include "CondFormats/SiPixelObjects/interface/SiPixelFedCablingMap.h" #include "CondFormats/SiPixelObjects/interface/SiPixelFedCabling.h" #include "CondFormats/SiPixelObjects/interface/PixelROC.h" #include "CondFormats/SiPixelObjects/interface/LocalPixel.h" #include "CondFormats/SiStripObjects/interface/SiStripDetVOff.h" +namespace edm { + class EventSetup; +} + class TrackerGeometry; class SiPixelQuality { diff --git a/CondTools/SiPixel/test/SiPixelBadModuleReader.cc b/CondTools/SiPixel/test/SiPixelBadModuleReader.cc index 8d5d098044680..6dad5722e2208 100644 --- a/CondTools/SiPixel/test/SiPixelBadModuleReader.cc +++ b/CondTools/SiPixel/test/SiPixelBadModuleReader.cc @@ -1,6 +1,7 @@ #include "CondFormats/SiPixelObjects/interface/SiPixelQuality.h" #include "CondFormats/DataRecord/interface/SiPixelQualityFromDbRcd.h" #include "CondFormats/DataRecord/interface/SiPixelQualityRcd.h" +#include "CondFormats/DataRecord/interface/SiPixelFedCablingMapRcd.h" #include "CondFormats/SiPixelObjects/interface/SiPixelFedCablingMap.h" #include "CondTools/SiPixel/test/SiPixelBadModuleReader.h" #include "DataFormats/DetId/interface/DetId.h" diff --git a/DPGAnalysis/SiStripTools/interface/Multiplicities.h b/DPGAnalysis/SiStripTools/interface/Multiplicities.h index a114925719740..ba2fffc7aaa24 100644 --- a/DPGAnalysis/SiStripTools/interface/Multiplicities.h +++ b/DPGAnalysis/SiStripTools/interface/Multiplicities.h @@ -6,6 +6,7 @@ #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/Framework/interface/ConsumesCollector.h" +#include "CalibTracker/Records/interface/SiStripQualityRcd.h" #endif #include "DataFormats/Common/interface/DetSetVector.h" @@ -22,8 +23,10 @@ #include "DataFormats/Common/interface/Handle.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "CalibFormats/SiStripObjects/interface/SiStripQuality.h" -#include "CalibTracker/Records/interface/SiStripQualityRcd.h" +namespace edm { + class EventSetup; +}; #include