8#ifndef SYSTEMATICS_HANDLES__ATHENA_DEPENDENCY_HELPERS_H
9#define SYSTEMATICS_HANDLES__ATHENA_DEPENDENCY_HELPERS_H
18#ifndef XAOD_STANDALONE
34#ifndef XAOD_STANDALONE
35 template<
typename ContainerType,
unsigned mode,
typename AlgorithmType>
36 requires (mode <= 2 && !std::is_const_v<ContainerType>)
38 addDependency (AlgorithmType& owner,
const std::string&
name,
const std::string& decoName,
bool decoWrite)
44 std::conditional_t<mode == 0,SG::ReadHandleKey<ContainerType>,
45 std::conditional_t<mode == 1,SG::WriteHandleKey<ContainerType>,
47 if (!key.initialize().isSuccess())
48 return StatusCode::FAILURE;
52 owner.addDependency (key.fullKey(), key.mode());
53 return StatusCode::SUCCESS;
60 if constexpr (std::same_as<ContainerType, xAOD::MissingETContainer>)
62 owner.msg() << MSG::WARNING <<
"Can not add decoration dependency " <<
name <<
"." << decoName <<
" as MissingET doesn't support decoration dependencies. This is only problematic if you are running in AthenaMT and rely on this dependency to exist." <<
endmsg;
63 return StatusCode::SUCCESS;
70 return StatusCode::FAILURE;
71 owner.addDependency (decoKey.fullKey(), decoKey.mode());
76 return StatusCode::FAILURE;
77 owner.addDependency (decoKey.fullKey(), decoKey.mode());
79 return StatusCode::SUCCESS;
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Property holding a SG store/key/clid from which an UpdateHandle is made.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Property holding a SG store/key/clid from which an UpdateHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
StatusCode addDependency(AlgorithmType &owner, const std::string &name, const std::string &decoName, bool decoWrite)
Select isolated Photons, Electrons and Muons.