ATLAS Offline Software
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 
10 {
13 };
14 
15 TrigEMClusterCnv::TrigEMClusterCnv(ISvcLocator* svcloc) :
17  m_impl (new TrigEMClusterCnv_impl)
18 {}
19 
21 {
22  delete m_impl;
23 }
24 
26 {
27  MsgStream mlog(msgSvc(), "TrigEMClusterConverter" );
28  mlog << MSG::DEBUG << "TrigEMClusterCnv::createPersistent" << endmsg;
29 
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 }
TrigEMCluster_tlp2
Definition: TrigEMCluster_tlp2.h:26
TrigEMClusterCnv::TrigEMClusterCnv
TrigEMClusterCnv(ISvcLocator *svcloc)
Definition: TrigEMClusterCnv.cxx:15
TrigEMClusterCnv::~TrigEMClusterCnv
~TrigEMClusterCnv()
Definition: TrigEMClusterCnv.cxx:20
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
TrigEMCluster
Class with calibrated variables for egamma clustering.
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigEMCluster.h:31
TrigEMClusterCnv_tlp1
Definition: TrigEMClusterCnv_tlp1.h:29
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
TopLevelTPConverter::createTransient
TRANS * createTransient(MsgStream &log)
Create transient representation of the persistent object known to this converter.
Definition: TopLevelTPConverter.h:62
python.InDetPriVxFinderConfig.mlog
mlog
Definition: InDetPriVxFinderConfig.py:134
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
T_AthenaPoolCustomCnv
Compatibility for old converter classes that don't get passed the key.
Definition: T_AthenaPoolCustomCnv.h:132
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigEMClusterCnv_tlp2
Definition: TrigEMClusterCnv_tlp2.h:30
TrigEMClusterCnv_impl::m_TPConverter
TrigEMClusterCnv_tlp1 m_TPConverter
Definition: TrigEMClusterCnv.cxx:11
TrigEMClusterCnv::m_impl
TrigEMClusterCnv_impl * m_impl
Definition: TrigEMClusterCnv.h:46
TrigEMClusterCnv::createTransient
TrigEMCluster * createTransient()
Definition: TrigEMClusterCnv.cxx:36
DEBUG
#define DEBUG
Definition: page_access.h:11
TrigEMClusterCnv_impl::m_TPConverter2
TrigEMClusterCnv_tlp2 m_TPConverter2
Definition: TrigEMClusterCnv.cxx:12
TrigEMClusterCnv_tlp2.h
TopLevelTPConverter::createPersistent
virtual TL_PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of transObj.
Definition: TopLevelTPConverter.h:110
T_AthenaPoolCustCnv< TrigEMCluster, TrigEMCluster_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TrigEMClusterCnv.h
TrigEMClusterCnv_tlp1.h
TrigEMClusterCnv::createPersistent
TrigEMCluster_PERS * createPersistent(TrigEMCluster *transCont)
Definition: TrigEMClusterCnv.cxx:25
TrigEMClusterCnv_impl
Definition: TrigEMClusterCnv.cxx:10