ATLAS Offline Software
Loading...
Searching...
No Matches
MdtPrepDataContainerCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7// Gaudi
8#include "GaudiKernel/StatusCode.h"
9#include "GaudiKernel/MsgStream.h"
10
11// Athena
13
14// Id includes
18
19
20
25
27
29 // Call base clase initialize
31 return StatusCode::FAILURE;
32
33 // msgSvc()->setOutputLevel( "MdtPrepDataContainerCnv", MSG::DEBUG );
34
35 // Get the messaging service, print where you are
36 MsgStream log(msgSvc(), "MdtPrepDataContainerCnv");
37 log << MSG::INFO << "MdtPrepDataContainerCnv::initialize()" << endmsg;
38 return StatusCode::SUCCESS;
39}
40
42 MsgStream log(msgSvc(), "MdtPrepDataContainerCnv" );
43 if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createPersistent(): main converter"<<endmsg;
44 MdtPrepDataContainer_PERS *pixdc_p= m_converter_p2.createPersistent( transCont, log );
45 return pixdc_p;
46}
47
49 MsgStream log(msgSvc(), "MdtPrepDataContainerCnv" );
50 static const pool::Guid p1_guid("7E3F92F5-FAFF-45C3-A8F5-386B3CD56A7B"); // with MdtPrepDataContainerCnv_tlp1
51 static const pool::Guid p2_guid("BBC02355-570A-4C28-81A6-65F23779509E"); // with MdtPrepDataContainerCnv_p2
52 if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createTransient(): main converter"<<endmsg;
53 Muon::MdtPrepDataContainer* p_collection(nullptr);
54 if( compareClassGuid(p2_guid) ) {
55 if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createTransient(): T/P version 2 detected"<<endmsg;
56 std::unique_ptr< MdtPrepDataContainer_PERS > col_vect( poolReadObject< MdtPrepDataContainer_PERS >() );
57 if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Delegate TP converter " << endmsg;
58 p_collection = m_converter_p2.createTransient( col_vect.get(), log );
59 } else if( compareClassGuid(p1_guid) ) {
60 if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createTransient(): T/P version 1 detected"<<endmsg;
62 p_collection = m_converter_tlp1.createTransient( log );
63 }
64 else {
65 throw std::runtime_error("Unsupported persistent version of MdtPrepDataContainer");
66 }
67 return p_collection;
68}
#define endmsg
Muon::MdtPrepDataContainer_p2 MdtPrepDataContainer_PERS
T_AthenaPoolCustomCnv< Muon::MdtPrepDataContainer, MdtPrepDataContainer_PERS > MdtPrepDataContainerCnvBase
virtual MdtPrepDataContainer_PERS * createPersistent(Muon::MdtPrepDataContainer *transCont)
virtual Muon::MdtPrepDataContainer * createTransient()
MdtPrepDataContainerCnv_tlp1 m_converter_tlp1
'Old style' top level convertor
MdtPrepDataContainerCnv(ISvcLocator *svcloc)
virtual ~MdtPrepDataContainerCnv()
Muon::MdtPrepDataContainerCnv_p2 m_converter_p2
New, flattened convertor.
virtual StatusCode initialize()
Gaudi Service Interface method implementations:
MuonPrepDataContainerT< MdtPrepData > MdtPrepDataContainer