ATLAS Offline Software
Loading...
Searching...
No Matches
TrackParticleContainerCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5//-----------------------------------------------------------------------------
6//
7// file: TrackParticleContainerCnv.cxx
8// author: Andreas Wildauer
9//
10//-----------------------------------------------------------------------------
13#include <iostream>
14//-----------------------------------------------------------------------------
15// Constructor
16//-----------------------------------------------------------------------------
17
22
23//-----------------------------------------------------------------------------
24// Initializer
25//-----------------------------------------------------------------------------
27{
29 return StatusCode::SUCCESS;
30}//end of initialize method
31
34{
35 TrackParticleContainer_PERS * tpBaseCont = m_TPConverter_tlp3.createPersistent( transCont, msg() );
36
37 return tpBaseCont;
38}//end of create persistent method
39
41{
42 std::string logname = "TrackParticleContainerCnv";
43 const DataObject* dObj = getDataObject();
44 if (dObj) {
45 logname += dObj->name();
46 }
47 MsgStream log (m_msgSvc, logname);
48 static const pool::Guid p3_guid( "8C84D957-1899-4C98-A49D-D6AC0F85C5EC" );
49 static const pool::Guid p2_guid( "170211F9-C4E1-4173-B0FB-71322899C8B9" );
50 static const pool::Guid p1_guid( "4A8CEB2C-0833-4C83-8514-A69928DE4672" );
51 static const pool::Guid p0_guid( "35BE1E01-658C-438A-AC86-F951006ECC6B" );
52
53 Rec::TrackParticleContainer *p_collection = 0;
54 if( compareClassGuid( p3_guid ) ) {
55 // std::cout<<"TrackParticleContainerCnv::createTransient p3_guid"<<std::endl;
56
58 p_collection = m_TPConverter_tlp3.createTransient(log);
59 }
60 else if( compareClassGuid( p2_guid ) ) {
61 // std::cout<<"TrackParticleContainerCnv::createTransient p2_guid"<<std::endl;
62
64 p_collection = m_TPConverter_tlp2.createTransient(log);
65 }
66 else if( compareClassGuid( p1_guid ) ) {
68 p_collection = m_TPConverter_tlp1.createTransient(log);
69 }
70 else if( compareClassGuid( p0_guid ) ) {
72 }
73 else {
74 throw std::runtime_error( "Unsupported persistent version of Rec::TrackParticleContainer" );
75 }
76
77 return p_collection;
78
79}//end of create transient method
80
81
#define ATH_CHECK
Evaluate an expression and check for errors.
Rec::TrackParticleContainer_tlp3 TrackParticleContainer_PERS
T_AthenaPoolCustomCnv< Rec::TrackParticleContainer, TrackParticleContainer_PERS > TrackParticleContainerCnvBase
virtual Rec::TrackParticleContainer * createTransient() override
virtual TrackParticleContainer_PERS * createPersistent(Rec::TrackParticleContainer *transCont) override
TrackParticleContainerCnv_tlp1 m_TPConverter_tlp1
TrackParticleContainerCnv_tlp2 m_TPConverter_tlp2
TrackParticleContainerCnv_tlp3 m_TPConverter_tlp3
TrackParticleContainerCnv(ISvcLocator *svcloc)
virtual StatusCode initialize() override
Gaudi Service Interface method implementations: