ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCnv
LArCondAthenaPool
src
LAruA2MeVMCCnv.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 "
LAruA2MeVMCCnv.h
"
12
#include "
LArSingleFloatUpdater.h
"
13
14
LArConditionsSubset<LArSingleFloatP>
*
15
LAruA2MeVMCCnv::createTransient
(
const
Token
* token)
16
{
17
static
const
pool::Guid
p0_guid(
"CBF815A2-F18C-4C18-9E93-A8EE67CEE59F"
);
18
// first try the single-float converter
19
LArConditionsSubset<LArSingleFloatP>
* p=
createTransientSingleFloat
(token);
20
if
(p)
21
return
p;
22
else
if
(
compareClassGuid
(token, p0_guid) ) {
23
// subset from before TP separation
24
MsgStream log(msgSvc(),
"LAruA2MeVMCCnv"
);
25
log << MSG::DEBUG <<
"Reading LAruA2MeVSubset (original)"
<<
endmsg
;
26
std::unique_ptr< LArConditionsSubset<LAruA2MeVP> > subset (
poolReadObject
<
LArConditionsSubset<LAruA2MeVP>
>(token) );
27
return
(
createTransient
(subset.get()));
28
29
}
30
throw
std::runtime_error(
"Unsupported persistent version of LAruA2MeVMC"
);
31
}
32
33
LArConditionsSubset<LArSingleFloatP>
*
34
LAruA2MeVMCCnv::createTransient
(
LArConditionsSubset<LAruA2MeVP>
* orig)
35
{
36
MsgStream log(msgSvc(),
"LAruA2MeVMCCnv"
);
37
log << MSG::DEBUG <<
"LAruA2MeVMCCnv::createTransient orig "
<< orig <<
endmsg
;
38
39
LArConditionsSubset<LArSingleFloatP>
* result =
new
LArConditionsSubset<LArSingleFloatP>
();
40
41
// Copy LAruA2MeVP subset to LArSingleFloat Subset
42
LArSingleFloatUpdater
copier;
43
copier.
update
(orig, result);
44
45
return
(result);
46
}
47
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
LArSingleFloatUpdater.h
LAruA2MeVMCCnv.h
AthenaPool converter LAruA2MeVMC.
LArConditionsSubset
template class for use for I/O of conditions data
Definition
LArConditionsSubset.h:122
LArSingleFloatConverter< LAruA2MeVMC >::createTransientSingleFloat
LArConditionsSubset< LArSingleFloatP > * createTransientSingleFloat(const Token *token)
LArSingleFloatUpdater
Definition
LArSingleFloatUpdater.h:19
LArSingleFloatUpdater::update
void update(const LArConditionsSubset< P > *old, LArConditionsSubset< LArSingleFloatP > *newObj)
Definition
LArSingleFloatUpdater.h:22
LAruA2MeVMCCnv::createTransient
virtual LArConditionsSubset< LArSingleFloatP > * createTransient(const Token *token)
Throws and exception if object is not a LArConditionsSubset<LArSingleFloatP>.
Definition
LAruA2MeVMCCnv.cxx:15
LArSingleFloatConverter< LAruA2MeVMC >::poolReadObject
P * poolReadObject(const Token *token)
LArSingleFloatConverter< LAruA2MeVMC >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
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