ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCnv
LArCondAthenaPool
src
LArMphysOverMcalCompleteCnv.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 "
LArMphysOverMcalCompleteCnv.h
"
13
#include "
LArCondTPCnv/LArMphysOverMcalSubsetCnv_p1.h
"
14
#include "
LArSingleFloatUpdater.h
"
15
16
static
const
LArMphysOverMcalSubsetCnv_p1
TPconverter
;
17
18
LArConditionsSubset<LArSingleFloatP>
*
19
LArMphysOverMcalCompleteCnv::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(),
"LArMphysOverMcalCompleteCnv"
);
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
37
MsgStream log(msgSvc(),
"LArMphysOverMcalCompleteCnv"
);
38
log << MSG::DEBUG <<
"Reading LArMphysOverMcalSubset (original)"
<<
endmsg
;
39
40
std::unique_ptr< LArConditionsSubset<LArMphysOverMcalP> > subset (
poolReadObject
<
LArConditionsSubset<LArMphysOverMcalP>
>(token) );
41
// Here we must convert from LArMphysOverMcalP to LArMphysOverMcalP1
42
43
log << MSG::DEBUG <<
"subset ptr "
<< subset.get() <<
endmsg
;
44
45
return
(
createTransient
(subset.get()));
46
47
}
48
throw
std::runtime_error(
"Unsupported persistent version of LArMphysOverMcalCompleteCnv"
);
49
}
50
51
LArConditionsSubset<LArSingleFloatP>
*
52
LArMphysOverMcalCompleteCnv::createTransient
(
LArConditionsSubset<LArMphysOverMcalP>
* orig)
53
{
54
MsgStream log(msgSvc(),
"LArMphysOverMcalCompleteCnv"
);
55
log << MSG::DEBUG <<
"LArMphysOverMcalCompleteCnv::createTransient orig "
<< orig <<
endmsg
;
56
57
LArConditionsSubset<LArSingleFloatP>
* result =
new
LArConditionsSubset<LArSingleFloatP>
();
58
59
// Copy LArMphysOverMcalP subset to LArMphysOverMcalP1
60
LArSingleFloatUpdater
copier;
61
copier.
update
(orig, result);
62
63
return
(result);
64
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
TPconverter
static const LArAutoCorrSubsetCnv_p1 TPconverter
Definition
LArAutoCorrCompleteCnv.cxx:14
LArMphysOverMcalCompleteCnv.h
AthenaPool converter LArMphysOverMcalComplete.
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
LArMphysOverMcalCompleteCnv::createTransient
virtual LArConditionsSubset< LArSingleFloatP > * createTransient(const Token *token)
Throws and exception if object is not a LArConditionsSubset<LArSingleFloatP>.
Definition
LArMphysOverMcalCompleteCnv.cxx:19
LArMphysOverMcalSubsetCnv_p1
Definition
LArMphysOverMcalSubsetCnv_p1.h:22
LArSingleFloatConverter< LArMphysOverMcalComplete >::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< LArMphysOverMcalComplete >::poolReadObject
P * poolReadObject(const Token *token)
LArSingleFloatConverter< LArMphysOverMcalComplete >::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