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 MsgStream log (m_msgSvc, logname);
44 static const pool::Guid p3_guid( "8C84D957-1899-4C98-A49D-D6AC0F85C5EC" );
45 static const pool::Guid p2_guid( "170211F9-C4E1-4173-B0FB-71322899C8B9" );
46 static const pool::Guid p1_guid( "4A8CEB2C-0833-4C83-8514-A69928DE4672" );
47 static const pool::Guid p0_guid( "35BE1E01-658C-438A-AC86-F951006ECC6B" );
48
49 Rec::TrackParticleContainer *p_collection = 0;
50 if( compareClassGuid(token, p3_guid ) ) {
51 // std::cout<<"TrackParticleContainerCnv::createTransient p3_guid"<<std::endl;
52
54 p_collection = m_TPConverter_tlp3.createTransient(log);
55 }
56 else if( compareClassGuid(token, p2_guid ) ) {
57 // std::cout<<"TrackParticleContainerCnv::createTransient p2_guid"<<std::endl;
58
60 p_collection = m_TPConverter_tlp2.createTransient(log);
61 }
62 else if( compareClassGuid(token, p1_guid ) ) {
64 p_collection = m_TPConverter_tlp1.createTransient(log);
65 }
66 else if( compareClassGuid(token, p0_guid ) ) {
68 }
69 else {
70 throw std::runtime_error( "Unsupported persistent version of Rec::TrackParticleContainer" );
71 }
72
73 return p_collection;
74
75}//end of create transient method
76
77
#define ATH_CHECK
Evaluate an expression and check for errors.
Rec::TrackParticleContainer_tlp3 TrackParticleContainer_PERS
T_AthenaPoolCustomCnv< Rec::TrackParticleContainer, TrackParticleContainer_PERS > TrackParticleContainerCnvBase
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:21
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 Rec::TrackParticleContainer * createTransient(const Token *token) override
virtual StatusCode initialize() override
Gaudi Service Interface method implementations: