Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
IdentContIndexingPolicy.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-2025 CERN for the benefit of the ATLAS collaboration
4 */
11 #ifndef ATHLINKS_TOOLS_IDENTCONTINDEXINGPOLICY_H
12 #define ATHLINKS_TOOLS_IDENTCONTINDEXINGPOLICY_H
13 
15 #include "AthLinks/exceptions.h"
17 #include <concepts>
18 #include <cassert>
19 #include <stdexcept>
20 
21 
22 namespace SG {
23 
24 
38 template <class CONT>
40 {
41 private:
42  typedef typename CONT::IDENTIFIABLE coll_type;
43  typedef typename coll_type::value_type obj_type;
44 
45 
46 public:
51 
53  typedef unsigned int index_type;
54 
57 
58 
64 
65 
71 
72 
77  static void reset (stored_index_type& index);
78 
79 
88  static
90 
91 
100  static void
101  reverseLookup(const CONT& data,
102  ElementConstReference element,
103  index_type& index);
104 };
105 
106 
107 } // namespace SG
108 
109 
111 
112 
113 #endif // ATHLINKS_TOOLS_IDENTCONTINDEXINGPOLICY_H
SG::IdentContIndexingPolicy::isValid
static bool isValid(stored_index_type index)
Test to see if an index is valid.
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
SG::IdentContIndexingPolicy::coll_type
CONT::IDENTIFIABLE coll_type
Definition: IdentContIndexingPolicy.h:42
SG::IdentContIndexingPolicy::reset
static void reset(stored_index_type &index)
Make an index invalid.
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
index
Definition: index.py:1
SG::IdentContIndexingPolicy::lookup
static ElementType lookup(index_type index, const CONT &data)
Retrieve from a container the element corresponding to an index.
SG::IdentContIndexingPolicy::index_type
unsigned int index_type
The type of an index, as provided to or returned from a link.
Definition: IdentContIndexingPolicy.h:53
SG::IdentContIndexingPolicy::ElementConstPointer
type_tools::Copy< obj_type >::const_pointer ElementConstPointer
Definition: IdentContIndexingPolicy.h:50
IdentContIndexingPolicy.icc
SG::IdentContIndexingPolicy::ElementConstReference
type_tools::Copy< obj_type >::const_reference ElementConstReference
Definition: IdentContIndexingPolicy.h:49
SG::IdentContIndexingPolicy::stored_index_type
index_type stored_index_type
The type of an index, as stored internally within a link.
Definition: IdentContIndexingPolicy.h:56
SG::IdentContIndexingPolicy::storedToExternal
static index_type storedToExternal(stored_index_type index)
Convert from stored to external index types.
IdentContIndex.h
SG::IdentContIndexingPolicy
Indexing policy for an IdentifiableContainer.
Definition: IdentContIndexingPolicy.h:40
SG::IdentContIndexingPolicy::ElementType
type_tools::Copy< obj_type >::type ElementType
The type we get when we dereference a link, and derived types.
Definition: IdentContIndexingPolicy.h:48
SG::IdentContIndexingPolicy::obj_type
coll_type::value_type obj_type
Definition: IdentContIndexingPolicy.h:43
SG::IdentContIndexingPolicy::reverseLookup
static void reverseLookup(const CONT &data, ElementConstReference element, index_type &index)
Find the index of the (first) instance of ELEMENT in DATA.
value_type
Definition: EDM_MasterSearch.h:11
type_tools.h