ATLAS Offline Software
TRT_TrackExtensionAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // Header file for class TRT_TrackExtensionAlg
8 // (c) ATLAS Detector software
10 // Class for extension trackS reconstructed in Pxels and SCT to TRT
12 // Version 1.0 22/08/2005 I.Gavrilenko
14 
15 #ifndef TRT_TrackExtensionAlg_H
16 #define TRT_TrackExtensionAlg_H
17 
18 #include <string>
20 #include "GaudiKernel/ToolHandle.h"
22 
23 // Store Gate handle keys
26 
29 
31 #include <atomic>
32 
33 namespace InDet {
34 
36 
38  // Public methods:
40 
41  public:
42 
44  // Standard Algotithm methods
46 
47  TRT_TrackExtensionAlg(const std::string &name, ISvcLocator *pSvcLocator);
50  StatusCode execute(const EventContext& ctx) const;
52 
54  // Print internal algorithm parameters and status
56 
57  protected:
59  // Protected data
61 
62  struct Counter_t {
63  int m_nTracks = 0 ; // Number input tracks
64  int m_nTracksExtended = 0; // Number output tracks
66  m_nTracks +=a.m_nTracks;
67  m_nTracksExtended +=a.m_nTracksExtended;
68  return *this;
69  }
70  };
71  mutable std::mutex m_counterMutex ATLAS_THREAD_SAFE;
72  mutable Counter_t m_totalCounts ATLAS_THREAD_SAFE;
73 
74  ToolHandle<ITRT_TrackExtensionTool> m_trtExtension{this, "TrackExtensionTool", "InDet::TRT_TrackExtensionTool_xk", "TRT track extension tool"};
75 
76  // Data handle keys
77  SG::ReadHandleKey<TrackCollection> m_inputTracksKey { this, "InputTracksLocation", "SiSPSeededTracks", "Input tracks container name" };
78  SG::WriteHandleKey<TrackExtensionMap> m_outputTracksKey { this, "ExtendedTracksLocation", "ExtendedTracksMapPhase", "Output tracks container name" };
79 
81  // Protected methods
83 
84  MsgStream& dumpConditions(MsgStream& out) const;
85  static MsgStream& dumpEvent(MsgStream& out, const Counter_t &counter) ;
86 
87  };
88 }
89 #endif // TRT_TrackExtensionAlg_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
InDet::TRT_TrackExtensionAlg::~TRT_TrackExtensionAlg
virtual ~TRT_TrackExtensionAlg()
Definition: TRT_TrackExtensionAlg.h:48
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
InDet::TRT_TrackExtensionAlg::Counter_t::m_nTracksExtended
int m_nTracksExtended
Definition: TRT_TrackExtensionAlg.h:64
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
InDet::TRT_TrackExtensionAlg::ATLAS_THREAD_SAFE
Counter_t m_totalCounts ATLAS_THREAD_SAFE
Definition: TRT_TrackExtensionAlg.h:72
SG::WriteHandleKey< TrackExtensionMap >
InDet::TRT_TrackExtensionAlg::execute
StatusCode execute(const EventContext &ctx) const
Definition: TRT_TrackExtensionAlg.cxx:41
InDet::TRT_TrackExtensionAlg::ATLAS_THREAD_SAFE
std::mutex m_counterMutex ATLAS_THREAD_SAFE
Definition: TRT_TrackExtensionAlg.h:71
InDet::TRT_TrackExtensionAlg::Counter_t
Definition: TRT_TrackExtensionAlg.h:62
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::TRT_TrackExtensionAlg::m_trtExtension
ToolHandle< ITRT_TrackExtensionTool > m_trtExtension
Definition: TRT_TrackExtensionAlg.h:74
TrackCollection.h
ITRT_TrackExtensionTool.h
InDet::TRT_TrackExtensionAlg::TRT_TrackExtensionAlg
TRT_TrackExtensionAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TRT_TrackExtensionAlg.cxx:18
InDet::TRT_TrackExtensionAlg::Counter_t::operator+=
Counter_t & operator+=(const Counter_t &a)
Definition: TRT_TrackExtensionAlg.h:65
InDet::TRT_TrackExtensionAlg::dumpEvent
static MsgStream & dumpEvent(MsgStream &out, const Counter_t &counter)
Definition: TRT_TrackExtensionAlg.cxx:129
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
TrackExtensionMap.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
InDet::TRT_TrackExtensionAlg::m_outputTracksKey
SG::WriteHandleKey< TrackExtensionMap > m_outputTracksKey
Definition: TRT_TrackExtensionAlg.h:78
InDet::TRT_TrackExtensionAlg::finalize
StatusCode finalize()
Definition: TRT_TrackExtensionAlg.cxx:89
InDet::TRT_TrackExtensionAlg::m_inputTracksKey
SG::ReadHandleKey< TrackCollection > m_inputTracksKey
Definition: TRT_TrackExtensionAlg.h:77
a
TList * a
Definition: liststreamerinfos.cxx:10
InDet::TRT_TrackExtensionAlg::dumpConditions
MsgStream & dumpConditions(MsgStream &out) const
Definition: TRT_TrackExtensionAlg.cxx:102
InDet::TRT_TrackExtensionAlg
Definition: TRT_TrackExtensionAlg.h:35
test_pyathena.counter
counter
Definition: test_pyathena.py:15
checker_macros.h
Define macros for attributes used to control the static checker.
InDet::TRT_TrackExtensionAlg::Counter_t::m_nTracks
int m_nTracks
Definition: TRT_TrackExtensionAlg.h:63
InDet::TRT_TrackExtensionAlg::initialize
StatusCode initialize()
Definition: TRT_TrackExtensionAlg.cxx:26