ATLAS Offline Software
Loading...
Searching...
No Matches
LArCaliWaveContainerCnv.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
15
18
21{
22 MsgStream log(msgSvc(), "LArCaliWaveContainerCnv" );
23 log << MSG::DEBUG << "WRITING LArCaliWaveContainer" << endmsg;
24 LArCaliWavePersType* persObj = TPconverter2.createPersistentConst( transObj, log );
25 log << MSG::DEBUG << "WRITING LArCaliWaveContainer Success !" << endmsg;
26 return persObj;
27}
28
31{
32 MsgStream log(msgSvc(), "LArCaliWaveContainerCnv" );
33
34 static const pool::Guid p2_guid("6CF01BBF-85A9-45FA-B321-6A98B0D719FB");
35 static const pool::Guid p1_guid("9E61BE2D-3274-4459-A5C2-3BBFB7056EBA");
36 static const pool::Guid p0_guid("ECB4AD6C-FF3A-4255-A0E3-7BD566B96A77");
37
38 if( compareClassGuid(p2_guid) ) {
39 // using unique_ptr ensures deletion of the persistent object
40 std::unique_ptr< LArCaliWaveSubset_p2 > col_vect( poolReadObject< LArCaliWaveSubset_p2 >() );
41 log << MSG::DEBUG << "READING LArCaliWaveSubset_p2" << endmsg;
42 LArCaliWaveTransType* transObj = TPconverter2.createTransientConst( col_vect.get(), log );
43 log << MSG::DEBUG << "READING LArCaliWaveSubset_p2 Success !" << endmsg;
44 return transObj;
45 }
46 else if( compareClassGuid(p1_guid) ) {
47 // using unique_ptr ensures deletion of the persistent object
48 std::unique_ptr< LArCaliWaveSubset_p1 > col_vect( poolReadObject< LArCaliWaveSubset_p1 >() );
49 log << MSG::DEBUG << "READING LArCaliWaveSubset_p1" << endmsg;
50 LArCaliWaveTransType* transObj = TPconverter1.createTransientConst( col_vect.get(), log );
51 log << MSG::DEBUG << "READING LArCaliWaveSubset_p1 Success !" << endmsg;
52 return transObj;
53 }
54 else if(compareClassGuid(p0_guid)){
55 MsgStream log(msgSvc(), "LArCaliWaveContainerCnv" );
56 log << MSG::DEBUG << " READING LArCaliWaveSubset (before TP split)" << endmsg;
57
58 std::unique_ptr< LArConditionsSubset<LArCaliWaveVec> > subset ( poolReadObject< LArConditionsSubset<LArCaliWaveVec> >() );
59
60 return (createTransient(subset.get()));
61 }
62 throw std::runtime_error("Unsupported persistent version of LArCaliWaveCnv");
63}
64
65
66
67
70{
71
72 MsgStream log(msgSvc(), "LArPedestalCompleteCnv" );
73 log << MSG::DEBUG << "LArCaliWaveContainerCnv::createTransient orig " << orig << endmsg;
74
76 result->assign (*orig,
77 [] (const LArCaliWaveVec& from,
79 { to = from; });
80
81 return (result);
82}
#define endmsg
static const LArCaliWaveSubsetCnv_p2 TPconverter2
static const LArCaliWaveSubsetCnv_p1 TPconverter1
AthenaPool converter LArCaliWaveContainer.
LArCaliWaveSubset_p2 LArCaliWavePersType
LArConditionsSubset< LArCaliWaveVec > LArCaliWaveTransType
LArConditionsSubset< LArCaliWaveVec >
This file defines the template class used for I/O of conditions data.
LArCaliWavePersType * createPersistent(LArCaliWaveTransType *transObj)
method to be implemented by the developer.
LArCaliWaveTransType * createTransient()
method to be implemented by the developer.
template class for use for I/O of conditions data