Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Kazuya Mochizuki
athena
Commits
dffdaf36
Commit
dffdaf36
authored
Jun 30, 2021
by
Tim Martin
Committed by
Walter Lampl
Jun 30, 2021
Browse files
First attempt at moving HLTNav slimming online
parent
ddac3832
Changes
12
Hide whitespace changes
Inline
Side-by-side
Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx
View file @
dffdaf36
...
...
@@ -80,9 +80,14 @@ namespace xAOD {
void
TrigComposite_v1
::
copyLinkInternal
(
const
xAOD
::
TrigComposite_v1
&
other
,
const
size_t
index
,
const
std
::
string
&
newName
)
{
this
->
linkColNamesNC
().
push_back
(
newName
);
this
->
linkColKeysNC
().
push_back
(
other
.
linkColKeys
().
at
(
index
)
);
this
->
linkColIndicesNC
().
push_back
(
other
.
linkColIndices
().
at
(
index
)
);
this
->
linkColClidsNC
().
push_back
(
other
.
linkColClids
().
at
(
index
)
);
this
->
linkColClidsNC
().
push_back
(
other
.
linkColClids
().
at
(
index
)
);
if
(
other
.
isRemapped
())
{
this
->
linkColKeysNC
().
push_back
(
other
.
linkColKeysRemap
().
at
(
index
)
);
this
->
linkColIndicesNC
().
push_back
(
other
.
linkColIndicesRemap
().
at
(
index
)
);
}
else
{
this
->
linkColKeysNC
().
push_back
(
other
.
linkColKeys
().
at
(
index
)
);
this
->
linkColIndicesNC
().
push_back
(
other
.
linkColIndices
().
at
(
index
)
);
}
}
bool
TrigComposite_v1
::
copyLinkFrom
(
const
xAOD
::
TrigComposite_v1
&
other
,
const
std
::
string
&
name
,
std
::
string
newName
)
{
...
...
Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
View file @
dffdaf36
...
...
@@ -541,9 +541,11 @@ if not globalflags.InputFormat.is_bytestream() and not recAlgs.doTrigger:
from
PyUtils.MetaReaderPeeker
import
convert_itemList
cfgKeyStore
.
addManyTypesInputFile
(
convert_itemList
(
layout
=
'#join'
))
# Check for Run-1, Run-2 or Run-3 Trigger content in the input file
from
TrigDecisionTool.TrigDecisionToolConfig
import
getRun3NavigationContainerFromInput
from
AthenaConfiguration.AllConfigFlags
import
ConfigFlags
if
not
cfgKeyStore
.
isInInputFile
(
"HLT::HLTResult"
,
"HLTResult_EF"
)
\
and
not
cfgKeyStore
.
isInInputFile
(
"xAOD::TrigNavigation"
,
"TrigNavigation"
)
\
and
not
cfgKeyStore
.
isInInputFile
(
"xAOD::TrigCompositeContainer"
,
"HLTNav_Summary"
):
and
not
cfgKeyStore
.
isInInputFile
(
"xAOD::TrigCompositeContainer"
,
getRun3NavigationContainerFromInput
(
ConfigFlags
)
):
logRecExCommon_topOptions
.
info
(
'Disabled rec.doTrigger because recAlgs.doTrigger=False and there is no Trigger content in the input file'
)
rec
.
doTrigger
=
False
except
Exception
:
...
...
Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/TrigDecisionTool.h
View file @
dffdaf36
...
...
@@ -165,7 +165,7 @@ namespace Trig {
"Allowed tokens are 'TriggerElement' or 'TrigComposite'"
};
//!< Note: Temporary property
SG
::
ReadHandleKey
<
TrigCompositeUtils
::
DecisionContainer
>
m_HLTSummaryKeyIn
{
this
,
"HLTSummary"
,
"HLTNav_Summary"
,
"HLT summary container Key"
};
"HLTNav_Summary
_OnlineSlimmed
"
,
"HLT summary container Key"
};
SG
::
ReadHandleKey
<
xAOD
::
TrigDecision
>
m_decisionKey
{
this
,
"TrigDecisionKey"
,
"xTrigDecision"
,
"Storegate key of Trigger Decision"
};
...
...
Trigger/TrigAnalysis/TrigDecisionTool/python/TrigDecisionToolConfig.py
View file @
dffdaf36
...
...
@@ -20,20 +20,25 @@ def getRun3NavigationContainerFromInput(ConfigFlags):
# List of all possible keys of the Run 3 navigation summary collection
# in order of verbosity. Want to take the most verbose which is available.
possible_keys
=
[]
possible_keys
+=
'
HLTNav_Summary
'
possible_keys
+=
'
HLTNav_Summary_BSSlimmed
'
possible_keys
+=
'
HLTNav_Summary_ESDSlimmed
'
possible_keys
+=
'
HLTNav_Summary_AODSlimmed
'
possible_keys
+=
'
HLTNav_Summary_DAODSlimmed
'
possible_keys
.
append
(
"
HLTNav_Summary
"
)
possible_keys
.
append
(
"
HLTNav_Summary_BSSlimmed
"
)
possible_keys
.
append
(
"
HLTNav_Summary_ESDSlimmed
"
)
possible_keys
.
append
(
"
HLTNav_Summary_AODSlimmed
"
)
possible_keys
.
append
(
"
HLTNav_Summary_DAODSlimmed
"
)
# What to return if we cannot look in the file
default_key
=
'HLTNav_Summary'
default_key
=
"HLTNav_Summary_OnlineSlimmed"
to_return
=
default_key
for
key
in
possible_keys
:
if
key
in
ConfigFlags
.
Input
.
Collections
:
return
key
to_return
=
key
break
return
default_key
from
AthenaCommon.Logging
import
logging
msg
=
logging
.
getLogger
(
'getRun3NavigationContainerFromInput'
)
msg
.
info
(
"Returning {} as the Run 3 trigger navigation colletion to read in this job."
.
format
(
to_return
))
return
to_return
def
getTrigDecisionTool
(
ConfigFlags
):
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
...
...
@@ -73,4 +78,4 @@ def getTrigDecisionTool(ConfigFlags):
tdt
.
HLTSummary
)
)
return
acc
\ No newline at end of file
return
acc
Trigger/TrigAnalysis/TrigNavSlimmingMT/python/TrigNavSlimmingMTConfig.py
View file @
dffdaf36
...
...
@@ -5,6 +5,17 @@
from
AthenaConfiguration.ComponentFactory
import
CompFactory
from
AthenaCommon.Logging
import
logging
def
getTrigNavSlimmingMTOnlineConfig
():
onlineSlim
=
CompFactory
.
TrigNavSlimmingMTAlg
(
'TrigNavSlimmingMTAlg_Online'
)
onlineSlim
.
TrigDecisionTool
=
""
onlineSlim
.
OutputCollection
=
"HLTNav_Summary_OnlineSlimmed"
onlineSlim
.
PrimaryInputCollection
=
"HLTNav_Summary"
onlineSlim
.
KeepFailedBranched
=
True
onlineSlim
.
KeepOnlyFinalFeatures
=
False
onlineSlim
.
EdgesToDrop
=
[
""
]
onlineSlim
.
NodesToDrop
=
[
""
]
return
onlineSlim
def
getTrigNavSlimmingMTConfig
(
ConfigFlags
):
log
=
logging
.
getLogger
(
"getTrigNavSlimmingMTConfig.py"
)
...
...
Trigger/TrigAnalysis/TrigNavSlimmingMT/src/TrigNavSlimmingMTAlg.cxx
View file @
dffdaf36
...
...
@@ -18,8 +18,10 @@ TrigNavSlimmingMTAlg::TrigNavSlimmingMTAlg(const std::string& name, ISvcLocator*
StatusCode
TrigNavSlimmingMTAlg
::
initialize
()
{
ATH_CHECK
(
m_primaryInputCollection
.
initialize
()
);
ATH_CHECK
(
m_outputCollection
.
initialize
()
);
ATH_CHECK
(
m_trigDec
.
retrieve
()
);
m_trigDec
->
ExperimentalAndExpertMethods
()
->
enable
();
if
(
not
m_trigDec
.
empty
())
{
ATH_CHECK
(
m_trigDec
.
retrieve
()
);
m_trigDec
->
ExperimentalAndExpertMethods
()
->
enable
();
}
return
StatusCode
::
SUCCESS
;
}
...
...
Trigger/TrigSteer/TrigOutputHandling/src/HLTEDMCreator.cxx
View file @
dffdaf36
...
...
@@ -272,6 +272,11 @@ StatusCode HLTEDMCreator::createIfMissing( const EventContext& context, const Co
for
(
size_t
i
=
0
;
i
<
handles
.
out
.
size
();
++
i
)
{
SG
::
WriteHandleKey
<
T
>
writeHandleKey
=
handles
.
out
.
at
(
i
);
// Special case. The slimmed navigation container is exceptionally created _after_ the HLTEDMCreator as it reads remapped navigation data.
if
(
writeHandleKey
.
key
()
==
"HLTNav_Summary_OnlineSlimmed"
)
{
continue
;
}
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.
...
...
Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
View file @
dffdaf36
...
...
@@ -152,6 +152,9 @@ TriggerHLTListRun3 = [
(
'TrigRoiDescriptorCollection#HLT_TAURoI'
,
'BS ESD AODFULL AODSLIM'
,
'Steer'
),
(
'TrigRoiDescriptorCollection#HLT_FSRoI'
,
'BS ESD AODFULL AODSLIM'
,
'Steer'
),
(
'xAOD::TrigCompositeContainer#HLTNav_Summary_OnlineSlimmed'
,
'BS ESD AODFULL AODSLIM'
,
'Steer'
),
(
'xAOD::TrigCompositeAuxContainer#HLTNav_Summary_OnlineSlimmedAux.'
,
'BS ESD AODFULL AODSLIM'
,
'Steer'
),
(
'xAOD::TrigCompositeContainer#HLT_TrigCostContainer'
,
'CostMonDS ESD'
,
'Steer'
),
(
'xAOD::TrigCompositeAuxContainer#HLT_TrigCostContainerAux.alg.store.view.thread.thash.slot.roi.start.stop'
,
'CostMonDS ESD'
,
'Steer'
),
(
'xAOD::TrigCompositeContainer#HLT_TrigCostROSContainer'
,
'CostMonDS ESD'
,
'Steer'
),
...
...
@@ -756,7 +759,7 @@ TriggerHLTListRun3 = [
]
# HLTNav_* object list is built dynamically during job configuration, here we only define its output targets
HLTNavEDMTargets
=
'
BS ESD AODFULL AODSLIM
'
HLTNavEDMTargets
=
''
#-------------------------------------------------------------------------------
# EDM details list to store the transient-persistent version
...
...
Trigger/TriggerCommon/TriggerJobOpts/python/HLTTriggerResultGetter.py
View file @
dffdaf36
...
...
@@ -62,7 +62,7 @@ class ByteStreamUnpackGetter(Configured):
from
AthenaCommon.CFElements
import
seqAND
decoder
=
HLTResultMTByteStreamDecoderAlg
()
deserialiser
=
TriggerEDMDeserialiserAlg
(
"TrigDeserialiser"
)
deserialiser
.
ExtraOutputs
+=
[(
'xAOD::TrigCompositeContainer'
,
'StoreGateSvc+HLTNav_Summary'
)]
deserialiser
.
ExtraOutputs
+=
[(
'xAOD::TrigCompositeContainer'
,
'StoreGateSvc+HLTNav_Summary
_OnlineSlimmed
'
)]
decodingSeq
=
seqAND
(
"HLTDecodingSeq"
)
decodingSeq
+=
decoder
# BS -> HLTResultMT
decodingSeq
+=
deserialiser
# HLTResultMT -> xAOD
...
...
Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py
View file @
dffdaf36
...
...
@@ -657,6 +657,10 @@ def triggerRunCfg( flags, menu=None ):
mergingAlg
=
triggerMergeViewsAndAddMissingEDMCfg
(
flags
,
[
edmSet
]
,
hypos
,
viewMakers
,
decObj
,
decObjHypoOut
)
acc
.
addEventAlgo
(
mergingAlg
,
sequenceName
=
"HLTFinalizeSeq"
)
from
TrigNavSlimmingMT.TrigNavSlimmingMTConfig
import
getTrigNavSlimmingMTOnlineConfig
onlineSlimAlg
=
getTrigNavSlimmingMTOnlineConfig
()
acc
.
addEventAlgo
(
onlineSlimAlg
,
sequenceName
=
"HLTFinalizeSeq"
)
return
acc
def
triggerIDCCacheCreatorsCfg
(
flags
,
seqName
=
None
):
...
...
Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigGetter.py
View file @
dffdaf36
...
...
@@ -480,8 +480,8 @@ class TriggerConfigGetter(Configured):
enhancedBiasWeightCompAlg
=
CompFactory
.
EnhancedBiasWeightCompAlg
()
enhancedBiasWeightCompAlg
.
EBWeight
=
recordable
(
"HLT_EBWeight"
)
enhancedBiasWeightCompAlg
.
FinalDecisionKey
=
"HLTNav_Summary"
from
TrigDecisionTool.TrigDecisionToolConfig
import
getRun3NavigationContainerFromInput
enhancedBiasWeightCompAlg
.
FinalDecisionKey
=
getRun3NavigationContainerFromInput
(
ConfigFlags
)
topAlgs
+=
conf2toConfigurable
(
enhancedBiasWeightCompAlg
)
...
...
Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py
View file @
dffdaf36
...
...
@@ -209,6 +209,10 @@ def makeHLTTree(newJO=False, triggerConfigHLT = None):
# C) Finally, we create the EDM output
hltFinalizeSeq
+=
conf2toConfigurable
(
edmAlg
)
from
TrigNavSlimmingMT.TrigNavSlimmingMTConfig
import
getTrigNavSlimmingMTOnlineConfig
onlineSlimAlg
=
getTrigNavSlimmingMTOnlineConfig
()
hltFinalizeSeq
+=
conf2toConfigurable
(
onlineSlimAlg
)
hltEndSeq
+=
hltFinalizeSeq
# Test the configuration
...
...
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