ATLAS Offline Software
TrigTauClusterDetailsCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 
11  m_TPConverter (new TrigTauClusterDetailsCnv_tlp1)
12 {}
14 {
15  delete m_TPConverter;
16 }
17 
18 
19 //create persistent
21 {
22  MsgStream mlog(msgSvc(), "TrigTauClusterDetailsConverter" );
23  mlog << MSG::DEBUG << "TrigTauClusterDetailsCnv::createPersistent" << endmsg;
24 
26 
27  return persObj;
28 
29 }
30 
31 //create transient
33 {
34  MsgStream mlog(msgSvc(), "TrigTauClusterDetailsConverter" );
35  mlog << MSG::DEBUG << "TrigTauClusterDetailsCnv::createTransient " << endmsg;
36 
37  static const pool::Guid tlp1_guid("4F82A265-04F7-4BE9-9DB1-42C00A574778");
38  static const pool::Guid p0_guid("1C8021CB-F4FB-473A-B379-9BEF3FC7FEB9");
39 
40  TrigTauClusterDetails *trans_cont(0);
41 
42  if( compareClassGuid(tlp1_guid) ) {
43 
44  mlog << MSG::DEBUG << "TrigTauClusterDetailsCnv::reading tlp1 persistent object" << endmsg;
45  std::unique_ptr< TrigTauClusterDetails_tlp1 > col_vect( this->poolReadObject< TrigTauClusterDetails_tlp1 >() );
46  trans_cont = m_TPConverter->createTransient( col_vect.get(), mlog );
47 
48  }
49  else if( compareClassGuid(p0_guid) ) {
50 
51  mlog << MSG::DEBUG << "TrigTauClusterDetailsCnv::reading p0 persistent object" << endmsg;
52  // old version from before TP separation, just return it
53  trans_cont = this->poolReadObject<TrigTauClusterDetails>();
54 
55  } else {
56 
57  throw std::runtime_error("Unsupported persistent version of Data container");
58  }
59 
60  return trans_cont;
61 }
TrigTauClusterDetails_tlp1
Definition: TrigTauClusterDetails_tlp1.h:22
TrigTauClusterDetailsCnv::TrigTauClusterDetailsCnv
TrigTauClusterDetailsCnv(ISvcLocator *svcloc)
Definition: TrigTauClusterDetailsCnv.cxx:9
TrigTauClusterDetailsCnv_tlp1
Definition: TrigTauClusterDetailsCnv_tlp1.h:23
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
TrigTauClusterDetails_tlp1.h
TrigTauClusterDetailsCnv::createTransient
TrigTauClusterDetails * createTransient()
Definition: TrigTauClusterDetailsCnv.cxx:32
TrigTauClusterDetailsCnv.h
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
TrigTauClusterDetailsCnv::createPersistent
TrigTauClusterDetails_PERS * createPersistent(TrigTauClusterDetails *transCont)
Definition: TrigTauClusterDetailsCnv.cxx:20
TrigTauClusterDetailsCnv_tlp1.h
DEBUG
#define DEBUG
Definition: page_access.h:11
TopLevelTPConverter::createPersistent
virtual TL_PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of transObj.
Definition: TopLevelTPConverter.h:110
TrigTauClusterDetails
Definition: TrigTauClusterDetails.h:30
T_AthenaPoolCustCnv< TrigTauClusterDetails, TrigTauClusterDetails_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TrigTauClusterDetailsCnv::m_TPConverter
TrigTauClusterDetailsCnv_tlp1 * m_TPConverter
Definition: TrigTauClusterDetailsCnv.h:47
TrigTauClusterDetailsCnv::~TrigTauClusterDetailsCnv
~TrigTauClusterDetailsCnv()
Definition: TrigTauClusterDetailsCnv.cxx:13