From d293e14ba34bbb22fc758a35800e6e44b8ece762 Mon Sep 17 00:00:00 2001 From: Tim Martin <Tim.Martin@cern.ch> Date: Mon, 13 Jul 2020 18:29:42 +0200 Subject: [PATCH] use isMasterSlot call --- Trigger/TrigCost/TrigCostAnalysis/src/CostData.cxx | 2 +- Trigger/TrigCost/TrigCostAnalysis/src/CostData.h | 2 +- Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.cxx | 6 +++--- Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.h | 5 ++--- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Trigger/TrigCost/TrigCostAnalysis/src/CostData.cxx b/Trigger/TrigCost/TrigCostAnalysis/src/CostData.cxx index 520bb1afa061..6bae94a556ec 100644 --- a/Trigger/TrigCost/TrigCostAnalysis/src/CostData.cxx +++ b/Trigger/TrigCost/TrigCostAnalysis/src/CostData.cxx @@ -73,7 +73,7 @@ uint32_t CostData::onlineSlot() const { return m_slot; } -bool CostData::isMaterSlot() const { +bool CostData::isMasterSlot() const { return (onlineSlot() == 0); } diff --git a/Trigger/TrigCost/TrigCostAnalysis/src/CostData.h b/Trigger/TrigCost/TrigCostAnalysis/src/CostData.h index 0b86a3baadf1..7feb0ec2bae9 100644 --- a/Trigger/TrigCost/TrigCostAnalysis/src/CostData.h +++ b/Trigger/TrigCost/TrigCostAnalysis/src/CostData.h @@ -89,7 +89,7 @@ class CostData { /** * @return True if event was processed in the master slot (0), and hence contains cost data spanning all concurrent slots */ - bool isMaterSlot() const; + bool isMasterSlot() const; /** * @brief Getter of the total algorithm CPU time in the event. diff --git a/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.cxx b/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.cxx index f90937a039f1..8efcae34b57b 100644 --- a/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.cxx +++ b/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.cxx @@ -155,7 +155,7 @@ StatusCode TrigCostAnalysis::execute() { ATH_CHECK( range->newEvent( costData, getWeight(context) ) ); - if (checkDoFullEventDump(context, onlineSlot)) { + if (checkDoFullEventDump(context, costData)) { ATH_CHECK( dumpEvent(context) ); } @@ -163,8 +163,8 @@ StatusCode TrigCostAnalysis::execute() { } -bool TrigCostAnalysis::checkDoFullEventDump(const EventContext& context, const uint32_t onlineSlot) { - if (onlineSlot == 0 +bool TrigCostAnalysis::checkDoFullEventDump(const EventContext& context, const CostData& costData) { + if (costData.isMasterSlot() and m_fullEventDumps < m_maxFullEventDumps and context.eventID().event_number() % m_fullEventDumpProbability == 0) { diff --git a/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.h b/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.h index 5d2c7e5d64cf..874e76e0abfa 100644 --- a/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.h +++ b/Trigger/TrigCost/TrigCostAnalysis/src/TrigCostAnalysis.h @@ -116,11 +116,10 @@ class TrigCostAnalysis: public ::AthHistogramAlgorithm { /** * @brief Check if event dumping should be performed for the current event. * @param[in] context Event context. - * @param[in] onelineSlot The slot used to process the event in the trigger. - * We only dump slot 0 as these events cary payload data for all events. + * @param[in] costData We only dump the master-slot (slot:0) as these events cary payload data for all slots / all threads. * @return True, if the event should be dumped. */ - bool checkDoFullEventDump(const EventContext& context, const uint32_t onlineSlot); + bool checkDoFullEventDump(const EventContext& context, const CostData& costData); /** * @brief Return or construct and return a Range for the Context. Might return nullptr range. -- GitLab