ATLAS Offline Software
ForwardDetectors
ALFA
ALFA_EventCnv
ALFA_EventAthenaPool
src
ALFA_ODDigitCollectionCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ALFA_EventTPCnv/ALFA_ODDigitCollectionCnv_p1.h
"
6
#include "
ALFA_ODDigitCollectionCnv.h
"
7
8
9
10
ALFA_ODDigitCollection_PERS
*
ALFA_ODDigitCollectionCnv::createPersistent
(
ALFA_ODDigitCollection
* transCont) {
11
MsgStream
mlog
(
msgSvc
(),
"ALFA_ODDigitCollectionConverter"
);
12
ALFA_ODDigitCollectionCnv_p1
TPConverter;
13
ALFA_ODDigitCollection_PERS
*persObj = TPConverter.
createPersistent
( transCont,
mlog
);
14
return
persObj;
15
}
16
17
18
ALFA_ODDigitCollection
*
ALFA_ODDigitCollectionCnv::createTransient
() {
19
MsgStream
mlog
(
msgSvc
(),
"ALFA_ODDigitCollectionConverter"
);
20
21
ALFA_ODDigitCollectionCnv_p1
TPConverter_p1;
22
23
ALFA_ODDigitCollection
*trans_cont(
nullptr
);
// probably inicialization
24
static
const
pool::Guid
p1_guid (
"26807BD7-E90A-4FDF-B1BF-0A7F821C5970"
);
25
26
27
if
( this->
compareClassGuid
(p1_guid)) {
28
std::unique_ptr< ALFA_ODDigitCollection_p1 > col_vect( this->poolReadObject< ALFA_ODDigitCollection_p1 >() );
29
trans_cont = TPConverter_p1.
createTransient
( col_vect.get(),
mlog
);
30
}
31
// else if( m_token.find("CLID=35722E01-C4E3-420E-8A7E-E375C5E7989D") != std::string::npos) {
32
// old version from before TP separation, just return it
33
// trans_cont = this->poolReadObject<ALFA_DigitCollection>();
34
// }
35
else
{
36
throw
std::runtime_error(
"Unsupported persistent version of Data container"
);
37
}
38
return
trans_cont;
39
}
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
ALFA_ODDigitCollectionCnv::createPersistent
ALFA_ODDigitCollection_PERS * createPersistent(ALFA_ODDigitCollection *transCont)
Definition:
ALFA_ODDigitCollectionCnv.cxx:10
ALFA_ODDigitCollectionCnv.h
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
pool::Guid
::Guid Guid
Definition:
T_AthenaPoolCustCnv.h:19
python.InDetPriVxFinderConfig.mlog
mlog
Definition:
InDetPriVxFinderConfig.py:139
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition:
StdJOSetup.py:36
ALFA_ODDigitCollectionCnv_p1
Definition:
ALFA_ODDigitCollectionCnv_p1.h:17
ALFA_ODDigitCollection_p1
Definition:
ALFA_ODDigitCollection_p1.h:17
T_AthenaPoolCustCnv< ALFA_ODDigitCollection, ALFA_ODDigitCollection_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
ALFA_ODDigitCollectionCnv::createTransient
ALFA_ODDigitCollection * createTransient()
Definition:
ALFA_ODDigitCollectionCnv.cxx:18
ALFA_ODDigitCollectionCnv_p1.h
ALFA_ODDigitCollection
Definition:
ALFA_ODDigitCollection.h:15
Generated on Sun Dec 22 2024 21:06:48 for ATLAS Offline Software by
1.8.18