ATLAS Offline Software
ExtendedEventContext.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
15 
16 
17 namespace Atlas {
18 
19 
23 bool hasExtendedEventContext (const EventContext& ctx)
24 {
25  return ctx.hasExtension<ExtendedEventContext>();
26 }
27 
28 
32 const ExtendedEventContext& getExtendedEventContext (const EventContext& ctx)
33 {
34  return ctx.getExtension<ExtendedEventContext>();
35 }
36 
37 
42 const ExtendedEventContext* tryGetExtendedEventContext (const EventContext& ctx)
43 {
44  return ctx.tryGetExtension<ExtendedEventContext>();
45 }
46 
47 
52 {
53  return ctx.getExtension<ExtendedEventContext>();
54 }
55 
56 
62 {
63  return ctx.tryGetExtension<ExtendedEventContext>();
64 }
65 
66 
70 void setExtendedEventContext (EventContext& ctx,
71  ExtendedEventContext&& ectx)
72 {
73  ctx.setExtension (std::move (ectx));
74 }
75 
76 
77 } // namespace Atlas
ExtendedEventContext.h
Atlas::hasExtendedEventContext
bool hasExtendedEventContext(const EventContext &ctx)
Test whether a context object has an extended context installed.
Definition: ExtendedEventContext.cxx:23
Atlas::tryGetExtendedEventContext
const ExtendedEventContext * tryGetExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
Definition: ExtendedEventContext.cxx:42
Atlas::getExtendedEventContext
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
Definition: ExtendedEventContext.cxx:32
Atlas::ExtendedEventContext
Definition: ExtendedEventContext.h:23
Atlas::setExtendedEventContext
void setExtendedEventContext(EventContext &ctx, ExtendedEventContext &&ectx)
Move an extended context into a context object.
Definition: ExtendedEventContext.cxx:70
Atlas
Definition: ExtendedEventContext.h:21