ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloTrackingGeometry
src
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
9
#include "
CaloTrackingGeometryBuilder.h
"
10
// Trk
11
#include <memory>
12
13
#include "
CaloDetDescrUtils/CaloDetDescrBuilder.h
"
14
// constructor
15
Calo::CaloTrackingGeometryBuilder::CaloTrackingGeometryBuilder
(
16
const
std::string& t,
const
std::string& n,
const
IInterface* p)
17
:
Calo
::
CaloTrackingGeometryBuilderImpl
(t, n, p) {
18
declareInterface<Trk::IGeometryBuilder>(
this
);
19
}
20
21
// Athena standard methods
22
// initialize
23
StatusCode
Calo::CaloTrackingGeometryBuilder::initialize
() {
24
return
Calo::CaloTrackingGeometryBuilderImpl::initialize
();
25
}
26
27
std::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 =
36
buildCaloDetDescrNoAlign
(serviceLocator(),
Athena::getMessageSvc
());
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
}
56
return
Calo::CaloTrackingGeometryBuilderImpl::createTrackingGeometry
(innerVol,
57
caloDDM,
58
nullptr
);
59
}
60
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition
AthMsgStreamMacros.h:32
CaloDetDescrBuilder.h
buildCaloDetDescrNoAlign
std::unique_ptr< CaloDetDescrManager > buildCaloDetDescrNoAlign(ISvcLocator *svcLocator, IMessageSvc *msgSvc)
Definition
CaloDetDescrBuilder.cxx:791
caloMgrStaticKey
static constexpr const char * caloMgrStaticKey
Definition
CaloDetDescrManager.h:43
CaloTrackingGeometryBuilder.h
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
Definition
AthCommonDataStore.h:95
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition
CaloDetDescrManager.h:469
Calo::CaloTrackingGeometryBuilderImpl::createTrackingGeometry
std::unique_ptr< Trk::TrackingGeometry > createTrackingGeometry(Trk::TrackingVolume *innerVol, const CaloDetDescrManager *caloDDM, const GeoAlignmentStore *geoAlign) const
TrackingGeometry Interface method.
Definition
CaloTrackingGeometryBuilderImpl.cxx:75
Calo::CaloTrackingGeometryBuilderImpl::initialize
virtual StatusCode initialize() override
AlgTool initailize method.
Definition
CaloTrackingGeometryBuilderImpl.cxx:46
Calo::CaloTrackingGeometryBuilderImpl::CaloTrackingGeometryBuilderImpl
CaloTrackingGeometryBuilderImpl(const std::string &, const std::string &, const IInterface *)
Constructor.
Definition
CaloTrackingGeometryBuilderImpl.cxx:36
Calo::CaloTrackingGeometryBuilder::CaloTrackingGeometryBuilder
CaloTrackingGeometryBuilder(const std::string &, const std::string &, const IInterface *)
Constructor.
Definition
CaloTrackingGeometryBuilder.cxx:15
Calo::CaloTrackingGeometryBuilder::trackingGeometry
virtual std::unique_ptr< Trk::TrackingGeometry > trackingGeometry(Trk::TrackingVolume *tvol=0) const override
TrackingGeometry Interface methode.
Definition
CaloTrackingGeometryBuilder.cxx:27
Calo::CaloTrackingGeometryBuilder::initialize
virtual StatusCode initialize() override
AlgTool initailize method.
Definition
CaloTrackingGeometryBuilder.cxx:23
Trk::TrackingVolume
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
Definition
TrackingVolume.h:119
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition
getMessageSvc.cxx:20
Calo
Definition
CaloTrackingGeometryBuilder.h:15
Generated on
for ATLAS Offline Software by
1.17.0