ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigEventAthenaPool
src
TrigVertexCollectionCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigVertexCollectionCnv.h
"
6
#include "
TrigInDetEventTPCnv/TrigVertexCollectionCnv_tlp1.h
"
7
#include "
TrigInDetEventTPCnv/TrigVertexCollectionCnv_tlp2.h
"
8
9
#include "
TrigInDetEventTPCnv/TrigVertexCollection_tlp1.h
"
10
#include "
TrigInDetEventTPCnv/TrigVertexCollection_tlp2.h
"
11
12
TrigVertexCollectionCnv::TrigVertexCollectionCnv
( ISvcLocator *svcloc ):
13
TrigVertexCollectionCnvBase
(svcloc),
14
m_msgSvc
( msgSvc() ),
15
m_log
(
m_msgSvc
,
"TrigVertexCollectionCnv"
),
16
m_TPConverter
(new
TrigVertexCollectionCnv_tlp2
)
17
{}
18
19
TrigVertexCollectionCnv::~TrigVertexCollectionCnv
()
20
{
21
delete
m_TPConverter
;
22
}
23
24
//createPersistent
25
TrigVertexCollection_PERS
*
TrigVertexCollectionCnv::createPersistent
(
TrigVertexCollection
*transObj)
26
{
27
MsgStream mlog(msgSvc(),
"TrigVertexCollectionConverter"
);
28
29
mlog << MSG::DEBUG <<
"TrigVertexCollectionCnv::createPersistent called"
<<
endmsg
;
30
31
TrigVertexCollection_PERS
* p_VtxColl =
m_TPConverter
->createPersistent( transObj,
m_log
);
32
33
return
p_VtxColl;
34
35
}
//end of create persistent method
36
37
38
//createTransient
39
TrigVertexCollection
*
TrigVertexCollectionCnv::createTransient
(
const
Token
* token)
40
{
41
MsgStream mlog(msgSvc(),
"TrigVertexCollectionConverter"
);
42
43
mlog << MSG::DEBUG <<
"TrigVertexCollectionCnv::createTransient called"
<<
endmsg
;
44
45
static
const
Guid
tlp2_guid(
"438C9232-0F3E-4A8B-A16E-6F6275388DE4"
);
46
static
const
Guid
tlp1_guid(
"10E18C4E-9BCA-4F25-993C-EBDF0642C119"
);
47
static
const
Guid
p0_guid(
"0974DF97-5B51-4416-8FBE-42BAE0C54010"
);
48
static
const
Guid
p0_guid2(
"E2C600D6-CD4B-4B7B-9C09-93CE9FF435A1"
);
49
50
TrigVertexCollection
*p_collection = 0;
51
if
(
compareClassGuid
(token, tlp2_guid ) )
52
{
53
mlog << MSG::DEBUG <<
"TrigVertexCollectionCnv::createPersistent tlp2 called"
<<
endmsg
;
54
poolReadObject< TrigVertexCollection_PERS >
(*
m_TPConverter
, token);
55
p_collection =
m_TPConverter
->createTransient(
m_log
);
56
57
}
else
if
(
compareClassGuid
(token, tlp1_guid ) ) {
58
59
mlog << MSG::DEBUG <<
"TrigVertexCollectionCnv::createPersistent tlp1 called"
<<
endmsg
;
60
TrigVertexCollectionCnv_tlp1
tlp1_Converter;
61
poolReadObject< TrigVertexCollection_tlp1 >
(tlp1_Converter, token);
62
p_collection = tlp1_Converter.
createTransient
(
m_log
);
63
64
}
else
if
(
compareClassGuid
(token, p0_guid ) ||
compareClassGuid
(token, p0_guid2 ) ){
65
mlog << MSG::DEBUG <<
"TrigVertexCollectionCnv::createPersistent p0 called"
<<
endmsg
;
66
p_collection =
poolReadObject< TrigVertexCollection >
(token);
67
68
}
else
throw
std::runtime_error(
"Unsupported persistent version of TrigVertexCollection"
);
69
70
return
p_collection;
71
72
}
//end of create transient method
73
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
TrigVertexCollectionCnv.h
TrigVertexCollection_PERS
TrigVertexCollection_tlp2 TrigVertexCollection_PERS
Definition
TrigVertexCollectionCnv.h:32
TrigVertexCollectionCnvBase
T_AthenaPoolCustomCnv< TrigVertexCollection, TrigVertexCollection_PERS > TrigVertexCollectionCnvBase
Definition
TrigVertexCollectionCnv.h:34
TrigVertexCollectionCnv_tlp1.h
TrigVertexCollectionCnv_tlp2.h
TrigVertexCollection_tlp1.h
TrigVertexCollection_tlp2.h
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
T_AthenaPoolCustomCnv< TrigVertexCollection, TrigVertexCollection_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< TrigVertexCollection, TrigVertexCollection_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
TopLevelTPConverter::createTransient
TRANS * createTransient(MsgStream &log)
Create transient representation of the persistent object known to this converter.
Definition
TopLevelTPConverter.h:62
TrigVertexCollectionCnv_tlp1
Definition
TrigVertexCollectionCnv_tlp1.h:31
TrigVertexCollectionCnv_tlp2
Definition
TrigVertexCollectionCnv_tlp2.h:26
TrigVertexCollectionCnv::createPersistent
virtual TrigVertexCollection_PERS * createPersistent(TrigVertexCollection *transObj)
Definition
TrigVertexCollectionCnv.cxx:25
TrigVertexCollectionCnv::~TrigVertexCollectionCnv
~TrigVertexCollectionCnv()
Definition
TrigVertexCollectionCnv.cxx:19
TrigVertexCollectionCnv::m_log
MsgStream m_log
Definition
TrigVertexCollectionCnv.h:58
TrigVertexCollectionCnv::m_TPConverter
TrigVertexCollectionCnv_tlp2 * m_TPConverter
Definition
TrigVertexCollectionCnv.h:60
TrigVertexCollectionCnv::m_msgSvc
IMessageSvc * m_msgSvc
Definition
TrigVertexCollectionCnv.h:57
TrigVertexCollectionCnv::TrigVertexCollectionCnv
TrigVertexCollectionCnv(ISvcLocator *svcloc)
Definition
TrigVertexCollectionCnv.cxx:12
TrigVertexCollectionCnv::createTransient
virtual TrigVertexCollection * createTransient(const Token *token)
Definition
TrigVertexCollectionCnv.cxx:39
TrigVertexCollection
Definition
TrigVertexCollection.h:13
Generated on
for ATLAS Offline Software by
1.17.0