ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
ForwardDetectors
LUCID
LUCID_Cnv
LUCID_EventAthenaPool
src
LUCID_SimHitCollectionCnv.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 "
LUCID_SimHitCollectionCnv.h
"
6
#include "
LUCID_EventTPCnv/LUCID_SimHitCollectionCnv_p1.h
"
7
#include "
LUCID_EventTPCnv/LUCID_SimHitCollectionCnv_p2.h
"
8
#include "
LUCID_EventTPCnv/LUCID_SimHitCollectionCnv_p3.h
"
9
#include "
LUCID_EventTPCnv/LUCID_SimHit_p1.h
"
10
#include "
LUCID_EventTPCnv/LUCID_SimHit_p2.h
"
11
#include "
LUCID_EventTPCnv/LUCID_SimHit_p3.h
"
12
13
14
LUCID_SimHitCollection_PERS
*
LUCID_SimHitCollectionCnv::createPersistent
(
LUCID_SimHitCollection
* transCont) {
15
MsgStream mlog(msgSvc(),
"LUCID_SimHitCollectionCnv"
);
16
mlog << MSG::DEBUG <<
"In LUCID_SimHitCollectionCnv::createPersistent "
<<
endmsg
;
17
LUCID_SimHitCollectionCnv_p2
converter;
18
LUCID_SimHitCollection_PERS
* persObj = converter.
createPersistent
(transCont, mlog);
19
return
persObj;
20
}
21
22
23
LUCID_SimHitCollection
*
LUCID_SimHitCollectionCnv::createTransient
(
const
Token
* token) {
24
MsgStream mlog(msgSvc(),
"LUCID_SimHitCollectionCnv"
);
25
mlog << MSG::DEBUG <<
"In LUCID_SimHitCollectionCnv::createTransient "
<<
endmsg
;
26
LUCID_SimHitCollectionCnv_p1
converter_p1;
27
LUCID_SimHitCollectionCnv_p2
converter_p2;
28
LUCID_SimHitCollectionCnv_p3
converter_p3;
29
static
const
Guid
p3_guid (
"018E3850-0AAE-776B-9BDE-69C14B881C19"
);
30
static
const
Guid
p2_guid (
"149F1834-1D98-4F35-A1B3-C9AA083D6838"
);
31
static
const
Guid
p1_guid (
"9ACC906C-74CA-4F77-AC16-2A503358C2D1"
);
32
static
const
Guid
old_guid(
"7BCDF079-FD96-4B18-B1E7-FA5EDDB026F2"
);
33
34
LUCID_SimHitCollection
* trans_cont{};
35
if
(this->
compareClassGuid
(token, p3_guid)) {
36
std::unique_ptr< LUCID_SimHitCollection_p3 > col_vect( this->
poolReadObject< LUCID_SimHitCollection_p3 >
(token));
37
trans_cont = converter_p3.
createTransient
(col_vect.get(), mlog);
38
}
39
else
if
(this->
compareClassGuid
(token, p2_guid)) {
40
std::unique_ptr< LUCID_SimHitCollection_p2 > col_vect( this->
poolReadObject< LUCID_SimHitCollection_p2 >
(token));
41
trans_cont = converter_p2.
createTransient
(col_vect.get(), mlog);
42
}
43
else
if
(this->
compareClassGuid
(token, p1_guid)) {
44
std::unique_ptr< LUCID_SimHitCollection_p1 > col_vect( this->
poolReadObject< LUCID_SimHitCollection_p1 >
(token));
45
trans_cont = converter_p1.
createTransient
(col_vect.get(), mlog);
46
}
47
else
if
(this->
compareClassGuid
(token, old_guid)) {
48
trans_cont = this->
poolReadObject<LUCID_SimHitCollection>
(token);
49
}
50
else
{
51
mlog << MSG::ERROR <<
"BAD GUID: "
<< token->
toString
() <<
endmsg
;
52
throw
std::runtime_error(
"Unsupported persistent version of Data container"
);
53
}
54
return
trans_cont;
55
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
LUCID_SimHitCollectionCnv.h
LUCID_SimHitCollection_PERS
LUCID_SimHitCollection_p2 LUCID_SimHitCollection_PERS
Definition
LUCID_SimHitCollectionCnv.h:16
LUCID_SimHitCollectionCnv_p1.h
LUCID_SimHitCollectionCnv_p1
T_AtlasHitsVectorCnv< LUCID_SimHitCollection, LUCID_SimHitCollection_p1, LUCID_SimHitCnv_p1 > LUCID_SimHitCollectionCnv_p1
Definition
LUCID_SimHitCollectionCnv_p1.h:10
LUCID_SimHitCollectionCnv_p2.h
LUCID_SimHitCollectionCnv_p2
T_AtlasHitsVectorCnv< LUCID_SimHitCollection, LUCID_SimHitCollection_p2, LUCID_SimHitCnv_p2 > LUCID_SimHitCollectionCnv_p2
Definition
LUCID_SimHitCollectionCnv_p2.h:10
LUCID_SimHitCollectionCnv_p3.h
LUCID_SimHitCollectionCnv_p3
T_AtlasHitsVectorCnv< LUCID_SimHitCollection, LUCID_SimHitCollection_p3, LUCID_SimHitCnv_p3 > LUCID_SimHitCollectionCnv_p3
Definition
LUCID_SimHitCollectionCnv_p3.h:10
LUCID_SimHitCollection
AtlasHitsVector< LUCID_SimHit > LUCID_SimHitCollection
Definition
LUCID_SimHitCollection.h:12
LUCID_SimHit_p1.h
LUCID_SimHit_p2.h
LUCID_SimHit_p3.h
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
LUCID_SimHitCollectionCnv::createPersistent
virtual LUCID_SimHitCollection_PERS * createPersistent(LUCID_SimHitCollection *transCont)
Definition
LUCID_SimHitCollectionCnv.cxx:14
LUCID_SimHitCollectionCnv::createTransient
virtual LUCID_SimHitCollection * createTransient(const Token *token)
Definition
LUCID_SimHitCollectionCnv.cxx:23
TPAbstractPolyCnvBase< TRANS, TRANS, PERS >::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
TPPolyCnvBase< TRANS, TRANS, PERS >::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
T_AthenaPoolCustomCnv< LUCID_SimHitCollection, LUCID_SimHitCollection_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< LUCID_SimHitCollection, LUCID_SimHitCollection_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
Token::toString
const std::string toString() const
Retrieve the string representation of the token.
Definition
Token.cxx:135
Generated on
for ATLAS Offline Software by
1.17.0