ATLAS Offline Software
CaloTrackingGeometryBuilder.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 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
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 =
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 }
59 
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
Calo
Definition: CaloTrackingGeometryBuilder.h:15
Calo::CaloTrackingGeometryBuilderImpl::initialize
virtual StatusCode initialize() override
AlgTool initailize method.
Definition: CaloTrackingGeometryBuilderImpl.cxx:47
Calo::CaloTrackingGeometryBuilderImpl::createTrackingGeometry
std::unique_ptr< Trk::TrackingGeometry > createTrackingGeometry(Trk::TrackingVolume *innerVol, const CaloDetDescrManager *caloDDM) const
TrackingGeometry Interface method.
Definition: CaloTrackingGeometryBuilderImpl.cxx:96
Calo::CaloTrackingGeometryBuilderImpl
Definition: CaloTrackingGeometryBuilderImpl.h:50
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
CaloDetDescrBuilder.h
Calo::CaloTrackingGeometryBuilder::trackingGeometry
virtual std::unique_ptr< Trk::TrackingGeometry > trackingGeometry(Trk::TrackingVolume *tvol=0) const override
TrackingGeometry Interface methode.
Definition: CaloTrackingGeometryBuilder.cxx:27
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Calo::CaloTrackingGeometryBuilder::CaloTrackingGeometryBuilder
CaloTrackingGeometryBuilder(const std::string &, const std::string &, const IInterface *)
Constructor.
Definition: CaloTrackingGeometryBuilder.cxx:15
CaloTrackingGeometryBuilder.h
Trk::TrackingVolume
Definition: TrackingVolume.h:121
Calo::CaloTrackingGeometryBuilder::initialize
virtual StatusCode initialize() override
AlgTool initailize method.
Definition: CaloTrackingGeometryBuilder.cxx:23
buildCaloDetDescrNoAlign
std::unique_ptr< CaloDetDescrManager > buildCaloDetDescrNoAlign(ISvcLocator *svcLocator, IMessageSvc *msgSvc)
Definition: CaloDetDescrBuilder.cxx:791