Skip to content
Snippets Groups Projects
Commit 349bef3b authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'attrList.TrigT1CaloCondSvc-20200229' into 'master'

TrigT1CaloCondSvc: Avoid AttributeList copies.

See merge request atlas/athena!30748
parents 978e34d5 e5c2a2a0
No related branches found
No related tags found
No related merge requests found
// -*- 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
*/
#ifndef TRIGT1CALOCONDSVC_L1CALOCONDSVC_ICC
......@@ -24,7 +24,7 @@ StatusCode L1CaloCondSvc::store(const T*& pobj, const std::string& key, const st
ATH_MSG_VERBOSE( "*** L1CaloCondSvc::store() ***" );
ATH_MSG_VERBOSE(key <<" "<< folder <<" "<< tag );
// create persitent object (either AthenaAttributeList or CondAttrListCollection) from the transient one
// create persistent object (either AthenaAttributeList or CondAttrListCollection) from the transient one
// the new object is not registered in the TDS
ATH_MSG_VERBOSE( "*** pobj->makePersistent() ***" );
DataObject* newConditions = pobj->makePersistent();
......@@ -72,7 +72,7 @@ StatusCode L1CaloCondSvc::store(const T*& pobj, const std::string& key, const st
CondAttrListCollection::const_iterator it_attrList = attrListCollection->begin();
for(;it_attrList!=attrListCollection->end();++it_attrList) {
CondAttrListCollection::ChanNum channelNumber = it_attrList->first;
CondAttrListCollection::AttributeList attrList = it_attrList->second;
const CondAttrListCollection::AttributeList& attrList = it_attrList->second;
newAttrListCollection->add(channelNumber, attrList);
newAttrListCollection->add(channelNumber, range);
......@@ -104,14 +104,15 @@ StatusCode L1CaloCondSvc::store(const T*& pobj, const std::string& key, const st
CondAttrListCollection::const_iterator it_attrList = attrListCollection->begin();
for(;it_attrList!=attrListCollection->end();++it_attrList) {
CondAttrListCollection::ChanNum channelNumber = it_attrList->first;
CondAttrListCollection::AttributeList attrList = it_attrList->second;
const CondAttrListCollection::AttributeList& attrList = it_attrList->second;
CondAttrListCollection::const_iterator it_coolAttrList = pConstCOOLCondAttrListCollection->chanAttrListPair(channelNumber);
if(it_coolAttrList!=pConstCOOLCondAttrListCollection->end()) {
// a corresponding channel is already defined in the COOL folder
// the new attributes are merged with the old ones
//CondAttrListCollection::AttributeList* coolAttrList = new CondAttrListCollection::AttributeList(it_coolAttrList->second);
CondAttrListCollection::AttributeList coolAttrList(it_coolAttrList->second);
CondAttrListCollection::AttributeList coolAttrList;
coolAttrList.merge(it_coolAttrList->second);
coolAttrList.merge(attrList);
mergedAttrListCollection->add(channelNumber, coolAttrList);
......
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