ATLAS Offline Software
ALFA_CLinkEventCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "ALFA_CLinkEventCnv.h"
7 
9 {
10  MsgStream LogStream(Athena::getMessageSvc(), "ALFA_CLinkEventCnv_p1");
11  //LogStream<<MSG::INFO<<"MARK01-ALFA_CLinkEventCnv::createPersistent (AthenaPOOL)"<<endmsg;
12 
13  ALFA_CLinkEventCnv_p1 TPConverter;
14  ALFA_CLinkEvent_PERS *persObj = TPConverter.createPersistent( transCont, LogStream );
15 
16  //LogStream<<MSG::INFO<<"MARK02-ALFA_CLinkEventCnv::createPersistent (AthenaPOOL)"<<endmsg;
17  return persObj;
18 }
19 
21 {
22  MsgStream LogStream(Athena::getMessageSvc(), "ALFA_CLinkEventCnv_p1");
23  //LogStream<<MSG::INFO<<"MARK01-ALFA_CLinkEventCnv::createTransient (AthenaPOOL)"<<endmsg;
24 
25  ALFA_CLinkEventCnv_p1 TPConverter_p1;
26 
27  ALFA_CLinkEvent *trans_cont(nullptr); // probably inicialization
28  static const pool::Guid p1_guid ("D8FCB0A1-3B3E-4536-B590-1A48347B6E1A");
29 
30  if( this->compareClassGuid(p1_guid)){
31  std::unique_ptr< ALFA_CLinkEvent_p1 > col_vect( this->poolReadObject< ALFA_CLinkEvent_p1 >() );
32  trans_cont = TPConverter_p1.createTransient( col_vect.get(), LogStream );
33  }
34  else {
35  throw std::runtime_error("Unsupported persistent version of Data container");
36  }
37 
38  //LogStream<<MSG::INFO<<"MARK02-ALFA_CLinkEventCnv::createTransient (AthenaPOOL)"<<endmsg;
39 
40  return trans_cont;
41 }
ALFA_CLinkEventCnv_p1
Definition: ALFA_CLinkEventCnv_p1.h:16
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
ALFA_CLinkEventCnv::createPersistent
ALFA_CLinkEvent_PERS * createPersistent(ALFA_CLinkEvent *transCont)
Definition: ALFA_CLinkEventCnv.cxx:8
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
ALFA_CLinkEvent_p1
Definition: ALFA_CLinkEvent_p1.h:12
ALFA_CLinkEventCnv.h
ALFA_CLinkEvent
Definition: ALFA_CLinkEvent.h:61
T_AthenaPoolCustCnv< ALFA_CLinkEvent, ALFA_CLinkEvent_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
ALFA_CLinkEventCnv::createTransient
ALFA_CLinkEvent * createTransient()
Definition: ALFA_CLinkEventCnv.cxx:20
ALFA_CLinkEventCnv_p1.h