ATLAS Offline Software
Loading...
Searching...
No Matches
Cache.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRACKING_ACTS_CACHE_H
6#define TRACKING_ACTS_CACHE_H
7
11#include "GaudiKernel/DataObject.h"
12
15
18
21
24#include <vector>
25#include <utility>
26
27namespace ActsTrk::Cache {
28
29 template<typename OT>
30 class CacheEntry : public DataObject {
31 public:
33 CacheEntry(DataVector<OT>* dv, unsigned int s, unsigned int e): container(dv){ranges.emplace_back(std::move(s),std::move(e));}
34 CacheEntry(DataVector<OT>* dv, const std::vector<std::pair<unsigned int, unsigned int>>& r): container(dv), ranges(r) {}
36 std::vector<std::pair<unsigned int, unsigned int>> ranges;
37 };
38
39 template<typename OT>
54
55 template<typename OT>
56 class Helper {
57 public:
58 using IDCWriteHandle = typename IdentifiableContainer<CacheEntry<OT>>::IDC_WriteHandle;
59
60 static StatusCode insert(IDCWriteHandle& wh, DataVector<OT>* dv, unsigned int range_start, unsigned int range_end);
61 };
62
63} // namespace
64
65#include "Cache.icc"
66
67#endif
DataVector adapter that acts like it holds const pointers.
An STL vector of pointers that by default owns its pointed-to elements.
This class is a general container which can hold objects of accessed by an IdentifierHash For more in...
IdentifiableContainerMT< T > IdentifiableContainer
Handle class for reading from StoreGate.
Property holding a SG store/key/clid from which a WriteHandle is made.
Handle class for recording to StoreGate.
Property holding a SG store/key/clid from which an UpdateHandle is made.
Handle class for modifying an existing object in StoreGate.
DataVector< OT > * container
Definition Cache.h:35
CacheEntry(DataVector< OT > *dv, unsigned int s, unsigned int e)
Definition Cache.h:33
std::vector< std::pair< unsigned int, unsigned int > > ranges
Definition Cache.h:36
CacheEntry(DataVector< OT > *dv, const std::vector< std::pair< unsigned int, unsigned int > > &r)
Definition Cache.h:34
SG::UpdateHandle< IDCBackend > BackendUpdateHandle
Definition Cache.h:46
SG::UpdateHandleKey< IDCBackend > BackendUpdateHandleKey
Definition Cache.h:45
SG::WriteHandle< IDC > WriteHandle
Definition Cache.h:49
typename EventContainers::IdentifiableCache< CacheEntry< OT > > IDCBackend
Definition Cache.h:42
IdentifiableContainer< CacheEntry< OT > > IDC
Definition Cache.h:43
SG::ReadHandleKey< IDC > ReadHandleKey
Definition Cache.h:51
SG::ReadHandle< IDC > ReadHandle
Definition Cache.h:52
SG::WriteHandleKey< IDC > WriteHandleKey
Definition Cache.h:48
typename IdentifiableContainer< CacheEntry< OT > >::IDC_WriteHandle IDCWriteHandle
Definition Cache.h:58
static StatusCode insert(IDCWriteHandle &wh, DataVector< OT > *dv, unsigned int range_start, unsigned int range_end)
Derived DataVector<T>.
Definition DataVector.h:795
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which an UpdateHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
int r
Definition globals.cxx:22