ATLAS Offline Software
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 
17 #include "StoreGate/ReadHandle.h"
18 
20 #include "StoreGate/WriteHandle.h"
21 
22 #include "StoreGate/UpdateHandle.h"
24 
25 namespace 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>
38  class Handles {
39  public:
42 
45 
48 
51  };
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
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
beamspotman.r
def r
Definition: beamspotman.py:676
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
PlotCalibFromCool.dv
dv
Definition: PlotCalibFromCool.py:762
SG::UpdateHandleKey
Property holding a SG store/key/clid from which an UpdateHandle is made.
Definition: UpdateHandleKey.h:40
IdentifiableCache.h
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
ActsTrk::Cache::CacheEntry::CacheEntry
CacheEntry()
Definition: Cache.h:30
ActsTrk::Cache::Handles< BaseClusterType >::IDCBackend
typename EventContainers::IdentifiableCache< CacheEntry< BaseClusterType > > IDCBackend
Definition: Cache.h:40
ActsTrk::Cache::CacheEntry::CacheEntry
CacheEntry(DataVector< OT > *dv, std::vector< std::pair< unsigned int, unsigned int >> &r)
Definition: Cache.h:32
ActsTrk::Cache
Definition: Cache.h:25
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
WriteHandle.h
Handle class for recording to StoreGate.
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
ActsTrk::Cache::CacheEntry::CacheEntry
CacheEntry(DataVector< OT > *dv, unsigned int s, unsigned int e)
Definition: Cache.h:31
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ActsTrk::Cache::CacheEntry
Definition: Cache.h:28
ActsTrk::Cache::Helper
Definition: Cache.h:54
parseDir.wh
wh
Definition: parseDir.py:46
Cache.icc
DataVector< OT >
ReadCondHandleKey.h
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
UpdateHandleKey.h
Property holding a SG store/key/clid from which an UpdateHandle is made.
SG::UpdateHandle
Definition: UpdateHandle.h:94
ActsTrk::Cache::Handles
Definition: Cache.h:38
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
ActsTrk::Cache::Helper::insert
static StatusCode insert(IDCWriteHandle &wh, DataVector< OT > *dv, unsigned int range_start, unsigned int range_end)
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
UpdateHandle.h
Handle class for modifying an existing object in StoreGate.
ActsTrk::Cache::CacheEntry::ranges
std::vector< std::pair< unsigned int, unsigned int > > ranges
Definition: Cache.h:34
ActsTrk::Cache::CacheEntry::container
DataVector< OT > * container
Definition: Cache.h:33
IdentifiableContainerMT
Definition: IdentifiableContainerMT.h:30
ReadHandle.h
Handle class for reading from StoreGate.
EventContainers::IdentifiableCache
Definition: IdentifiableCache.h:29
IdentifiableContainer.h
This class is a general container which can hold objects of accessed by an IdentifierHash For more in...
ActsTrk::Cache::Helper::IDCWriteHandle
typename IdentifiableContainer< CacheEntry< OT > >::IDC_WriteHandle IDCWriteHandle
Definition: Cache.h:56