ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TestBeam
TBEventAthenaPool
src
TBLArDigitContainerCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TBLArDigitContainerCnv.h
"
6
#include "
TBTPCnv/TBLArDigitContainer_p1.h
"
7
8
9
TBLArDigitContainerCnv::TBLArDigitContainerCnv
(ISvcLocator* svcLoc) :
10
TBLArDigitContainerCnvBase
(svcLoc)
11
{}
12
13
14
15
TBLArDigitContainerPERS
*
TBLArDigitContainerCnv::createPersistent
(
TBLArDigitContainer
* trans) {
16
MsgStream log(msgSvc(),
"TBLArDigitContainerCnv"
);
17
log << MSG::DEBUG <<
"Writing TBLArDigitContainer_p2"
<<
endmsg
;
18
TBLArDigitContainerPERS
* pers=
new
TBLArDigitContainerPERS
();
19
m_converter
.transToPers(trans,pers,log);
20
return
pers;
21
}
22
23
24
25
TBLArDigitContainer
*
TBLArDigitContainerCnv::createTransient
(
const
Token
* token) {
26
MsgStream log(msgSvc(),
"TBLArDigitContainerCnv"
);
27
constexpr
Guid
p0_guid(
"B15FFDA0-206D-4062-8B5F-582A1ECD5502"
);
// GUID of the transient object
28
constexpr
Guid
p1_guid(
"9F58DDD2-ACDC-4ECF-A714-779B05F94649"
);
// GUID of the persistent object
29
auto
trans = std::make_unique<TBLArDigitContainer>();
30
TBLArDigitContainer
* result{};
31
if
(
compareClassGuid
(token, p0_guid)) {
32
log << MSG::DEBUG <<
"Read version p0 of TBLArDigitContainer. token="
33
<< token->
toString
() <<
endmsg
;
34
result =
poolReadObject<TBLArDigitContainer>
(token);
35
}
else
if
(
compareClassGuid
(token, p1_guid)) {
36
log << MSG::DEBUG <<
"Reading TBLArDigitContainer_p1. token="
37
<< token->
toString
() <<
endmsg
;
38
std::unique_ptr<TBLArDigitContainer_p1> pers (
poolReadObject<TBLArDigitContainer_p1>
(token));
39
m_converter
.persToTrans(pers.get(),trans.get(), log);
40
result = trans.release();
41
}
else
{
42
log << MSG::ERROR <<
"Unsupported persistent version of TBLArDigitContainer. token="
43
<< token->
toString
() <<
endmsg
;
44
throw
std::runtime_error(
"Unsupported persistent version of Data Collection"
);
45
}
46
return
result;
47
}
48
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
TBLArDigitContainerCnv.h
TBLArDigitContainerPERS
TBLArDigitContainer_p1 TBLArDigitContainerPERS
Definition
TBLArDigitContainerCnv.h:20
TBLArDigitContainerCnvBase
T_AthenaPoolCustomCnv< TBLArDigitContainer, TBLArDigitContainerPERS > TBLArDigitContainerCnvBase
Definition
TBLArDigitContainerCnv.h:22
TBLArDigitContainer_p1.h
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
TBLArDigitContainerCnv::m_converter
TBLArDigitContainerCnv_p1 m_converter
Definition
TBLArDigitContainerCnv.h:34
TBLArDigitContainerCnv::createTransient
virtual TBLArDigitContainer * createTransient(const Token *token)
Definition
TBLArDigitContainerCnv.cxx:25
TBLArDigitContainerCnv::TBLArDigitContainerCnv
TBLArDigitContainerCnv(ISvcLocator *)
Definition
TBLArDigitContainerCnv.cxx:9
TBLArDigitContainerCnv::createPersistent
virtual TBLArDigitContainerPERS * createPersistent(TBLArDigitContainer *)
Definition
TBLArDigitContainerCnv.cxx:15
TBLArDigitContainer
Gaudi Class ID.
Definition
TBLArDigitContainer.h:40
T_AthenaPoolCustomCnv< TBLArDigitContainer, TBLArDigitContainerPERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< TBLArDigitContainer, TBLArDigitContainerPERS >::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