ATLAS Offline Software
JaggedVecPersVector.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  */
17 #ifndef XAODCORE_JAGGEDVECPERSVECTOR_H
18 #define XAODCORE_JAGGEDVECPERSVECTOR_H
19 
22 
23 
24 namespace xAOD {
25 
26  template< class T, class VEC >
27  class AuxPersVector<SG::JaggedVecElt<T>, VEC>
28  : public SG::JaggedVecVectorHolder<T, typename VEC::allocator_type> {
29 
30  public:
32  typedef VEC& vector_type;
33 
36  : SG::JaggedVecVectorHolder<T, typename VEC::allocator_type>
37  (auxid, &vec, store->linkedVector( auxid ), false)
38  {
39  assert( !isLinked );
40  }
41 
42  virtual std::unique_ptr<SG::IAuxTypeVector> clone() const override {
43  return std::make_unique<AuxPersVector>(*this);
44  }
45  }; // class AuxPersVector
46 
47 
48 } // namespace xAOD
49 
50 
51 #endif // not XAODCORE_JAGGEDVECPERSVECTOR_H
SG::IAuxTypeVector::isLinked
bool isLinked() const
Return true if this variable is linked from another one.
Definition: IAuxTypeVector.h:226
SGTest::store
TestStore store
Definition: TestStore.cxx:23
xAOD::AuxPersVector< SG::JaggedVecElt< T >, VEC >::clone
virtual std::unique_ptr< SG::IAuxTypeVector > clone() const override
Make a copy of this vector.
Definition: JaggedVecPersVector.h:42
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::AuxPersVector< SG::JaggedVecElt< T >, VEC >::AuxPersVector
AuxPersVector(SG::auxid_t auxid, vector_type vec, [[maybe_unused]] bool isLinked, SG::IAuxStore *store)
Constructor.
Definition: JaggedVecPersVector.h:35
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
AuxPersVector.h
SG::JaggedVecVectorHolder
Implementation of IAuxTypeVector for JaggedVec types.
Definition: JaggedVecVector.h:42
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
SG::IAuxTypeVector::linkedVector
virtual std::unique_ptr< IAuxTypeVector > linkedVector()
Return IAuxTypeVector of a linked variable, if there is one.
Definition: IAuxTypeVector.h:217
xAOD::AuxPersVector
Class managing concrete vector variables.
Definition: AuxPersVector.h:28
JaggedVec.h
Auxiliary variable type allowing storage as a jagged vector. That is, the payloads for all the DataVe...
SG::IAuxTypeVector::auxid
auxid_t auxid() const
Return the auxid of the variable this vector represents.
Definition: IAuxTypeVector.h:232
python.Dumpers.typename
def typename(t)
Definition: Dumpers.py:194
SG::IAuxStore
Interface for non-const operations on an auxiliary store.
Definition: IAuxStore.h:48
xAOD::AuxPersVector< SG::JaggedVecElt< T >, VEC >::vector_type
VEC & vector_type
Convenience type definition.
Definition: JaggedVecPersVector.h:32