ATLAS Offline Software
Loading...
Searching...
No Matches
PackedLinkPersVector.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 */
15
16
17#ifndef XAODCORE_PACKEDLINKPERSVECTOR_H
18#define XAODCORE_PACKEDLINKPERSVECTOR_H
19
20
23
24
25namespace xAOD {
26
30 template< class TARG, class VEC >
31 class AuxPersVector<SG::PackedLink<TARG>, VEC>
32 : public SG::PackedLinkVectorHolder<TARG, typename VEC::allocator_type> {
33
34 public:
36 typedef VEC& vector_type;
37
40 : SG::PackedLinkVectorHolder<TARG, typename VEC::allocator_type>
41 (auxid, &vec, store->linkedVector( auxid ), false)
42 {
43 assert( !isLinked );
44 }
45
46 virtual std::unique_ptr<SG::IAuxTypeVector> clone() const override {
47 return std::make_unique<AuxPersVector>(*this);
48 }
49 }; // class AuxPersVector
50
51
55 template< class TARG, class VALLOC, class VEC >
56 class AuxPersVector<std::vector<SG::PackedLink<TARG>, VALLOC>, VEC> :
57 public SG::PackedLinkVVectorHolder<TARG, VALLOC,
58 std::vector<SG::PackedLink<TARG>, VALLOC>,
59 typename VEC::allocator_type> {
60
61 public:
63 typedef VEC& vector_type;
64
67 : SG::PackedLinkVVectorHolder<TARG, VALLOC,
68 std::vector<SG::PackedLink<TARG>, VALLOC>,
69 typename VEC::allocator_type>
70 (auxid, &vec, store->linkedVector( auxid ), false)
71 {
72 assert( !isLinked );
73 }
74
75 virtual std::unique_ptr<SG::IAuxTypeVector> clone() const override {
76 return std::make_unique<AuxPersVector>(*this);
77 }
78 }; // class AuxPersVector
79
80
81} // namespace xAOD
82
83
84#endif // not XAODCORE_PACKEDLINKPERSVECTOR_H
Interface for non-const operations on an auxiliary store.
Definition IAuxStore.h:48
virtual std::unique_ptr< IAuxTypeVector > linkedVector()
Implementation of IAuxTypeVector for a vector of PackedLink.
PackedLinkVVectorHolder(auxid_t auxid, vector_type *vecPtr, IAuxTypeVector *linkedVec, bool ownFlag)
Implementation of IAuxTypeVector for PackedLink types.
PackedLinkVectorHolder(auxid_t auxid, vector_type *vecPtr, IAuxTypeVector *linkedVec, bool ownFlag)
Forward declaration.
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27
STL namespace.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.