Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Tadej Novak
athena
Commits
2348bd03
Verified
Commit
2348bd03
authored
Oct 23, 2019
by
Tadej Novak
Browse files
Log using secondary event number in event loop managers
parent
bbe698de
Pipeline
#1174353
passed with stage
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
AtlasTest/DatabaseTest/AthenaPoolTest/share/DoubleEventSelectorOverlayTest.py
View file @
2348bd03
...
...
@@ -75,9 +75,15 @@ topSequence += CfgGetter.getAlgorithm("CopyTimings")
#--------------------------------------------------------------
# Athena EventLoop Manager
#--------------------------------------------------------------
AthenaEventLoopMgr
=
Service
(
"AthenaEventLoopMgr"
)
AthenaEventLoopMgr
.
UseSecondaryEventNumber
=
True
AthenaEventLoopMgr
.
OutputLevel
=
INFO
from
AthenaCommon.ConcurrencyFlags
import
jobproperties
as
jp
nThreads
=
jp
.
ConcurrencyFlags
.
NumThreads
()
if
nThreads
>
0
:
EventLoop
=
Service
(
"AthenaHiveEventLoopMgr"
)
else
:
EventLoop
=
Service
(
"AthenaEventLoopMgr"
)
EventLoop
.
UseSecondaryEventNumber
=
True
EventLoop
.
OutputLevel
=
INFO
svcMgr
+=
EventLoop
#--------------------------------------------------------------
# DEBUG messaging
...
...
@@ -105,7 +111,6 @@ Stream1.ItemList += ["RecoTimingObj#EVNTtoHITS_timings"]
# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
#--------------------------------------------------------------
svcMgr
.
MessageSvc
=
Service
(
"MessageSvc"
)
svcMgr
.
MessageSvc
.
OutputLevel
=
WARNING
svcMgr
.
MessageSvc
.
debugLimit
=
100000
# No stats printout
...
...
Control/AthenaServices/src/AthenaEventLoopMgr.cxx
View file @
2348bd03
...
...
@@ -316,6 +316,12 @@ StatusCode AthenaEventLoopMgr::initialize()
CHECK
(
m_conditionsCleaner
.
retrieve
()
);
// Print if we override the event number using the one from secondary event
if
(
m_useSecondaryEventNumber
)
{
info
()
<<
"Using secondary event number."
<<
endmsg
;
}
return
sc
;
}
...
...
@@ -646,25 +652,34 @@ StatusCode AthenaEventLoopMgr::executeEvent(EventContext&& ctx)
// an option to override primary eventNumber with the secondary one in case of DoubleEventSelector
if
(
m_useSecondaryEventNumber
)
{
unsigned
long
long
eventNumberSecondary
{};
if
(
!
(
pAttrList
->
exists
(
"hasSecondaryInput"
)
&&
(
*
pAttrList
)[
"hasSecondaryInput"
].
data
<
bool
>
())
)
{
fatal
()
<<
"Secondary EventNumber requested, but secondary input does not exist!"
<<
endmsg
;
return
StatusCode
::
FAILURE
;
}
if
(
pAttrList
->
exists
(
"EventNumber_secondary"
)
)
{
eventNumber
=
(
*
pAttrList
)[
"EventNumber_secondary"
].
data
<
unsigned
long
long
>
();
eventNumber
Secondary
=
(
*
pAttrList
)[
"EventNumber_secondary"
].
data
<
unsigned
long
long
>
();
}
else
{
// try legacy EventInfo if secondary input did not have attribute list
// primary input should not have this EventInfo type
const
EventInfo
*
pEventSecondary
=
eventStore
()
->
tryConstRetrieve
<
EventInfo
>
();
if
(
pEventSecondary
)
{
eventNumber
=
pEventSecondary
->
event_ID
()
->
event_number
();
eventNumber
Secondary
=
pEventSecondary
->
event_ID
()
->
event_number
();
}
else
{
fatal
()
<<
"Secondary EventNumber requested, but it does not exist!"
<<
endmsg
;
return
StatusCode
::
FAILURE
;
}
}
if
(
eventNumberSecondary
!=
0
)
{
bool
doEvtHeartbeat
(
m_eventPrintoutInterval
.
value
()
>
0
&&
0
==
(
m_nev
%
m_eventPrintoutInterval
.
value
()));
if
(
doEvtHeartbeat
)
{
info
()
<<
" ===>>> using secondary event #"
<<
eventNumberSecondary
<<
" instead of #"
<<
eventNumber
<<
"<<<==="
<<
endmsg
;
}
eventNumber
=
eventNumberSecondary
;
}
}
pEventPtr
=
std
::
make_unique
<
EventInfo
>
...
...
Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx
View file @
2348bd03
...
...
@@ -352,6 +352,12 @@ StatusCode AthenaHiveEventLoopMgr::initialize()
CHECK
(
m_conditionsCleaner
.
retrieve
()
);
// Print if we override the event number using the one from secondary event
if
(
m_useSecondaryEventNumber
)
{
info
()
<<
"Using secondary event number."
<<
endmsg
;
}
return
sc
;
}
...
...
@@ -1116,25 +1122,32 @@ int AthenaHiveEventLoopMgr::declareEventRootAddress(EventContext& ctx){
// an option to override primary eventNumber with the secondary one in case of DoubleEventSelector
if
(
m_useSecondaryEventNumber
)
{
unsigned
long
long
eventNumberSecondary
{};
if
(
!
(
pAttrList
->
exists
(
"hasSecondaryInput"
)
&&
(
*
pAttrList
)[
"hasSecondaryInput"
].
data
<
bool
>
())
)
{
fatal
()
<<
"Secondary EventNumber requested, but secondary input does not exist!"
<<
endmsg
;
return
-
1
;
}
if
(
pAttrList
->
exists
(
"EventNumber_secondary"
)
)
{
eventNumber
=
(
*
pAttrList
)[
"EventNumber_secondary"
].
data
<
unsigned
long
long
>
();
eventNumber
Secondary
=
(
*
pAttrList
)[
"EventNumber_secondary"
].
data
<
unsigned
long
long
>
();
}
else
{
// try legacy EventInfo if secondary input did not have attribute list
// primary input should not have this EventInfo type
const
EventInfo
*
pEventSecondary
=
eventStore
()
->
tryConstRetrieve
<
EventInfo
>
();
if
(
pEventSecondary
)
{
eventNumber
=
pEventSecondary
->
event_ID
()
->
event_number
();
eventNumber
Secondary
=
pEventSecondary
->
event_ID
()
->
event_number
();
}
else
{
fatal
()
<<
"Secondary EventNumber requested, but it does not exist!"
<<
endmsg
;
return
-
1
;
}
}
if
(
eventNumberSecondary
!=
0
)
{
if
(
m_doEvtHeartbeat
)
{
info
()
<<
" ===>>> using secondary event #"
<<
eventNumberSecondary
<<
" instead of #"
<<
eventNumber
<<
"<<<==="
<<
endmsg
;
}
eventNumber
=
eventNumberSecondary
;
}
}
auto
pEventPtr
=
std
::
make_unique
<
EventInfo
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment