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
Show more breadcrumbs
Peter Sherwood
athena
Commits
ea6219da
Verified
Commit
ea6219da
authored
4 years ago
by
Tadej Novak
Browse files
Options
Downloads
Patches
Plain Diff
BookkeeperTool: fallback to POOL metadata if xAOD one is not OK
parent
4cda231e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Event/EventBookkeeperTools/Root/BookkeeperTool.cxx
+21
-5
21 additions, 5 deletions
Event/EventBookkeeperTools/Root/BookkeeperTool.cxx
Event/EventBookkeeperTools/test/test_CutFlowSvc.py
+6
-2
6 additions, 2 deletions
Event/EventBookkeeperTools/test/test_CutFlowSvc.py
with
27 additions
and
7 deletions
Event/EventBookkeeperTools/Root/BookkeeperTool.cxx
+
21
−
5
View file @
ea6219da
...
...
@@ -65,12 +65,19 @@ StatusCode BookkeeperTool::beginInputFile(const SG::SourceID &source)
ATH_MSG_DEBUG
(
"Determining number of weight variations"
);
#ifndef GENERATIONBASE
if
(
inputMetaStore
()
->
contains
<
xAOD
::
TruthMetaDataContainer
>
(
"TruthMetaData"
))
{
ATH_CHECK
(
loadXAODMetaData
());
StatusCode
status
=
loadXAODMetaData
();
if
(
!
status
.
isSuccess
())
{
if
(
status
.
isRecoverable
())
{
ATH_CHECK
(
loadPOOLMetaData
());
}
else
{
return
StatusCode
::
FAILURE
;
}
}
}
else
{
#endif
ATH_CHECK
(
loadPOOLMetaData
());
#ifndef GENERATIONBASE
}
#else
ATH_CHECK
(
loadPOOLMetaData
());
#endif
if
(
m_numberOfWeightVariations
==
0
)
{
...
...
@@ -256,7 +263,7 @@ StatusCode BookkeeperTool::copyCutflowFromService()
StatusCode
BookkeeperTool
::
loadXAODMetaData
()
{
#ifdef GENERATIONBASE
return
StatusCode
::
SUCCESS
;
return
StatusCode
::
RECOVERABLE
;
#else
// Try to load MC channel number from file metadata
...
...
@@ -271,8 +278,12 @@ StatusCode BookkeeperTool::loadXAODMetaData()
}
}
if
(
mcChannelNumber
==
uint32_t
(
-
1
))
{
ATH_MSG_WARNING
(
"... MC channel number could not be loaded"
);
ATH_MSG_WARNING
(
"... MC channel number could not be loaded from FileMetaData"
);
#ifdef XAOD_STANDALONE
mcChannelNumber
=
0
;
#else
return
StatusCode
::
RECOVERABLE
;
#endif
}
// Find the correct truth meta data object
...
...
@@ -292,9 +303,14 @@ StatusCode BookkeeperTool::loadXAODMetaData()
// If no such object is found then return
if
(
itTruthMetaDataPtr
==
metaDataContainer
->
end
())
{
#ifdef XAOD_STANDALONE
m_numberOfWeightVariations
=
1
;
ATH_MSG_DEBUG
(
"Could not load weight meta data! Assumming 1 variation."
);
return
StatusCode
::
SUCCESS
;
#else
ATH_MSG_DEBUG
(
"Could not load weight meta data from TruthMetaData!"
);
return
StatusCode
::
RECOVERABLE
;
#endif
}
// Update cached weight data
...
...
This diff is collapsed.
Click to expand it.
Event/EventBookkeeperTools/test/test_CutFlowSvc.py
+
6
−
2
View file @
ea6219da
...
...
@@ -20,6 +20,8 @@ from EventBookkeeperTools.EventBookkeeperToolsConfig import CutFlowSvcCfg, CutFl
parser
=
ArgumentParser
(
prog
=
'
test_CutFlowSvc
'
)
parser
.
add_argument
(
'
input
'
,
type
=
str
,
nargs
=
'
?
'
,
help
=
'
Specify the input file
'
)
parser
.
add_argument
(
'
-t
'
,
'
--threads
'
,
default
=
2
,
type
=
int
,
help
=
'
The number of concurrent threads to run. 0 uses serial Athena.
'
)
args
=
parser
.
parse_args
()
# Setup configuration
...
...
@@ -31,9 +33,11 @@ else:
ConfigFlags
.
Output
.
AODFileName
=
"
testAOD.pool.root
"
# Flags relating to multithreaded execution
threads
=
2
threads
=
args
.
threads
maxEvents
=
10
ConfigFlags
.
Concurrency
.
NumThreads
=
threads
if
threads
>
0
:
maxEvents
=
10
*
threads
ConfigFlags
.
Scheduler
.
ShowDataDeps
=
True
ConfigFlags
.
Scheduler
.
ShowDataFlow
=
True
ConfigFlags
.
Scheduler
.
ShowControlFlow
=
True
...
...
@@ -62,7 +66,7 @@ acc.getPublicTool('CutBookkeepersTool').OutputLevel = VERBOSE
acc
.
getEventAlgo
(
'
AllExecutedEventsCounterAlg
'
).
OutputLevel
=
VERBOSE
# Execute and finish
sc
=
acc
.
run
(
maxEvents
=
10
*
thread
s
)
sc
=
acc
.
run
(
maxEvents
=
maxEvent
s
)
# Success should be 0
sys
.
exit
(
not
sc
.
isSuccess
())
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