ATLAS Offline Software
AthToolSupport/AsgDataHandles/AsgDataHandles/ShallowCopyDecorDeps.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
3  */
4 
5 
6 #ifndef ASG_DATA_HANDLES_SHALLOWCOPYDECORDEPS_H
7 #define ASG_DATA_HANDLES_SHALLOWCOPYDECORDEPS_H
8 
9 #ifndef XAOD_STANDALONE
11 #else
12 
16 
17 
18 namespace SG {
19 
20 
27 template <class T>
28 class ShallowCopyDecorDeps
29 {
30 public:
38  template <class OWNER>
39  ShallowCopyDecorDeps (OWNER* owner,
40  const std::string& name,
41  std::initializer_list<std::string> l,
42  const std::string& doc = "");
43 
44 
53  const SG::WriteHandleKey<T>& copyKey,
54  bool used = true);
55 
56 
65  const EventContext& ctx = Gaudi::Hive::currentContext()) const;
66 };
67 
68 
69 template<class T> template <class OWNER> ShallowCopyDecorDeps<T> ::
70 ShallowCopyDecorDeps (OWNER* /*owner*/,
71  const std::string& /*name*/,
72  std::initializer_list<std::string> /*l*/,
73  const std::string& /*doc*/)
74 {}
75 
76 
77 template<class T> StatusCode ShallowCopyDecorDeps<T> ::
78 initialize (const SG::ReadHandleKey<T>& /*origKey*/,
79  const SG::WriteHandleKey<T>& /*copyKey*/,
80  bool /*used*/)
81 {
82  return StatusCode::SUCCESS;
83 }
84 
85 
86 template<class T> StatusCode ShallowCopyDecorDeps<T> ::
87 linkDecors (const SG::ReadHandleKey<T>& /*origKey*/,
88  const EventContext& /*ctx*/) const
89 {
90  return StatusCode::SUCCESS;
91 }
92 
93 } // namespace SG
94 
95 #endif
96 
97 #endif
SG::ShallowCopyDecorDeps::ShallowCopyDecorDeps
ShallowCopyDecorDeps(OWNER *owner, const std::string &name, std::initializer_list< std::string > l, const std::string &doc="")
Auto-declaring Property constructor.
used
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
CurrentContext.h
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
ShallowCopyDecorDeps.h
Helper to propagate decoration dependencies to a shallow copy.
SG::ShallowCopyDecorDeps::initialize
StatusCode initialize(const SG::ReadHandleKey< T > &origKey, const SG::WriteHandleKey< T > &copyKey, bool used=true)
Initialize this property.
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SG::ShallowCopyDecorDeps::linkDecors
StatusCode linkDecors(const SG::ReadHandleKey< T > &origKey, const EventContext &ctx=Gaudi::Hive::currentContext()) const
Create alias for the decorations, linked to the shallow copy.