ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
eflowRec
src
eflowTrackClusterLink.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/*
6
* eflowTrackClusterLink.cxx
7
*
8
* Created on: 30.09.2013
9
* Author: tlodd
10
*/
11
12
#include "
eflowTrackClusterLink.h
"
13
#include "
AthenaKernel/SlotSpecificObj.h
"
14
#include "
CxxUtils/checker_macros.h
"
15
16
17
18
eflowTrackClusterLink
*
19
eflowTrackClusterLink::getInstance
(
eflowRecTrack
* track,
20
eflowRecCluster
* cluster,
21
const
EventContext& ctx)
22
{
23
static
SG::SlotSpecificObj<Cache>
slots
ATLAS_THREAD_SAFE
;
24
Cache
& c = *slots.get (ctx);
25
std::lock_guard
lock
(c.m_mutex);
26
if
(c.m_evt != ctx.evt()) {
27
c.m_map.clear();
28
c.m_evt = ctx.evt();
29
}
30
31
key_t
key (track, cluster);
32
auto
it = c.m_map.try_emplace (key, std::unique_ptr<eflowTrackClusterLink>()).first;
33
if
(!it->second) {
34
it->second = std::make_unique<eflowTrackClusterLink>(track,cluster);
35
}
36
return
it->second.get();
37
}
SlotSpecificObj.h
Maintain a set of objects, one per slot.
lock
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
checker_macros.h
Define macros for attributes used to control the static checker.
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition
checker_macros.h:211
SG::SlotSpecificObj
Maintain a set of objects, one per slot.
Definition
AthenaKernel/AthenaKernel/SlotSpecificObj.h:84
eflowRecCluster
This class extends the information about a xAOD::CaloCluster.
Definition
eflowRecCluster.h:40
eflowRecTrack
This class extends the information about a xAOD::Track.
Definition
eflowRecTrack.h:49
eflowTrackClusterLink
Stores pointers to an eflowRecTrack and an eflowRecCluster.
Definition
eflowTrackClusterLink.h:36
eflowTrackClusterLink::key_t
std::pair< eflowRecTrack *, eflowRecCluster * > key_t
Definition
eflowTrackClusterLink.h:58
eflowTrackClusterLink::getInstance
static eflowTrackClusterLink * getInstance(eflowRecTrack *track, eflowRecCluster *cluster, const EventContext &ctx)
Definition
eflowTrackClusterLink.cxx:19
eflowTrackClusterLink.h
eflowTrackClusterLink::Cache
Definition
eflowTrackClusterLink.h:68
Generated on
for ATLAS Offline Software by
1.17.0