ATLAS Offline Software
Loading...
Searching...
No Matches
CaloTrackingGeometryBuilder.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6// CaloTrackingGeometryBuilder.cxx, (c) ATLAS Detector software
8// Calo
10// Trk
11#include <memory>
12
14// constructor
16 const std::string& t, const std::string& n, const IInterface* p)
18 declareInterface<Trk::IGeometryBuilder>(this);
19}
20
21// Athena standard methods
22// initialize
26
27std::unique_ptr<Trk::TrackingGeometry> Calo::CaloTrackingGeometryBuilder::trackingGeometry(
28 Trk::TrackingVolume* innerVol) const {
29
30 std::unique_ptr<Trk::TrackingGeometry> trackingGeometry{};
31
32 const CaloDetDescrManager* caloDDM =
33 detStore()->tryConstRetrieve<CaloDetDescrManager>(caloMgrStaticKey);
34 if (!caloDDM) {
35 std::unique_ptr<CaloDetDescrManager> caloMgrPtr =
37 if (detStore()->record(std::move(caloMgrPtr), caloMgrStaticKey) !=
38 StatusCode::SUCCESS) {
39 ATH_MSG_WARNING("Failed to record CaloDetDescrManager with the key "
40 << caloMgrStaticKey << " in DetStore");
41 return trackingGeometry;
42 }
43 if (detStore()->retrieve(caloDDM, caloMgrStaticKey) !=
44 StatusCode::SUCCESS) {
45 ATH_MSG_WARNING("Failed to retrieve CaloDetDescrManager with the key "
46 << caloMgrStaticKey << " from DetStore");
47 return trackingGeometry;
48 }
49 }
50 // if caloDD is still null, we;re in trouble because it gets dereferenced
51 // after this
52 if (!caloDDM) {
53 ATH_MSG_WARNING("caloDDM is a null pointer in CaloTrackingGeometryBuilder");
54 return trackingGeometry;
55 }
57 caloDDM,
58 nullptr);
59}
60
#define ATH_MSG_WARNING(x)
std::unique_ptr< CaloDetDescrManager > buildCaloDetDescrNoAlign(ISvcLocator *svcLocator, IMessageSvc *msgSvc)
static constexpr const char * caloMgrStaticKey
const ServiceHandle< StoreGateSvc > & detStore() const
This class provides the client interface for accessing the detector description information common to...
std::unique_ptr< Trk::TrackingGeometry > createTrackingGeometry(Trk::TrackingVolume *innerVol, const CaloDetDescrManager *caloDDM, const GeoAlignmentStore *geoAlign) const
TrackingGeometry Interface method.
virtual StatusCode initialize() override
AlgTool initailize method.
CaloTrackingGeometryBuilderImpl(const std::string &, const std::string &, const IInterface *)
Constructor.
CaloTrackingGeometryBuilder(const std::string &, const std::string &, const IInterface *)
Constructor.
virtual std::unique_ptr< Trk::TrackingGeometry > trackingGeometry(Trk::TrackingVolume *tvol=0) const override
TrackingGeometry Interface methode.
virtual StatusCode initialize() override
AlgTool initailize method.
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
IMessageSvc * getMessageSvc(bool quiet=false)