ATLAS Offline Software
Loading...
Searching...
No Matches
Cache.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 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
25namespace ActsTrk::Cache {
26
27 template<typename OT>
28 class CacheEntry : public DataObject {
29 public:
31 CacheEntry(DataVector<OT>* dv, unsigned int s, unsigned int e): container(dv){ranges.emplace_back(std::move(s),std::move(e));}
32 CacheEntry(DataVector<OT>* dv, std::vector<std::pair<unsigned int, unsigned int>>& r): container(dv), ranges(std::move(r)) {}
34 std::vector<std::pair<unsigned int, unsigned int>> ranges;
35 };
36
37 template<typename OT>
52
53 template<typename OT>
54 class Helper {
55 public:
56 using IDCWriteHandle = typename IdentifiableContainer<CacheEntry<OT>>::IDC_WriteHandle;
57
58 static StatusCode insert(IDCWriteHandle& wh, DataVector<OT>* dv, unsigned int range_start, unsigned int range_end);
59 };
60
61} // namespace
62
63#include "Cache.icc"
64
65#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:33
CacheEntry(DataVector< OT > *dv, unsigned int s, unsigned int e)
Definition Cache.h:31
std::vector< std::pair< unsigned int, unsigned int > > ranges
Definition Cache.h:34
CacheEntry(DataVector< OT > *dv, std::vector< std::pair< unsigned int, unsigned int > > &r)
Definition Cache.h:32
SG::UpdateHandle< IDCBackend > BackendUpdateHandle
Definition Cache.h:44
SG::UpdateHandleKey< IDCBackend > BackendUpdateHandleKey
Definition Cache.h:43
SG::WriteHandle< IDC > WriteHandle
Definition Cache.h:47
typename EventContainers::IdentifiableCache< CacheEntry< OT > > IDCBackend
Definition Cache.h:40
IdentifiableContainer< CacheEntry< OT > > IDC
Definition Cache.h:41
SG::ReadHandleKey< IDC > ReadHandleKey
Definition Cache.h:49
SG::ReadHandle< IDC > ReadHandle
Definition Cache.h:50
SG::WriteHandleKey< IDC > WriteHandleKey
Definition Cache.h:46
typename IdentifiableContainer< CacheEntry< OT > >::IDC_WriteHandle IDCWriteHandle
Definition Cache.h:56
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
STL namespace.