Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
India Bhalla-Ladd
athena
Commits
e5c2a2a0
Commit
e5c2a2a0
authored
5 years ago
by
scott snyder
Committed by
scott snyder
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
TrigT1CaloCondSvc: Avoid AttributeList copies.
Copying an AttributeList is not thread-safe. Avoid it.
parent
a9778acd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Trigger/TrigT1/TrigT1CaloCondSvc/TrigT1CaloCondSvc/L1CaloCondSvc.icc
+6
-5
6 additions, 5 deletions
...gT1/TrigT1CaloCondSvc/TrigT1CaloCondSvc/L1CaloCondSvc.icc
with
6 additions
and
5 deletions
Trigger/TrigT1/TrigT1CaloCondSvc/TrigT1CaloCondSvc/L1CaloCondSvc.icc
+
6
−
5
View file @
e5c2a2a0
// -*- C++ -*-
/*
Copyright (C) 2002-20
19
CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-20
20
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 persi
s
tent 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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment