ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis/DerivationFramework/DerivationFrameworkMuons/DerivationFrameworkMuons/Utils.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef DERIVATIONFRAMEWORK_MUONUTILS_H
5#define DERIVATIONFRAMEWORK_MUONUTILS_H
6
8class EventContext;
9
10namespace DerivationFramework{
11 /* Small helper function to create a WriteDecorHandle which then sets the value of the first element
12 * automatically to a default value
13 */
14 template <class dType, class ContType> SG::WriteDecorHandle<ContType, dType> makeHandle(const EventContext& ctx,
16 const dType &defValue = dType{}) {
18 if (handle->size()) handle(*handle->at(0)) = defValue;
19 return handle;
20 }
21}
22#endif
Handle class for adding a decoration to an object.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Handle class for adding a decoration to an object.
THE reconstruction tool.
SG::WriteDecorHandle< ContType, dType > makeHandle(const EventContext &ctx, const SG::WriteDecorHandleKey< ContType > &key, const dType &defValue=dType{})