ATLAS Offline Software
Loading...
Searching...
No Matches
MVFVxContainerCnv.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: MVFVxContainerCnv.cxx
8// author: Kirill Prokofiev <Kirill.Prokofiev@cern.ch>
9//
10//-----------------------------------------------------------------------------
11
12
13#include "MVFVxContainerCnv.h"
14
15
16//-----------------------------------------------------------------------------
17// Constructor
18//-----------------------------------------------------------------------------
19
22 {
23
24 }
25
26//-----------------------------------------------------------------------------
27// Initializer
28//-----------------------------------------------------------------------------
30{
31 MsgStream log(msgSvc());
32
34 if( sc.isFailure() )
35 {
36 log << MSG::FATAL << "Could not initialize MVFVxContainerCnvBase" << endmsg;
37 return sc;
38 }
39
40//-------------------------------------------------------------------------
41// Set up the message stream
42//-------------------------------------------------------------------------
43 // log.setLevel( m_msgSvc->outputLevel() );
44 log << MSG::INFO << "MVFVxContainerCnv::initialize()" << endmsg;
45 return StatusCode::SUCCESS;
46}
47
48
50{
51 MsgStream log(msgSvc(), "MVFVxContainerCnv" );
52 log << MSG::ERROR << "createPersistent() is obsolete" << endmsg;
53 return nullptr;
54}
55
56
58{
59 MsgStream log(msgSvc());
60 static const pool::Guid p1_guid( "D7BAA7AD-1A46-4DA3-9CA7-350A1A3F0656" );
61 static const pool::Guid p0_guid( "6C6999B7-F961-4B72-B6D9-DF71CB2364CC" );
62
63 MVFVxContainer *p_collection = nullptr;
64
65 if( compareClassGuid(token, p1_guid ) ) {
66 // std::cout << "MVFVxContainerCnv::createTransient(const Token* token)" << std::endl;
68 p_collection = m_TPConverter.createTransient( log );
69
70 } else if( compareClassGuid(token, p0_guid ) ) {
71 // std::cout << "MVFVxContainerCnv::createTransient: use old converter" << std::endl;
72 p_collection = poolReadObject< MVFVxContainer >(token);
73 } else
74 throw std::runtime_error( "Unsupported persistent version of MVFVxContainer (unknown GUID)" );
75
76 return p_collection;
77}
78
79
81{
82 static const pool::Guid p1_guid( "D7BAA7AD-1A46-4DA3-9CA7-350A1A3F0656" );
83
84 // select the object type based on its GUID
85 if( compareClassGuid(token, p1_guid ) ) {
86 // read the object using the main TP converter
88 }
89 else
90 throw std::runtime_error( "Unsupported version of MVFVxContainer (unknown GUID)" );
91}
#define endmsg
static Double_t sc
T_AthenaPoolExtendingCnv< MVFVxContainer, MVFVxContainer_PERS > MVFVxContainerCnvBase
Trk::MVFVxContainer_tlp1 MVFVxContainer_PERS
MVFVxContainerCnv(ISvcLocator *svcloc)
virtual StatusCode initialize() override
Gaudi Service Interface method implementations:
virtual void readObjectFromPool(const Token *token) override
Read the persistent object from POOL.
virtual MVFVxContainer * createTransient(const Token *token) override
virtual MVFVxContainer_PERS * createPersistent(MVFVxContainer *transCont) override
no-op
MVFVxContainerCnv_tlp1 m_TPConverter
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