Commit fb4b2fc6 authored by scott snyder's avatar scott snyder Committed by scott snyder
Browse files

TileConditions: Avoid copying AttributeList.

Copying a coral::AttributeList is not thread-safe.
Change AthenaAttributeList::coralList() to return a reference
rather than making a copy.

Disable thread-safety checking for the unit test (to prepare for adding
warnings about unsafe uses of AttributeList).
parent e5bf4809
//Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// Tile includes
......@@ -134,7 +134,7 @@ StatusCode TileDCSCondAlg::execute(const EventContext& ctx) const {
if (m_readHV) {
SG::ReadCondHandle<CondAttrListCollection> hv(m_hvKey, ctx);
for (const CondAttrListCollection::ChanAttrListPair chanAttrListPair : **hv) {
for (const CondAttrListCollection::ChanAttrListPair& chanAttrListPair : **hv) {
const CondAttrListCollection::ChanNum coolChannel = chanAttrListPair.first;
......@@ -173,7 +173,7 @@ StatusCode TileDCSCondAlg::execute(const EventContext& ctx) const {
if (m_readHVSet) {
SG::ReadCondHandle<CondAttrListCollection> hvSet(m_hvSetKey, ctx);
for (const CondAttrListCollection::ChanAttrListPair chanAttrListPair : **hvSet) {
for (const CondAttrListCollection::ChanAttrListPair& chanAttrListPair : **hvSet) {
const CondAttrListCollection::ChanNum coolChannel = chanAttrListPair.first;
......@@ -218,7 +218,7 @@ StatusCode TileDCSCondAlg::execute(const EventContext& ctx) const {
if (m_readStates) {
SG::ReadCondHandle<CondAttrListCollection> states(m_statesKey, ctx);
for (const CondAttrListCollection::ChanAttrListPair chanAttrListPair : **states) {
for (const CondAttrListCollection::ChanAttrListPair& chanAttrListPair : **states) {
CondAttrListCollection::ChanNum coolChannel = chanAttrListPair.first;
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#undef NDEBUG
#include "CxxUtils/checker_macros.h"
ATLAS_NO_CHECK_FILE_THREAD_SAFETY;
#include "TileConditions/TileDCSState.h"
#include "TileConditions/TileCalibData.h"
#include "../src/TileDCSCondAlg.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment