Skip to content
Snippets Groups Projects
Commit 20e78f99 authored by John Kenneth Anders's avatar John Kenneth Anders Committed by Peter Onyisi
Browse files

Merge branch '21.0-atlasg-1450' into '21.0'

Backport ATLASG-1450 fix to 21.0

See merge request atlas/athena!25182
parent 7f216f86
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,7 @@ atlas_depends_on_subdirs( PUBLIC ...@@ -13,6 +13,7 @@ atlas_depends_on_subdirs( PUBLIC
PhysicsAnalysis/AnalysisCommon/PATCore PhysicsAnalysis/AnalysisCommon/PATCore
PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
Trigger/TrigAnalysis/TrigDecisionTool Trigger/TrigAnalysis/TrigDecisionTool
Event/xAOD/xAODEventInfo
PRIVATE PRIVATE
Control/AthenaKernel Control/AthenaKernel
PhysicsAnalysis/CommonTools/ExpressionEvaluation ) PhysicsAnalysis/CommonTools/ExpressionEvaluation )
...@@ -25,7 +26,7 @@ atlas_add_library( DerivationFrameworkToolsLib ...@@ -25,7 +26,7 @@ atlas_add_library( DerivationFrameworkToolsLib
src/*.cxx src/*.cxx
PUBLIC_HEADERS DerivationFrameworkTools PUBLIC_HEADERS DerivationFrameworkTools
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES AthenaBaseComps xAODBase GaudiKernel PATCoreLib TrigDecisionToolLib ExpressionEvaluationLib LINK_LIBRARIES AthenaBaseComps xAODBase GaudiKernel PATCoreLib TrigDecisionToolLib ExpressionEvaluationLib xAODEventInfo
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel ) PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel )
atlas_add_component( DerivationFrameworkTools atlas_add_component( DerivationFrameworkTools
......
...@@ -25,7 +25,7 @@ namespace DerivationFramework { ...@@ -25,7 +25,7 @@ namespace DerivationFramework {
virtual bool eventPassesFilter() const; virtual bool eventPassesFilter() const;
private: private:
mutable int m_prescale, m_eventCounter; unsigned int m_prescale;
}; };
} }
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
// Use of ExpressionParsing to analyse a more complex string // Use of ExpressionParsing to analyse a more complex string
#include "DerivationFrameworkTools/PrescaleTool.h" #include "DerivationFrameworkTools/PrescaleTool.h"
#include "xAODEventInfo/EventInfo.h"
namespace DerivationFramework { namespace DerivationFramework {
...@@ -31,7 +32,6 @@ namespace DerivationFramework { ...@@ -31,7 +32,6 @@ namespace DerivationFramework {
ATH_MSG_FATAL("Prescale of less than 1 makes no sense"); ATH_MSG_FATAL("Prescale of less than 1 makes no sense");
return StatusCode::FAILURE; return StatusCode::FAILURE;
} }
m_eventCounter = 0;
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
...@@ -42,9 +42,10 @@ namespace DerivationFramework { ...@@ -42,9 +42,10 @@ namespace DerivationFramework {
bool PrescaleTool::eventPassesFilter() const bool PrescaleTool::eventPassesFilter() const
{ {
const xAOD::EventInfo* ei = 0;
CHECK( evtStore()->retrieve( ei , "EventInfo" ) );
bool accept(false); bool accept(false);
if (m_eventCounter % m_prescale == 0) accept = true; if (ei->eventNumber() % m_prescale == 0) accept = true;
++m_eventCounter;
return accept; return accept;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment