ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkDetDescrAthenaPool
src
LayerMaterialMapCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// LayerMaterialMapCnv.cxx, (c) ATLAS Detector software
8
9
#include "
LayerMaterialMapCnv.h
"
10
#include "GaudiKernel/IToolSvc.h"
11
12
//-----------------------------------------------------------------------------
13
// Constructor
14
//-----------------------------------------------------------------------------
15
LayerMaterialMapCnv::LayerMaterialMapCnv
(ISvcLocator* svcloc):
16
LayerMaterialMapCnvBase
(svcloc),
17
m_msgSvc
( msgSvc() )
18
{
19
}
20
21
//-----------------------------------------------------------------------------
22
// Initializer
23
//-----------------------------------------------------------------------------
24
StatusCode
LayerMaterialMapCnv::initialize
()
25
{
26
StatusCode
sc
=
LayerMaterialMapCnvBase::initialize
();
27
MsgStream log (
m_msgSvc
,
"ElementTableCnv"
);
28
if
(
sc
.isFailure() ) {
29
log << MSG::FATAL <<
"Could not initialize cnv base"
<<
endmsg
;
30
return
sc
;
31
}
32
//-------------------------------------------------------------------------
33
// Set up the message stream
34
//-------------------------------------------------------------------------
35
log << MSG::INFO <<
"LayerMaterialMapCnv::initialize()"
<<
endmsg
;
36
37
return
StatusCode::SUCCESS;
38
}
39
40
41
LayerMaterialMap_PERS
*
42
LayerMaterialMapCnv::createPersistentWithKey
(
Trk::LayerMaterialMap
* transCont,
43
const
std::string& key)
44
{
45
MsgStream log (
m_msgSvc
,
"LayerMaterialMapCnv: "
+ key);
46
return
m_TPConverter_tlp1
.createPersistent( transCont, log );
47
}
48
49
50
//-----------------------------------------------------------------------------
51
// Create transient collection
52
//-----------------------------------------------------------------------------
53
Trk::LayerMaterialMap
*
54
LayerMaterialMapCnv::createTransientWithKey
(
const
Token
* token,
const
std::string& key)
55
{
56
static
const
Guid
tlp1_guid(
"3DA92DBD-DA78-43A2-BFDF-9E19E2BF1E8A"
);
57
58
Trk::LayerMaterialMap
*p_collection =
nullptr
;
59
60
MsgStream log (
m_msgSvc
,
"LayerMaterialMapCnv: "
+ key);
61
62
if
(
compareClassGuid
(token, tlp1_guid ) ) {
63
poolReadObject< Trk::LayerMaterialMap_tlp1 >
(
m_TPConverter_tlp1
, token );
64
p_collection =
m_TPConverter_tlp1
.createTransient( log );
65
}
66
return
p_collection;
67
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
LayerMaterialMapCnv.h
LayerMaterialMap_PERS
Trk::LayerMaterialMap_tlp1 LayerMaterialMap_PERS
Definition
LayerMaterialMapCnv.h:21
LayerMaterialMapCnvBase
T_AthenaPoolCustomCnvWithKey< Trk::LayerMaterialMap, LayerMaterialMap_PERS > LayerMaterialMapCnvBase
Definition
LayerMaterialMapCnv.h:23
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
LayerMaterialMapCnv::initialize
virtual StatusCode initialize() override
Gaudi Service Interface method implementations:
Definition
LayerMaterialMapCnv.cxx:24
LayerMaterialMapCnv::m_TPConverter_tlp1
LayerMaterialMapCnv_tlp1 m_TPConverter_tlp1
Definition
LayerMaterialMapCnv.h:47
LayerMaterialMapCnv::createTransientWithKey
virtual Trk::LayerMaterialMap * createTransientWithKey(const Token *token, const std::string &key) override
method to be implemented by the developer.
Definition
LayerMaterialMapCnv.cxx:54
LayerMaterialMapCnv::LayerMaterialMapCnv
LayerMaterialMapCnv(ISvcLocator *svcloc)
Definition
LayerMaterialMapCnv.cxx:15
LayerMaterialMapCnv::m_msgSvc
IMessageSvc * m_msgSvc
Definition
LayerMaterialMapCnv.h:46
LayerMaterialMapCnv::createPersistentWithKey
virtual LayerMaterialMap_PERS * createPersistentWithKey(Trk::LayerMaterialMap *transCont, const std::string &key) override
method to be implemented by the developer.
Definition
LayerMaterialMapCnv.cxx:42
T_AthenaPoolCustomCnvWithKey< Trk::LayerMaterialMap, LayerMaterialMap_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnvWithKey< Trk::LayerMaterialMap, LayerMaterialMap_PERS >::initialize
virtual StatusCode initialize()
T_AthenaPoolCustomCnvWithKey< Trk::LayerMaterialMap, LayerMaterialMap_PERS >::poolReadObject
P * poolReadObject(const Token *token)
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition
Token.h:22
Trk::LayerMaterialMap
This class extends the DataVector<Trk::LayerMaterialProperties> by an elementTable;.
Definition
LayerMaterialMap.h:32
Generated on
for ATLAS Offline Software by
1.17.0