ATLAS Offline Software
PackedLinkConversions.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 ATHCONTAINERS_PACKEDLINKCONVERSIONS_H
14 #define ATHCONTAINERS_PACKEDLINKCONVERSIONS_H
15 
16 
21 #include "AthLinks/ElementLink.h"
22 #include "AthLinks/DataLink.h"
23 #include "CxxUtils/ranges.h"
24 #include "CxxUtils/range_with_at.h"
26 #include <vector>
27 
28 
29 namespace SG { namespace detail {
30 
31 
35 template <class CONT>
37 {
38 public:
40 
41 
44 
45 
48 
49 
55 
56 
61  const value_type operator() (const PackedLinkBase& plink) const;
62 
63 
64 private:
67 };
68 
69 
73 template <class CONT>
75 {
76 public:
78 
79 
81  using const_PackedLink_span = typename AuxDataTraits<PackedLink<CONT> >::const_span;
82 
84  using value_type =
88 
89 
92 
93 
99 
100 
105  template <class VALLOC>
106  value_type operator() (const std::vector<PackedLink<CONT>, VALLOC>& velt) const;
107 
108 
109 private:
112 };
113 
114 
118 template <class CONT>
120 {
121 private:
124 
125 
126 public:
128  using value_type = typename PLVH::Link_t;
129 
131  using PLink_t = typename PLVH::PLink_t;
132 
134  using DLink_t = typename PLVH::DLink_t;
135 
138 
139 
147  SG::auxid_t auxid,
148  SG::auxid_t linked_auxid);
149 
150 
155  const value_type operator() (const PackedLinkBase& plink) const;
156 
157 
163  void set (PackedLinkBase& pl, const value_type& link);
164 
165 
171  template <class VALLOC, ElementLinkRange<CONT> RANGE>
172  void set (std::vector<PLink_t, VALLOC>& plv, const RANGE& r);
173 
174 
181  template <class VALLOC, ElementLinkRange<CONT> RANGE>
182  void insert (std::vector<PLink_t, VALLOC>& plv, size_t pos, const RANGE& r);
183 
184 
185 private:
188 
191 
194 };
195 
196 
197 } } // namespace SG::detail
198 
199 
201 
202 
203 #endif // not ATHCONTAINERS_PACKEDLINKCONVERSIONS_H
beamspotman.r
def r
Definition: beamspotman.py:676
SG::detail::PackedLinkVectorConstConverter::m_dlinks
const_DataLink_span m_dlinks
Span over DataLinks.
Definition: PackedLinkConversions.h:111
SG::detail::PackedLinkVectorConstConverter::const_DataLink_span
typename PLVH::const_DataLink_span const_DataLink_span
Type of span over DataLinks.
Definition: PackedLinkConversions.h:91
SG::detail::PackedLinkVectorConstConverter
Helper: Convert a vector of PackedLink to a span over ElementLinks.
Definition: PackedLinkConversions.h:75
SG::detail::PackedLinkConstConverter
Helper: Convert a PackedLink to an ElementLink.
Definition: PackedLinkConversions.h:37
SG::detail::PackedLinkConverter::m_linkedVec
PLVH::LinkedVector m_linkedVec
The vector of DataLinks.
Definition: PackedLinkConversions.h:190
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::detail::PackedLinkConstConverter::operator()
const value_type operator()(const PackedLinkBase &plink) const
Convert a PackedLink to an ElementLink.
SG::detail::PackedLinkVectorConstConverter::const_PackedLink_span
typename AuxDataTraits< PackedLink< CONT > >::const_span const_PackedLink_span
A span over the input PackedLink objects.
Definition: PackedLinkConversions.h:81
SG::detail::PackedLinkConstConverter::m_dlinks
const_DataLink_span m_dlinks
Span over DataLinks.
Definition: PackedLinkConversions.h:66
SG::detail::PackedLinkConverter
Helper: Convert a PackedLink to an ElementLink and vice-versa.
Definition: PackedLinkConversions.h:120
detail
Definition: extract_histogram_tag.cxx:14
SG::detail::PackedLinkVectorHelperBase::LinkedVector
Helper to access the IAuxTypeVector for an aux variable.
Definition: PackedLinkVectorHelper.h:84
PackedLinkVectorHelper.h
Helper functions for managing PackedLink variables.
range_with_conv.h
Add to a range class conversions to containers.
SG::detail::PackedLinkVectorHelper::PLink_t
PackedLink< CONT > PLink_t
The PackedLinks.
Definition: PackedLinkVectorHelper.h:265
SG::detail::PackedLinkVectorHelper
Helper functions for managing PackedLink variables.
Definition: PackedLinkVectorHelper.h:256
SG::detail::PackedLinkVectorHelper::Link_t
ElementLink< CONT > Link_t
The (linked) data links.
Definition: PackedLinkVectorHelper.h:259
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
SG::detail::PackedLinkVectorConstConverter::PackedLinkVectorConstConverter
PackedLinkVectorConstConverter(const const_DataLink_span &dlinks)
Constructor.
SG::detail::PackedLinkConverter::PackedLinkConverter
PackedLinkConverter(AuxVectorData &container, SG::auxid_t auxid, SG::auxid_t linked_auxid)
Constructor.
SG::AuxDataTraits
Allow customizing how aux data types are treated.
Definition: AuxDataTraits.h:40
PackedLinkImpl.h
Definition of PackedLink type.
AuxDataTraits.h
Allow customizing how aux data types are treated.
SG::detail::PackedLinkVectorHelper::DLink_t
DataLink< CONT > DLink_t
Definition: PackedLinkVectorHelper.h:260
AuxVectorData.h
Manage lookup of vectors of auxiliary data.
SG::detail::PackedLinkConstConverter::PackedLinkConstConverter
PackedLinkConstConverter(const const_DataLink_span &dlinks)
Constructor.
SG::detail::PackedLinkConverter::operator()
const value_type operator()(const PackedLinkBase &plink) const
Convert a PackedLink to an ElementLink.
PackedLinkConversions.icc
SG::detail::PackedLinkConverter::m_dlinks
DataLinkBase_span m_dlinks
Span over DataLinks.
Definition: PackedLinkConversions.h:193
SG::detail::PackedLinkConverter< PROXY::Cont_t >::DataLinkBase_span
typename PLVH::DataLinkBase_span DataLinkBase_span
Type of span over DataLinkBase's.
Definition: PackedLinkConversions.h:137
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
range_with_at.h
Add at() methods to a range class.
CxxUtils::range_with_at
Add at() methods to a range class.
Definition: range_with_at.h:33
SG::detail::PackedLinkConverter::m_container
AuxVectorData & m_container
The container holding the variables.
Definition: PackedLinkConversions.h:187
SG::detail::PackedLinkVectorHelper::const_DataLink_span
detail::AuxDataConstSpan< DataLink< CONT > > const_DataLink_span
Definition: PackedLinkVectorHelper.h:262
SG::PackedLinkBase
A packed version of ElementLink.
Definition: PackedLinkImpl.h:47
SG::detail::PackedLinkVectorHelperBase::DataLinkBase_span
detail::AuxDataSpan< DataLinkBase > DataLinkBase_span
Spans over the linked DataLinks.
Definition: PackedLinkVectorHelper.h:69
SG::detail::PackedLinkConverter< PROXY::Cont_t >::DLink_t
typename PLVH::DLink_t DLink_t
The linked DataLink type.
Definition: PackedLinkConversions.h:134
SG::detail::PackedLinkConverter::set
void set(PackedLinkBase &pl, const value_type &link)
Convert an ElementLink to a PackedLink.
SG::detail::PackedLinkConverter::insert
void insert(std::vector< PLink_t, VALLOC > &plv, size_t pos, const RANGE &r)
Insert a range of ElementLinks into a vector of PackedLinks.
CxxUtils::range_with_conv
Add to a range class conversions to containers.
Definition: range_with_conv.h:33
SG::AuxVectorData
Manage lookup of vectors of auxiliary data.
Definition: AuxVectorData.h:168
ranges.h
C++20 range helpers.
SG::detail::PackedLinkConverter::set
void set(std::vector< PLink_t, VALLOC > &plv, const RANGE &r)
Convert a range of ElementLinks to a vector of PackedLinks.
value_type
Definition: EDM_MasterSearch.h:11
SG::detail::PackedLinkVectorConstConverter::operator()
value_type operator()(const std::vector< PackedLink< CONT >, VALLOC > &velt) const
Convert a vector of PackedLinks to a span over ElementLinks.
SG::detail::PackedLinkConverter< PROXY::Cont_t >::PLink_t
typename PLVH::PLink_t PLink_t
The PackedLink type.
Definition: PackedLinkConversions.h:131
SG::detail::PackedLinkConstConverter::const_DataLink_span
typename PLVH::const_DataLink_span const_DataLink_span
Type of span over DataLinks.
Definition: PackedLinkConversions.h:47