ATLAS Offline Software
Loading...
Searching...
No Matches
AthAlgorithm.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6
8
9
10AthAlgorithm::AthAlgorithm( const std::string& name,
11 ISvcLocator* pSvcLocator ) :
12 AthCommonAlgorithm<Gaudi::Algorithm>( name, pSvcLocator )
13{
14 // default cardinality for non-reentrant algorithms
15 setProperty( "Cardinality", 1 ).orThrow("Unable to set property 'Cardinality'", name);
16}
17
18
19StatusCode AthAlgorithm::execute ( const EventContext& ctx ) const
20{
21 // "Thread-safe" because scheduler ensures algorithm never gets called concurrently.
22 auto nc_this ATLAS_THREAD_SAFE = const_cast<AthAlgorithm*>( this );
23 return nc_this->execute( ctx );
24}
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
Define macros for attributes used to control the static checker.
#define ATLAS_THREAD_SAFE
virtual StatusCode execute(const EventContext &ctx)=0
Execute method.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
AthCommonAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
=============================================================================