ATLAS Offline Software
Loading...
Searching...
No Matches
MissingEtCaloCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5/********************************************************************
6NAME: MissingEtCaloCnv.h
7PURPOSE: Implementation file for class MissingEtCaloCnv
8********************************************************************/
9
10// Framework includes
11#include "GaudiKernel/MsgStream.h"
12
13// RecTPCnv includes
17
18// RecAthenaPool includes
19#include "MissingEtCaloCnv.h"
20
23{
24 MsgStream msg( msgSvc(), "MissingEtCaloCnv" );
25
27 MissingEtCalo_PERS *persObj = cnv.createPersistent( transCont, msg );
28
29 msg << MSG::DEBUG << "::createPersistent [Success]" << endmsg;
30 return persObj;
31}
32
34{
35 MsgStream msg( msgSvc(), "MissingEtCaloCnv" );
36
37 MissingEtCalo *transObj = 0;
38
39 static const pool::Guid tr_guid("BD14D6E7-C771-4079-BF31-F43FE1068C95");
40 static const pool::Guid p1_guid("877E907D-D7E1-49DE-B01F-9CDA344E6004");
41 static const pool::Guid p2_guid("F16ECA98-8809-436C-A00A-06DBBF9C3087");
42 static const pool::Guid p3_guid("0B9C9E87-92C8-49D3-8DF1-45ACDDD3336F");
43
44 if ( compareClassGuid(tr_guid) ) { // regular object from before the T/P separation
46 }else if ( compareClassGuid(p1_guid) ) {
47 // using unique_ptr ensures deletion of the persistent object
48 std::unique_ptr<MissingEtCalo_p1> persObj( poolReadObject<MissingEtCalo_p1>() );
50 transObj = cnv.createTransient( persObj.get(), msg );
51 }else if ( compareClassGuid(p2_guid) ) {
52 std::unique_ptr<MissingEtCalo_p2> persObj( poolReadObject<MissingEtCalo_p2>() );
54 transObj = cnv.createTransient( persObj.get(), msg );
55 }else if ( compareClassGuid(p3_guid) ) {
56 std::unique_ptr<MissingEtCalo_p3> persObj( poolReadObject<MissingEtCalo_p3>() );
58 transObj = cnv.createTransient( persObj.get(), msg );
59 } else {
60 throw std::runtime_error("Unsupported persistent version of MissingEtCalo");
61 }
62
63 return transObj;
64}
#define endmsg
MissingEtCalo_p3 MissingEtCalo_PERS
virtual MissingEtCalo_PERS * createPersistent(MissingEtCalo *transCont)
Build the persistent representation from the transient one.
virtual MissingEtCalo * createTransient()
Build the transient representation from a persistent one.
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
virtual bool compareClassGuid(const Guid &clid) const