ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCnv
LArCondAthenaPool
src
LArPedestalMCCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
10
11
#include "
LArRawConditions/LArPedestalMC.h
"
12
#include "
LArPedestalMCCnv.h
"
13
#include "
LArCondTPCnv/LArPedestalMCCnv_p1.h
"
14
15
static
const
LArPedestalMCCnv_p1
TPconverter
;
16
17
LArPedestalMC_p1
*
18
LArPedestalMCCnv::createPersistent
(
LArPedestalMCTransType
* transObj)
19
{
20
MsgStream log(msgSvc(),
"LArPedestalMCCnv"
);
21
//log << MSG::DEBUG << "LArPedestalMC write" << endmsg;
22
LArPedestalMCPersType
* persObj =
TPconverter
.createPersistentConst( transObj, log );
23
//log << MSG::DEBUG << "Success" << endmsg;
24
return
persObj;
25
}
26
27
LArPedestalMC
*
28
LArPedestalMCCnv::createTransient
(
const
Token
* token)
29
{
30
static
const
pool::Guid
p1_guid(
"3891D5E0-82D1-45AB-97B1-CE4CF25D6E16"
);
31
static
const
pool::Guid
p0_guid(
"C147EFC8-5283-4DAE-AD20-0E2CB79E54B6"
);
32
if
(
compareClassGuid
(token, p1_guid) ) {
33
// using unique_ptr ensures deletion of the persistent object
34
std::unique_ptr< LArPedestalMC_p1 > col_vect(
poolReadObject< LArPedestalMC_p1 >
(token) );
35
MsgStream log(msgSvc(),
"LArPedestalMCCnv"
);
36
//log << MSG::INFO << "Reading LArPedestalMC_p1" << endmsg;
37
return
TPconverter
.createTransientConst( col_vect.get(), log );
38
}
39
else
if
(
compareClassGuid
(token, p0_guid) ) {
40
// subset from before TP separation
41
42
MsgStream log(msgSvc(),
"LArPedestalMCCnv"
);
43
log << MSG::INFO <<
"Reading LArPedestalMC (original)"
<<
endmsg
;
44
45
LArPedestalMC
* peds =
poolReadObject< LArPedestalMC >
(token);
46
47
return
(peds);
48
49
}
50
throw
std::runtime_error(
"Unsupported persistent version of LArPedestalMCCnv"
);
51
}
52
53
54
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
TPconverter
static const LArAutoCorrSubsetCnv_p1 TPconverter
Definition
LArAutoCorrCompleteCnv.cxx:14
LArPedestalMCCnv.h
AthenaPool converter LArPedestalMC.
LArPedestalMCPersType
LArPedestalMC_p1 LArPedestalMCPersType
Definition
LArPedestalMCCnv.h:20
LArPedestalMCTransType
LArPedestalMC LArPedestalMCTransType
Definition
LArPedestalMCCnv.h:19
LArPedestalMCCnv_p1.h
LArPedestalMC.h
LArPedestalMCCnv_p1
Definition
LArPedestalMCCnv_p1.h:19
LArPedestalMCCnv::createTransient
virtual LArPedestalMCTransType * createTransient(const Token *token)
Definition
LArPedestalMCCnv.cxx:28
LArPedestalMCCnv::createPersistent
virtual LArPedestalMCPersType * createPersistent(LArPedestalMCTransType *transObj)
Definition
LArPedestalMCCnv.cxx:18
LArPedestalMC_p1
persistent class container of LArConditionsMC for LArPedestal data.
Definition
LArPedestalMC_p1.h:30
LArPedestalMC
Implementation of the interface ILArfSampl for MC: only one constant is needed for MC.
Definition
LArPedestalMC.h:21
T_AthenaPoolCustomCnv< LArPedestalMCTransType, LArPedestalMCPersType >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< LArPedestalMCTransType, LArPedestalMCPersType >::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
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.17.0