ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetDetDescr
InDetGeoModelUtils
src
DistortedMaterialManager.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
InDetGeoModelUtils/DistortedMaterialManager.h
"
6
#include "
GeoModelInterfaces/StoredMaterialManager.h
"
7
#include "
GeoModelUtilities/DecodeVersionKey.h
"
8
#include "
StoreGate/StoreGateSvc.h
"
9
#include "
RDBAccessSvc/IRDBAccessSvc.h
"
10
#include "GaudiKernel/Bootstrap.h"
11
#include "GaudiKernel/MsgStream.h"
12
#include "GaudiKernel/ISvcLocator.h"
13
#include "
GeoModelInterfaces/IGeoDbTagSvc.h
"
14
#include "
AthenaBaseComps/AthCheckMacros.h
"
15
16
namespace
InDetDD
{
17
DistortedMaterialManager::DistortedMaterialManager
()
18
:
AthMessaging
(
"ExtraMaterialManager"
)
19
{
20
if
(
initialize
().isFailure())
21
throw
std::runtime_error(
"Failed to initialize DistortedMaterialManager!"
);
22
}
23
24
StatusCode
DistortedMaterialManager::initialize
() {
25
ISvcLocator* svcLocator = Gaudi::svcLocator();
26
27
SmartIF<StoreGateSvc> detStore{svcLocator->service(
"DetectorStore"
)};
28
ATH_CHECK
(detStore.isValid());
29
30
SmartIF<IGeoDbTagSvc> geoDbTag{svcLocator->service(
"GeoDbTagSvc"
)};
31
ATH_CHECK
(geoDbTag.isValid());
32
33
SmartIF<IRDBAccessSvc> rdbSvc{svcLocator->service(geoDbTag->getParamSvcName())};
34
ATH_CHECK
(rdbSvc.isValid());
35
36
// Get version tag and node for InDet.
37
DecodeVersionKey
versionKey(
"InnerDetector"
);
38
const
std::string& detectorKey = versionKey.
tag
();
39
const
std::string& detectorNode = versionKey.
node
();
40
41
ATH_MSG_DEBUG
(
"Retrieving Record Sets from database ..."
);
42
ATH_MSG_DEBUG
(
"Key = "
<< detectorKey <<
" Node = "
<< detectorNode);
43
44
m_xMatTable
= rdbSvc->getRecordsetPtr(
"InDetExtraMaterial"
, detectorKey, detectorNode);
45
m_materialManager
= detStore->tryRetrieve<
StoredMaterialManager
>(
"MATERIALS"
);
46
47
ATH_MSG_DEBUG
(
"Initialized InDet Distorted Material Manager"
);
48
49
return
StatusCode::SUCCESS;
50
}
51
52
}
// end namespace
AthCheckMacros.h
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
DecodeVersionKey.h
DistortedMaterialManager.h
IGeoDbTagSvc.h
IRDBAccessSvc.h
Definition of the abstract IRDBAccessSvc interface.
StoreGateSvc.h
StoredMaterialManager.h
AthMessaging::AthMessaging
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Definition
AthMessaging.cxx:13
DecodeVersionKey
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
Definition
DecodeVersionKey.h:18
DecodeVersionKey::tag
const std::string & tag() const
Return version tag.
Definition
DecodeVersionKey.cxx:91
DecodeVersionKey::node
const std::string & node() const
Return the version node.
Definition
DecodeVersionKey.cxx:97
InDetDD::DistortedMaterialManager::m_xMatTable
IRDBRecordset_ptr m_xMatTable
Definition
DistortedMaterialManager.h:25
InDetDD::DistortedMaterialManager::initialize
StatusCode initialize()
Definition
DistortedMaterialManager.cxx:24
InDetDD::DistortedMaterialManager::m_materialManager
StoredMaterialManager * m_materialManager
Definition
DistortedMaterialManager.h:24
InDetDD::DistortedMaterialManager::DistortedMaterialManager
DistortedMaterialManager()
Definition
DistortedMaterialManager.cxx:17
StoredMaterialManager
This class holds one or more material managers and makes them storeable, under StoreGate.
Definition
StoredMaterialManager.h:30
InDetDD
Message Stream Member.
Definition
FakeTrackBuilder.h:8
Generated on
for ATLAS Offline Software by
1.17.0