ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkEventCnv
TrkEventAthenaPool
src
MVFVxContainerCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//-----------------------------------------------------------------------------
6
//
7
// file: MVFVxContainerCnv.cxx
8
// author: Kirill Prokofiev <Kirill.Prokofiev@cern.ch>
9
//
10
//-----------------------------------------------------------------------------
11
12
13
#include "
MVFVxContainerCnv.h
"
14
15
16
//-----------------------------------------------------------------------------
17
// Constructor
18
//-----------------------------------------------------------------------------
19
20
MVFVxContainerCnv::MVFVxContainerCnv
( ISvcLocator *svcloc ):
21
MVFVxContainerCnvBase
(svcloc)
22
{
23
24
}
25
26
//-----------------------------------------------------------------------------
27
// Initializer
28
//-----------------------------------------------------------------------------
29
StatusCode
MVFVxContainerCnv::initialize
()
30
{
31
MsgStream log(msgSvc());
32
33
StatusCode
sc
=
MVFVxContainerCnvBase::initialize
();
34
if
(
sc
.isFailure() )
35
{
36
log << MSG::FATAL <<
"Could not initialize MVFVxContainerCnvBase"
<<
endmsg
;
37
return
sc
;
38
}
39
40
//-------------------------------------------------------------------------
41
// Set up the message stream
42
//-------------------------------------------------------------------------
43
// log.setLevel( m_msgSvc->outputLevel() );
44
log << MSG::INFO <<
"MVFVxContainerCnv::initialize()"
<<
endmsg
;
45
return
StatusCode::SUCCESS;
46
}
47
48
49
MVFVxContainer_PERS
*
MVFVxContainerCnv::createPersistent
(
MVFVxContainer
* )
50
{
51
MsgStream log(msgSvc(),
"MVFVxContainerCnv"
);
52
log << MSG::ERROR <<
"createPersistent() is obsolete"
<<
endmsg
;
53
return
nullptr
;
54
}
55
56
57
MVFVxContainer
*
MVFVxContainerCnv::createTransient
(
const
Token
* token)
58
{
59
MsgStream log(msgSvc());
60
static
const
pool::Guid
p1_guid(
"D7BAA7AD-1A46-4DA3-9CA7-350A1A3F0656"
);
61
static
const
pool::Guid
p0_guid(
"6C6999B7-F961-4B72-B6D9-DF71CB2364CC"
);
62
63
MVFVxContainer
*p_collection =
nullptr
;
64
65
if
(
compareClassGuid
(token, p1_guid ) ) {
66
// std::cout << "MVFVxContainerCnv::createTransient(const Token* token)" << std::endl;
67
poolReadObject< MVFVxContainer_PERS >
(
m_TPConverter
, token );
68
p_collection =
m_TPConverter
.createTransient( log );
69
70
}
else
if
(
compareClassGuid
(token, p0_guid ) ) {
71
// std::cout << "MVFVxContainerCnv::createTransient: use old converter" << std::endl;
72
p_collection =
poolReadObject< MVFVxContainer >
(token);
73
}
else
74
throw
std::runtime_error(
"Unsupported persistent version of MVFVxContainer (unknown GUID)"
);
75
76
return
p_collection;
77
}
78
79
80
void
MVFVxContainerCnv::readObjectFromPool
(
const
Token
* token )
81
{
82
static
const
pool::Guid
p1_guid(
"D7BAA7AD-1A46-4DA3-9CA7-350A1A3F0656"
);
83
84
// select the object type based on its GUID
85
if
(
compareClassGuid
(token, p1_guid ) ) {
86
// read the object using the main TP converter
87
poolReadObject< MVFVxContainer_PERS >
(
m_TPConverter
, token );
88
}
89
else
90
throw
std::runtime_error(
"Unsupported version of MVFVxContainer (unknown GUID)"
);
91
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
MVFVxContainerCnv.h
MVFVxContainerCnvBase
T_AthenaPoolExtendingCnv< MVFVxContainer, MVFVxContainer_PERS > MVFVxContainerCnvBase
Definition
MVFVxContainerCnv.h:31
MVFVxContainer_PERS
Trk::MVFVxContainer_tlp1 MVFVxContainer_PERS
Definition
MVFVxContainerCnv.h:29
MVFVxContainerCnv::MVFVxContainerCnv
MVFVxContainerCnv(ISvcLocator *svcloc)
Definition
MVFVxContainerCnv.cxx:20
MVFVxContainerCnv::initialize
virtual StatusCode initialize() override
Gaudi Service Interface method implementations:
Definition
MVFVxContainerCnv.cxx:29
MVFVxContainerCnv::readObjectFromPool
virtual void readObjectFromPool(const Token *token) override
Read the persistent object from POOL.
Definition
MVFVxContainerCnv.cxx:80
MVFVxContainerCnv::createTransient
virtual MVFVxContainer * createTransient(const Token *token) override
Definition
MVFVxContainerCnv.cxx:57
MVFVxContainerCnv::createPersistent
virtual MVFVxContainer_PERS * createPersistent(MVFVxContainer *transCont) override
no-op
Definition
MVFVxContainerCnv.cxx:49
MVFVxContainerCnv::m_TPConverter
MVFVxContainerCnv_tlp1 m_TPConverter
Definition
MVFVxContainerCnv.h:58
MVFVxContainer
Definition
MVFVxContainer.h:31
T_AthenaPoolExtendingCnv< MVFVxContainer, MVFVxContainer_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolExtendingCnv< MVFVxContainer, MVFVxContainer_PERS >::initialize
virtual StatusCode initialize()
T_AthenaPoolExtendingCnv< MVFVxContainer, MVFVxContainer_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
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.17.0