ATLAS Offline Software
Loading...
Searching...
No Matches
TrigEMClusterCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "TrigEMClusterCnv.h"
8
14
19
24
26{
27 MsgStream mlog(msgSvc(), "TrigEMClusterConverter" );
28 mlog << MSG::DEBUG << "TrigEMClusterCnv::createPersistent" << endmsg;
29
30 TrigEMCluster_PERS *persObj = m_impl->m_TPConverter2.createPersistent( transCont, mlog );
31
32 return persObj;
33}
34
35
37{
38 MsgStream mlog(msgSvc(), "TrigEMClusterConverter" );
39 mlog << MSG::DEBUG << "TrigEMClusterCnv::createTransient " << endmsg;
40
41 static const pool::Guid tlp2_guid("61D02BB3-0F97-4809-AC93-72B2DC2DF624");
42 static const pool::Guid tlp1_guid("EF5124F2-7B9C-4CBE-8D7F-1AD368A8A125");
43 static const pool::Guid p0_guid("E60986AE-938E-4256-A100-CD99158ADE9E");
44
45 TrigEMCluster *trans_cont(0);
46
47 if( compareClassGuid(tlp2_guid) ) {
48
49 mlog << MSG::DEBUG << "TrigEMClusterCnv::reading tlp2 persistent object" << endmsg;
50 std::unique_ptr< TrigEMCluster_tlp2 > col_vect( this->poolReadObject< TrigEMCluster_tlp2 >() );
51 trans_cont = m_impl->m_TPConverter2.createTransient( col_vect.get(), mlog );
52
53 } else if( compareClassGuid(tlp1_guid) ) {
54
55 mlog << MSG::DEBUG << "TrigEMClusterCnv::reading tlp1 persistent object" << endmsg;
56 std::unique_ptr< TrigEMCluster_tlp1 > col_vect( this->poolReadObject< TrigEMCluster_tlp1 >() );
57 trans_cont = m_impl->m_TPConverter.createTransient( col_vect.get(), mlog );
58
59 }
60 else if( compareClassGuid(p0_guid) ) {
61
62 mlog << MSG::DEBUG << "TrigEMClusterCnv::reading p0 persistent object" << endmsg;
63 // old version from before TP separation, just return it
64 trans_cont = this->poolReadObject<TrigEMCluster>();
65
66 } else {
67
68 throw std::runtime_error("Unsupported persistent version of Data container");
69
70 }
71 return trans_cont;
72
73}
#define endmsg
TrigEMCluster_tlp2 TrigEMCluster_PERS
virtual bool compareClassGuid(const Guid &clid) const
Compatibility for old converter classes that don't get passed the key.
TrigEMClusterCnv_impl * m_impl
TrigEMClusterCnv(ISvcLocator *svcloc)
TrigEMCluster_PERS * createPersistent(TrigEMCluster *transCont)
TrigEMCluster * createTransient()
Class with calibrated variables for egamma clustering.
TrigEMClusterCnv_tlp1 m_TPConverter
TrigEMClusterCnv_tlp2 m_TPConverter2