ATLAS Offline Software
Tracking
Acts
ActsDataPreparation
src
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
8
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
9
#include "
AthContainers/DataVector.h
"
10
#include "
AthContainers/ConstDataVector.h
"
11
#include "GaudiKernel/DataObject.h"
12
13
#include "
EventContainers/IdentifiableContainer.h
"
14
#include "
EventContainers/IdentifiableCache.h
"
15
16
#include "
StoreGate/ReadCondHandleKey.h
"
17
#include "
StoreGate/ReadHandle.h
"
18
19
#include "
StoreGate/WriteHandleKey.h
"
20
#include "
StoreGate/WriteHandle.h
"
21
22
#include "
StoreGate/UpdateHandle.h
"
23
#include "
StoreGate/UpdateHandleKey.h
"
24
25
namespace
ActsTrk::Cache
{
26
27
template
<
typename
OT>
28
class
CacheEntry
:
public
DataObject {
29
public
:
30
CacheEntry
(){}
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
)) {}
33
DataVector<OT>
*
container
;
34
std::vector<std::pair<unsigned int, unsigned int>>
ranges
;
35
};
36
37
template
<
typename
OT>
38
class
Handles
{
39
public
:
40
using
IDCBackend
=
typename
EventContainers::IdentifiableCache<CacheEntry<OT>
>;
41
using
IDC
=
IdentifiableContainer<CacheEntry<OT>
>;
42
43
using
BackendUpdateHandleKey
=
SG::UpdateHandleKey<IDCBackend>
;
44
using
BackendUpdateHandle
=
SG::UpdateHandle<IDCBackend>
;
45
46
using
WriteHandleKey
=
SG::WriteHandleKey<IDC>
;
47
using
WriteHandle
=
SG::WriteHandle<IDC>
;
48
49
using
ReadHandleKey
=
SG::ReadHandleKey<IDC>
;
50
using
ReadHandle
=
SG::ReadHandle<IDC>
;
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
Generated on Mon Dec 23 2024 21:07:38 for ATLAS Offline Software by
1.8.18