ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCnv
LArCondAthenaPool
src
LArMphysOverMcalMCCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
11
12
#include "
LArMphysOverMcalMCCnv.h
"
13
#include "
LArCondTPCnv/LArMphysOverMcalSubsetCnv_p1.h
"
14
#include "
LArSingleFloatUpdater.h
"
15
16
static
const
LArMphysOverMcalSubsetCnv_p1
TPconverter
;
17
18
LArConditionsSubset<LArSingleFloatP>
*
19
LArMphysOverMcalMCCnv::createTransient
(
const
Token
* token)
20
{
21
static
const
Guid
p0_guid(
"9C53AC43-3FD6-470F-A6FF-1DF80E85ACBF"
);
22
static
const
Guid
p1_guid(
"60FB956A-0B7F-450E-BF6A-2A0B8ED55204"
);
23
// first try the single-float converter
24
LArConditionsSubset<LArSingleFloatP>
* p=
createTransientSingleFloat
(token);
25
if
(p)
26
return
p;
27
else
if
(
compareClassGuid
(token, p1_guid) ) {
28
// using unique_ptr ensures deletion of the persistent object
29
std::unique_ptr< LArMphysOverMcalSubset_p1 > col_vect(
poolReadObject< LArMphysOverMcalSubset_p1 >
(token) );
30
MsgStream log(msgSvc(),
"LArMphysOverMcalMCCnv"
);
31
//log << MSG::INFO << "Reading LArMphysOverMcalSubset_p1" << endmsg;
32
return
TPconverter
.createTransientConst( col_vect.get(), log );
33
}
34
else
if
(
compareClassGuid
(token, p0_guid) ) {
35
// subset from before TP separation
36
MsgStream log(msgSvc(),
"LArMphysOverMcalMCCnv"
);
37
log << MSG::DEBUG <<
"Reading LArMphysOverMcalSubset (original)"
<<
endmsg
;
38
39
std::unique_ptr< LArConditionsSubset<LArMphysOverMcalP> > subset (
poolReadObject
<
LArConditionsSubset<LArMphysOverMcalP>
>(token) );
40
// Here we must convert from LArMphysOverMcalP to LArMphysOverMcalP1
41
return
(
createTransient
(subset.get()));
42
43
}
44
throw
std::runtime_error(
"Unsupported persistent version of LArMphysOverMcalMCCnv"
);
45
}
46
47
LArConditionsSubset<LArSingleFloatP>
*
48
LArMphysOverMcalMCCnv::createTransient
(
LArConditionsSubset<LArMphysOverMcalP>
* orig){
49
MsgStream log(msgSvc(),
"LArMphysOverMcalMCCnv"
);
50
log << MSG::DEBUG <<
"LArMphysOverMcalMCCnv::createTransient orig "
<< orig <<
endmsg
;
51
52
LArConditionsSubset<LArSingleFloatP>
* result =
new
LArConditionsSubset<LArSingleFloatP>
();
53
LArSingleFloatUpdater
copier;
54
copier.
update
(orig, result);
55
56
return
(result);
57
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
TPconverter
static const LArAutoCorrSubsetCnv_p1 TPconverter
Definition
LArAutoCorrCompleteCnv.cxx:14
LArMphysOverMcalMCCnv.h
AthenaPool converter LArMphysOverMcalMC.
LArMphysOverMcalSubsetCnv_p1.h
LArSingleFloatUpdater.h
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
LArConditionsSubset
template class for use for I/O of conditions data
Definition
LArConditionsSubset.h:122
LArMphysOverMcalMCCnv::createTransient
virtual LArConditionsSubset< LArSingleFloatP > * createTransient(const Token *token)
Throws and exception if object is not a LArConditionsSubset<LArSingleFloatP>.
Definition
LArMphysOverMcalMCCnv.cxx:19
LArMphysOverMcalSubsetCnv_p1
Definition
LArMphysOverMcalSubsetCnv_p1.h:22
LArSingleFloatConverter< LArMphysOverMcalMC >::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
LArSingleFloatConverter< LArMphysOverMcalMC >::poolReadObject
P * poolReadObject(const Token *token)
LArSingleFloatConverter< LArMphysOverMcalMC >::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
Generated on
for ATLAS Offline Software by
1.17.0