ATLAS Offline Software
Loading...
Searching...
No Matches
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
15
17
20{
21 static const pool::Guid p0_guid("9C53AC43-3FD6-470F-A6FF-1DF80E85ACBF");
22 static const pool::Guid p1_guid("60FB956A-0B7F-450E-BF6A-2A0B8ED55204");
23 // first try the single-float converter
25 if (p)
26 return p;
27 else if( compareClassGuid(p1_guid) ) {
28 // using unique_ptr ensures deletion of the persistent object
29 std::unique_ptr< LArMphysOverMcalSubset_p1 > col_vect( poolReadObject< LArMphysOverMcalSubset_p1 >() );
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(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> >() );
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
53{
54 MsgStream log(msgSvc(), "LArMphysOverMcalCompleteCnv" );
55 log << MSG::DEBUG << "LArMphysOverMcalCompleteCnv::createTransient orig " << orig << endmsg;
56
58
59 // Copy LArMphysOverMcalP subset to LArMphysOverMcalP1
61 copier.update(orig, result);
62
63 return (result);
64}
#define endmsg
static const LArAutoCorrSubsetCnv_p1 TPconverter
AthenaPool converter LArMphysOverMcalComplete.
template class for use for I/O of conditions data
virtual LArConditionsSubset< LArSingleFloatP > * createTransient()
Throws and exception if object is not a LArConditionsSubset<LArSingleFloatP>
LArConditionsSubset< LArSingleFloatP > * createTransientSingleFloat()
void update(const LArConditionsSubset< P > *old, LArConditionsSubset< LArSingleFloatP > *newObj)
virtual bool compareClassGuid(const Guid &clid) const