ATLAS Offline Software
MetaContDataBucket.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4 */
13 #ifndef ATHENAKERNEL_METACONTDATABUCKET_H
14 #define ATHENAKERNEL_METACONTDATABUCKET_H
15 
16 
18 #include "AthenaKernel/BaseInfo.h"
20 #include "AthenaKernel/SourceID.h"
21 
22 
23 class EventContext;
24 
25 
26 namespace SG {
27 
28 
40 template <class T>
42  : public DataBucket<T>
43 {
44 public:
45  // Constructor inherited from base class.
47 
48 
57  virtual void* cast (CLID clid,
58  IRegisterTransient* irt = 0,
59  bool isConst = true) override;
60 
61 
70  virtual void* cast (const std::type_info& tinfo,
71  IRegisterTransient* irt = 0,
72  bool isConst = true) override;
73 
74 
87  virtual void* cast (CLID clid,
88  const std::type_info& tinfo,
89  SG::IRegisterTransient* irt = 0,
90  bool isConst = true) override;
91 
92 
93 private:
98  const SourceID getSID() const;
99 };
100 
101 
102 } // namespace SG
103 
104 
106 
107 
108 #endif // not ATHENAKERNEL_METACONTDATABUCKET_H
SG::IRegisterTransient
Interface for registering a transient object in t2p map.
Definition: IRegisterTransient.h:28
SG::MetaContDataBucket
Allow converting MetaCont<T> to T.
Definition: MetaContDataBucket.h:43
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::DataBucket
Definition: DataBucket.h:29
DataBucket.h
SG::DataBucket::tinfo
virtual const std::type_info & tinfo() const override
Return the type_info for the stored object.
Definition: DataBucket.h:58
proxyDictFromEventContext.h
Some out-of-line helpers for ExtendedEventContext.
SG::MetaContDataBucket::cast
virtual void * cast(CLID clid, IRegisterTransient *irt=0, bool isConst=true) override
Return the contents of the DataBucket, converted to type given by clid.
BaseInfo.h
Provide an interface for finding inheritance information at run time.
SG::MetaContDataBucket::cast
virtual void * cast(const std::type_info &tinfo, IRegisterTransient *irt=0, bool isConst=true) override
Return the contents of the DataBucket, converted to type given by std::type_info.
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
SourceID.h
Type used to identify a metadata source.
MetaContDataBucket.icc
SG::SourceID
std::string SourceID
Definition: AthenaKernel/AthenaKernel/SourceID.h:25
SG::MetaContDataBucket::getSID
const SourceID getSID() const
Return the metadata source id for the current event store.
SG::MetaContDataBucket::cast
virtual void * cast(CLID clid, const std::type_info &tinfo, SG::IRegisterTransient *irt=0, bool isConst=true) override
Return the contents of the DataBucket, converted to type given by clid.