ATLAS Offline Software
TrackingGeometrySvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // TrackingGeometrySvc.h, (c) ATLAS Detector software
8 
9 #ifndef TRKDETDESCRINTERFACES_TRACKINGGEOMETRYSERVICE_H
10 #define TRKDETDESCRINTERFACES_TRACKINGGEOMETRYSERVICE_H
11 
17 #include "Gaudi/Property.h"
18 #include "GaudiKernel/ToolHandle.h"
21 
22 #ifdef TRKDETDESCR_MEMUSAGE
24 #endif
25 
26 
27 class StoreGateSvc;
28 class ISvcLocator;
29 template <class TYPE> class SvcFactory;
30 
31 namespace Trk {
32  class IGeometryProcessor;
33  class TrackingGeometry;
34  class Layer;
35  class LayerMaterialProperties;
36 
37 
46  public extends <AthService, ITrackingGeometrySvc>, virtual public ITagInfoMgr::Listener
47  {
48  public:
49 
50  virtual StatusCode initialize() override;
51  virtual StatusCode finalize() override;
52 
53  // TagInfoMgr callback
54  virtual void tagInfoUpdated() override final;
55 
57  StatusCode trackingGeometryInit(bool needsInit = true);
58 
60  virtual const Trk::TrackingGeometry* trackingGeometry() const override;
61 
63  virtual const std::string& trackingGeometryName() const override;
64 
65  friend class SvcFactory<TrackingGeometrySvc>;
66 
68  TrackingGeometrySvc(const std::string& name, ISvcLocator* svc);
69 
72 
73 
74  private:
75  void trackingGeometryNotSet() const;
76 
77  ToolHandle<Trk::IGeometryBuilder> m_trackingGeometryBuilder {this, "GeometryBuilder", ""};
79  mutable const Trk::TrackingGeometry* m_trackingGeometry {nullptr};
80 
82  Gaudi::Property<std::string> m_trackingGeometryName {this, "TrackingGeometryName", "AtlasTrackingGeometry"};
84  ToolHandleArray<Trk::IGeometryProcessor> m_geometryProcessors; // Currently doesn't work: {this, "GeometryProcessors", {}, "Tools to process geometry"};
86 
87  #ifdef TRKDETDESCR_MEMUSAGE
88  Trk::MemoryLogger m_memoryLogger;
89  float m_changeVsize {0.0};
90  float m_changeRss {0.0};
91  #endif
92 
93  Gaudi::Property<bool> m_rerunOnCallback {this, "RerunOnCallback", false};
95  Gaudi::Property<bool> m_buildGeometryFromTagInfo {this, "BuildGeometryFromTagInfo", true};
96  };
97 }
98 
101  return m_trackingGeometry; }
102 
103 inline const std::string& Trk::TrackingGeometrySvc::trackingGeometryName() const
104  { return m_trackingGeometryName; }
105 
106 #endif // TRKDETDESCRINTERFACES_TRACKINGGEOMETRYSERVICE_H
107 
Trk::TrackingGeometrySvc::m_trackingGeometry
const Trk::TrackingGeometry * m_trackingGeometry
the cached TrackingGeometry
Definition: TrackingGeometrySvc.h:79
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
Trk::TrackingGeometrySvc::m_geometryProcessors
ToolHandleArray< Trk::IGeometryProcessor > m_geometryProcessors
Definition: TrackingGeometrySvc.h:84
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
initialize
void initialize()
Definition: run_EoverP.cxx:894
ITagInfoMgr.h
SvcFactory
Definition: AthCnvSvc.h:28
python.RingerConstants.Layer
Layer
Definition: RingerConstants.py:42
Trk::MemoryLogger
Definition: MemoryLogger.h:31
Trk::TrackingGeometrySvc::trackingGeometryName
virtual const std::string & trackingGeometryName() const override
Definition: TrackingGeometrySvc.h:103
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
Trk::TrackingGeometrySvc
Definition: TrackingGeometrySvc.h:47
ITagInfoMgr::Listener
Listener interface class that client who want to be notified about TagInfo update should implement (a...
Definition: ITagInfoMgr.h:72
Trk::TrackingGeometry
Definition: TrackingGeometry.h:67
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MemoryLogger.h
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
LayerIndex.h
Trk::TrackingGeometrySvc::trackingGeometry
virtual const Trk::TrackingGeometry * trackingGeometry() const override
Provide the TrackingGeometry.
Definition: TrackingGeometrySvc.h:99
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::TrackingGeometrySvc::trackingGeometryNotSet
void trackingGeometryNotSet() const
Definition: TrackingGeometrySvc.cxx:179
IGeometryProcessor.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
LayerMaterialMap.h
IGeometryBuilder.h
ITrackingGeometrySvc.h
Trk::TrackingGeometrySvc::~TrackingGeometrySvc
virtual ~TrackingGeometrySvc()
Destructor.
AthService.h