Skip to content
Snippets Groups Projects
Commit 8e0cab5a authored by scott snyder's avatar scott snyder Committed by scott snyder
Browse files

xAODCore: Fix thread-safety issues.

The static accessor objects declared in the xAODCore macros
should be const.  Avoids warnings from the thread-safety checker.
parent 65b6536d
9 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!28528Revert 63f845ae,!27054Atr20369 210,!26342Monopole: Handle fractionally charged particles,!20530xAODCore: Fix thread-safety issues.
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
// $Id: AuxStoreAccessorMacros.h 633587 2014-12-04 09:09:41Z ssnyder $
......@@ -36,11 +36,11 @@
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, \
SETTER) \
TYPE CL::NAME() const { \
static Accessor< TYPE > acc( #NAME ); \
static const Accessor< TYPE > acc( #NAME ); \
return acc( *this ); \
} \
void CL::SETTER( TYPE value ) { \
static Accessor< TYPE > acc( #NAME ); \
static const Accessor< TYPE > acc( #NAME ); \
acc( *this ) = value; \
return; \
}
......@@ -58,7 +58,7 @@
///
#define AUXSTORE_PRIMITIVE_GETTER(CL, TYPE, NAME ) \
TYPE CL::NAME() const { \
static Accessor< TYPE > acc( #NAME ); \
static const Accessor< TYPE > acc( #NAME ); \
return acc( *this ); \
}
......@@ -76,11 +76,11 @@
///
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER) \
const TYPE& CL::NAME() const { \
static Accessor< TYPE > acc( #NAME ); \
static const Accessor< TYPE > acc( #NAME ); \
return acc( *this ); \
} \
void CL::SETTER( const TYPE& value ) { \
static Accessor< TYPE > acc( #NAME ); \
static const Accessor< TYPE > acc( #NAME ); \
acc( *this ) = value; \
return; \
}
......@@ -103,7 +103,7 @@
#else
# define AUXSTORE_OBJECT_MOVE(CL, TYPE, NAME, SETTER) \
void CL::SETTER( typename SG::AuxDataTraits<TYPE>::element_type&& value ) { \
static Accessor< TYPE > acc( #NAME ); \
static const Accessor< TYPE > acc( #NAME ); \
acc( *this ) = std::move(value); \
return; \
}
......@@ -122,7 +122,7 @@
///
#define AUXSTORE_OBJECT_GETTER(CL, TYPE, NAME ) \
const TYPE& CL::NAME() const { \
static Accessor< TYPE > acc( #NAME ); \
static const Accessor< TYPE > acc( #NAME ); \
return acc( *this ); \
}
......@@ -143,7 +143,7 @@
#define AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(CL, PERSTYPE, TRANSTYPE, \
NAME) \
TRANSTYPE CL::NAME() const { \
static Accessor< PERSTYPE > acc( #NAME ); \
static const Accessor< PERSTYPE > acc( #NAME ); \
return static_cast< TRANSTYPE >( acc( *this ) ); \
}
......@@ -164,7 +164,7 @@
#define AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(CL, PERSTYPE, TRANSTYPE, \
NAME, SETTER) \
void CL::SETTER( TRANSTYPE value ) { \
static Accessor< PERSTYPE > acc( #NAME ); \
static const Accessor< PERSTYPE > acc( #NAME ); \
acc( *this ) = static_cast< PERSTYPE >( value ); \
return; \
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment