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-2020 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 #include "GaudiKernel/ThreadLocalContext.h"
22 #include "GaudiKernel/EventContext.h"
23 
24 
25 namespace SG {
26 
27 
39 template <class T>
41  : public DataBucket<T>
42 {
43 public:
44  // Constructor inherited from base class.
46 
47 
56  virtual void* cast (CLID clid,
57  IRegisterTransient* irt = 0,
58  bool isConst = true) override;
59 
60 
69  virtual void* cast (const std::type_info& tinfo,
70  IRegisterTransient* irt = 0,
71  bool isConst = true) override;
72 
73 
86  virtual void* cast (CLID clid,
87  const std::type_info& tinfo,
88  SG::IRegisterTransient* irt = 0,
89  bool isConst = true) override;
90 
91 
92 private:
97  const SourceID getSID() const;
98 };
99 
100 
101 } // namespace SG
102 
103 
105 
106 
107 #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:42
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
ExtendedEventContext.h
SG::DataBucket
Definition: DataBucket.h:30
DataBucket.h
SG::DataBucket::tinfo
virtual const std::type_info & tinfo() const override
Return the type_info for the stored object.
Definition: DataBucket.h:60
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:23
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.