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
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
Frank Winklmeier
athena
Commits
598477ea
Commit
598477ea
authored
1 month ago
by
Frank Winklmeier
Browse files
Options
Downloads
Patches
Plain Diff
HLTEDMCreator: pass EventContext explicitly
parent
28578712
Branches
mon_stringview
No related tags found
No related merge requests found
Pipeline
#10520653
failed
1 month ago
Stage: external
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
+8
-8
8 additions, 8 deletions
Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h
+2
-2
2 additions, 2 deletions
Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h
with
10 additions
and
10 deletions
Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
+
8
−
8
View file @
598477ea
/*
Copyright (C) 2002-202
3
CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-202
5
CERN for the benefit of the ATLAS collaboration
*/
...
...
@@ -263,7 +263,7 @@ StatusCode HLTEDMCreator::viewsMerge( ViewContainer const& views, const SG::Rea
}
StatusCode
HLTEDMCreator
::
fixLinks
()
const
{
StatusCode
HLTEDMCreator
::
fixLinks
(
EventContext
const
&
context
)
const
{
if
(
m_fixLinks
.
value
().
empty
()
)
{
ATH_MSG_DEBUG
(
"fixLinks: No collections defined for this tool"
);
return
StatusCode
::
SUCCESS
;
...
...
@@ -285,7 +285,7 @@ StatusCode HLTEDMCreator::fixLinks() const {
++
writeHandleArrayIndex
;
ATH_MSG_DEBUG
(
"Fixing links: confirm collection is there: "
<<
writeHandleKey
.
key
()
<<
", write handle array index: "
<<
writeHandleArrayIndex
);
SG
::
ReadHandle
<
xAOD
::
TrigCompositeContainer
>
readHandle
(
writeHandleKey
.
key
()
);
SG
::
ReadHandle
<
xAOD
::
TrigCompositeContainer
>
readHandle
(
writeHandleKey
.
key
()
,
context
);
if
(
not
readHandle
.
isValid
()
)
{
// object missing, this is now an error as we should have literally just created it
ATH_MSG_ERROR
(
" Collection is not present. "
<<
writeHandleKey
.
key
()
<<
" should have been created by createIfMissing."
);
return
StatusCode
::
FAILURE
;
...
...
@@ -294,8 +294,8 @@ StatusCode HLTEDMCreator::fixLinks() const {
ATH_MSG_DEBUG
(
"Collection exists with size "
<<
readHandle
->
size
()
<<
" Decision objects"
);
ATH_MSG_DEBUG
(
"Adding decorations: "
<<
m_remapLinkColKeys
.
at
(
writeHandleArrayIndex
).
key
()
<<
" and "
<<
m_remapLinkColIndices
.
at
(
writeHandleArrayIndex
).
key
()
);
SG
::
WriteDecorHandle
<
xAOD
::
TrigCompositeContainer
,
std
::
vector
<
SG
::
sgkey_t
>
>
keyDecor
(
m_remapLinkColKeys
.
at
(
writeHandleArrayIndex
)
);
SG
::
WriteDecorHandle
<
xAOD
::
TrigCompositeContainer
,
std
::
vector
<
xAOD
::
TrigComposite
::
index_type
>
>
indexDecor
(
m_remapLinkColIndices
.
at
(
writeHandleArrayIndex
)
);
SG
::
WriteDecorHandle
<
xAOD
::
TrigCompositeContainer
,
std
::
vector
<
SG
::
sgkey_t
>
>
keyDecor
(
m_remapLinkColKeys
.
at
(
writeHandleArrayIndex
)
,
context
);
SG
::
WriteDecorHandle
<
xAOD
::
TrigCompositeContainer
,
std
::
vector
<
xAOD
::
TrigComposite
::
index_type
>
>
indexDecor
(
m_remapLinkColIndices
.
at
(
writeHandleArrayIndex
)
,
context
);
// Examine each input TC
int
decisionObjectIndex
=
-
1
;
...
...
@@ -355,7 +355,7 @@ StatusCode HLTEDMCreator::createIfMissing( const EventContext& context, const Co
if
(
handles
.
views
.
empty
()
)
{
// no merging will be needed
// Note: This is correct. We are testing if we can read, and if we cannot then we write.
// What we write will either be a dummy (empty) container, or be populated from N in-View collections.
SG
::
ReadHandle
<
T
>
readHandle
(
writeHandleKey
.
key
()
);
SG
::
ReadHandle
<
T
>
readHandle
(
writeHandleKey
.
key
()
,
context
);
if
(
readHandle
.
isValid
()
)
{
ATH_MSG_VERBOSE
(
writeHandleKey
.
key
()
<<
" is already present"
);
generator
.
create
(
false
,
false
);
...
...
@@ -365,7 +365,7 @@ StatusCode HLTEDMCreator::createIfMissing( const EventContext& context, const Co
// The TriggerEDMDeserialiserAlg will already have created a DataLink to the Aux store
// for the interface container. Now we just need to create an empty Aux store.
if
constexpr
(
!
std
::
is_void_v
<
STORE
>
)
{
SG
::
ReadHandle
<
STORE
>
readAuxHandle
(
writeHandleKey
.
key
()
+
"Aux."
);
SG
::
ReadHandle
<
STORE
>
readAuxHandle
(
writeHandleKey
.
key
()
+
"Aux."
,
context
);
if
(
!
readAuxHandle
.
isValid
()
)
{
SG
::
WriteHandle
<
STORE
>
writeAuxHandle
(
writeHandleKey
.
key
()
+
"Aux."
);
ATH_MSG_DEBUG
(
"Creating missing Aux store for "
<<
writeHandleKey
.
key
());
...
...
@@ -505,7 +505,7 @@ StatusCode HLTEDMCreator::createOutput(const EventContext& context) const {
CREATE_XAOD
(
MuonRoIContainer
,
MuonRoIAuxContainer
);
// After view collections are merged, need to update collection links
ATH_CHECK
(
fixLinks
()
);
ATH_CHECK
(
fixLinks
(
context
)
);
#undef CREATE_XAOD
...
...
This diff is collapsed.
Click to expand it.
Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.h
+
2
−
2
View file @
598477ea
/*
Copyright (C) 2002-202
3
CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-202
5
CERN for the benefit of the ATLAS collaboration
*/
#ifndef TRIGOUTPUTHANDLING_HLTEDMCREATOR_H
#define TRIGOUTPUTHANDLING_HLTEDMCREATOR_H 1
...
...
@@ -223,7 +223,7 @@ class HLTEDMCreator: public extends<AthAlgTool, IHLTOutputTool> {
const
SG
::
ReadHandleKeyArray
<
ViewContainer
>&
views
;
};
StatusCode
fixLinks
()
const
;
StatusCode
fixLinks
(
EventContext
const
&
context
)
const
;
template
<
typename
T
,
typename
STORE
,
typename
G
,
typename
M
>
StatusCode
createIfMissing
(
const
EventContext
&
context
,
const
ConstHandlesGroup
<
T
>&
handles
,
...
...
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