From f0c1a9033c4221fe66c6943348ad81355742ee51 Mon Sep 17 00:00:00 2001 From: Scott Snyder <scott.snyder@cern.ch> Date: Thu, 30 Apr 2015 22:30:00 +0200 Subject: [PATCH] Fix corruption of containers with more than one element. (xAODTriggerAthenaPool-00-00-16) * Tagging xAODTriggerAthenaPool-00-00-16. * src/xAODTriggerMenuAuxContainerCnv.cxx: Fix corruption of containers with more than one element. --- .../src/xAODTriggerMenuAuxContainerCnv.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Event/xAOD/xAODTriggerAthenaPool/src/xAODTriggerMenuAuxContainerCnv.cxx b/Event/xAOD/xAODTriggerAthenaPool/src/xAODTriggerMenuAuxContainerCnv.cxx index 282a7e92370..60e6220b92a 100644 --- a/Event/xAOD/xAODTriggerAthenaPool/src/xAODTriggerMenuAuxContainerCnv.cxx +++ b/Event/xAOD/xAODTriggerAthenaPool/src/xAODTriggerMenuAuxContainerCnv.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -// $Id: xAODTriggerMenuAuxContainerCnv.cxx 647168 2015-02-16 15:30:50Z krasznaa $ +// $Id: xAODTriggerMenuAuxContainerCnv.cxx 664264 2015-04-30 22:30:00Z ssnyder $ // System include(s): #include <stdexcept> @@ -40,13 +40,15 @@ xAODTriggerMenuAuxContainerCnv::createTransient() { xAOD::TriggerMenuAuxContainer_v1* obj = poolReadObject< xAOD::TriggerMenuAuxContainer_v1 >(); + size_t sz = obj->smk.size(); + // A little helper macro for bringing the detailed variables to the // right size: #define FIX_SIZE( NAME ) \ do { \ - if( obj->NAME.size() != 1 ) { \ - obj->NAME.resize( 1 ); \ - ATH_MSG_VERBOSE( "Fixed the size of " << #NAME << " to 1" ); \ + if( obj->NAME.size() < sz ) { \ + obj->NAME.resize( sz ); \ + ATH_MSG_VERBOSE( "Fixed the size of " << #NAME << " to " << sz ); \ } \ } while( 0 ) -- GitLab