ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkDetDescrAthenaPool
src
MaterialStepCollectionCnv.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
// MaterialStepCollectionCnv.cxx, (c) ATLAS Detector software
8
9
#include "
MaterialStepCollectionCnv.h
"
10
#include "GaudiKernel/MsgStream.h"
11
12
13
//-----------------------------------------------------------------------------
14
// Constructor
15
//-----------------------------------------------------------------------------
16
17
MaterialStepCollectionCnv::MaterialStepCollectionCnv
( ISvcLocator *svcloc ) :
18
MaterialStepCollectionCnvBase
(svcloc),
19
m_msgSvc
( msgSvc() )
20
{}
21
22
MaterialStepCollection_PERS
*
23
MaterialStepCollectionCnv::createPersistentWithKey
(
Trk::MaterialStepCollection
*transCont,
24
const
std::string& key)
25
{
26
MsgStream log (
m_msgSvc
,
"MaterialStepCollectionCnv:"
+ key);
27
return
m_TPConverter
.createPersistent( transCont, log );
28
}
29
30
31
Trk::MaterialStepCollection
*
32
MaterialStepCollectionCnv::createTransientWithKey
(
const
Token
* token,
const
std::string& key)
33
{
34
MsgStream log (
m_msgSvc
,
"MaterialStepCollectionCnv:"
+ key);
35
36
static
const
Guid
p1_guid(
"DF8A7FA8-693F-44E0-A5E5-F9907B8B429E"
);
37
38
Trk::MaterialStepCollection
* tCollection =
nullptr
;
39
if
(
compareClassGuid
(token, p1_guid ) ) {
40
41
std::unique_ptr< MaterialStepCollection_PERS > p_coll(
poolReadObject< MaterialStepCollection_PERS >
(token) );
42
tCollection =
m_TPConverter
.createTransient( p_coll.get(), log );
43
}
44
45
return
tCollection;
46
}
MaterialStepCollectionCnv.h
MaterialStepCollectionCnvBase
T_AthenaPoolCustomCnvWithKey< Trk::MaterialStepCollection, MaterialStepCollection_PERS > MaterialStepCollectionCnvBase
Definition
MaterialStepCollectionCnv.h:25
MaterialStepCollection_PERS
Trk::MaterialStepCollection_p1 MaterialStepCollection_PERS
Definition
MaterialStepCollectionCnv.h:24
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
MaterialStepCollectionCnv::m_TPConverter
MaterialStepCollectionCnv_p1 m_TPConverter
Definition
MaterialStepCollectionCnv.h:50
MaterialStepCollectionCnv::MaterialStepCollectionCnv
MaterialStepCollectionCnv(ISvcLocator *svcloc)
Definition
MaterialStepCollectionCnv.cxx:17
MaterialStepCollectionCnv::createTransientWithKey
virtual Trk::MaterialStepCollection * createTransientWithKey(const Token *token, const std::string &key) override
method to be implemented by the developer.
Definition
MaterialStepCollectionCnv.cxx:32
MaterialStepCollectionCnv::m_msgSvc
IMessageSvc * m_msgSvc
MsgStream svc.
Definition
MaterialStepCollectionCnv.h:49
MaterialStepCollectionCnv::createPersistentWithKey
virtual MaterialStepCollection_PERS * createPersistentWithKey(Trk::MaterialStepCollection *transCont, const std::string &key) override
method to be implemented by the developer.
Definition
MaterialStepCollectionCnv.cxx:23
T_AthenaPoolCustomCnvWithKey< Trk::MaterialStepCollection, MaterialStepCollection_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnvWithKey< Trk::MaterialStepCollection, MaterialStepCollection_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::MaterialStepCollection
DataVector< Trk::MaterialStep > MaterialStepCollection
Definition
MaterialStepCollection.h:17
Generated on
for ATLAS Offline Software by
1.17.0