ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TestBeam
TBEventAthenaPool
src
TBScintillatorContCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TBScintillatorContCnv.h
"
6
7
TBScintillatorCont_PERS
*
TBScintillatorContCnv::createPersistent
(
TBScintillatorCont
* transCont) {
8
MsgStream log(msgSvc(),
"TBScintillatorContConverter"
);
9
TBScintillatorCont_PERS
*persObj =
m_TPConverter
.createPersistent( transCont, log );
10
log << MSG::DEBUG <<
"Success"
<<
endmsg
;
11
return
persObj;
12
}
13
14
TBScintillatorCont
*
TBScintillatorContCnv::createTransient
(
const
Token
* token) {
15
MsgStream log(msgSvc(),
"TBScintillatorContConverter"
);
16
static
const
Guid
p1_guid(
"5887098D-DBFE-4634-92AB-CC9968CCB09A"
);
// GUID of the persistent object
17
static
const
Guid
p0_guid(
"AE688514-B192-426D-A971-5CD072593272"
);
// GUID of the transient object
18
if
(
compareClassGuid
(token, p1_guid) ) {
19
// using unique_ptr ensures deletion of the persistent object
20
std::unique_ptr< TBScintillatorCont_p1 > col_vect(
poolReadObject< TBScintillatorCont_p1 >
(token) );
21
return
m_TPConverter
.createTransient( col_vect.get(), log );
22
}
23
else
if
(
compareClassGuid
(token, p0_guid) ) {
24
// regular object from before TP separation, just return it
25
return
poolReadObject< TBScintillatorCont >
(token);
26
}
27
throw
std::runtime_error(
"Unsupported persistent version of Data Collection"
);
28
}
29
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
TBScintillatorContCnv.h
TBScintillatorCont_PERS
TBScintillatorCont_p1 TBScintillatorCont_PERS
Definition
TBScintillatorContCnv.h:20
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
TBScintillatorContCnv::createTransient
virtual TBScintillatorCont * createTransient(const Token *token)
Definition
TBScintillatorContCnv.cxx:14
TBScintillatorContCnv::m_TPConverter
TBScintillatorContCnv_p1 m_TPConverter
Definition
TBScintillatorContCnv.h:32
TBScintillatorContCnv::createPersistent
virtual TBScintillatorCont_PERS * createPersistent(TBScintillatorCont *transCont)
Definition
TBScintillatorContCnv.cxx:7
TBScintillatorCont
"TBEvent/TBScintillatorCont.h"
Definition
TBScintillatorCont.h:19
T_AthenaPoolCustomCnv< TBScintillatorCont, TBScintillatorCont_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< TBScintillatorCont, TBScintillatorCont_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
Generated on
for ATLAS Offline Software by
1.17.0