ATLAS Offline Software
TrigTauClusterContainerCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
10 
11 //createPersistent
13 {
14  MsgStream mlog(msgSvc(), "TrigTauClusterContainerConverter");
15 
16  mlog << MSG::DEBUG << "TrigTauClusterContainerCnv::createPersistent called" << endmsg;
17 
18  TrigTauClusterContainer_PERS* p_TauClusterCont = m_converter5.createPersistent(transObj, mlog);
19 
20  return p_TauClusterCont;
21 
22 }//end of create persistent method
23 
24 
25 //createTransient
27 {
28  MsgStream mlog(msgSvc(), "TrigTauClusterContainerConverter");
29 
30  mlog << MSG::DEBUG << "TrigTauClusterContainerCnv::createTransient called" << endmsg;
31 
32  static const pool::Guid p5_guid("8384F60B-952E-4DE4-B307-1AC1C405E156");
33  static const pool::Guid p4_guid("D41E29BA-0FE8-4319-85F4-93EA68AD9195");
34  static const pool::Guid p3_guid("3BB1A500-2188-47D4-9352-6638DEA3FC7D");
35  static const pool::Guid tlp1_guid("E1FC5307-A747-42D7-9542-998A9AACB445");
36  static const pool::Guid tlp2_guid("07437EBD-7637-4C3F-B177-6D640AE36FAD");
37 
38  if(compareClassGuid(p5_guid))
39  {
40  std::unique_ptr< TrigTauClusterContainer_p5 > col_vect(poolReadObject< TrigTauClusterContainer_p5 >());
41  //std::cout << "Reading TTCC p5" << std::endl;
42  return m_converter5.createTransient(col_vect.get(), mlog);
43  }
44  else if(compareClassGuid(p4_guid))
45  {
46  std::unique_ptr< TrigTauClusterContainer_p4 > col_vect(poolReadObject< TrigTauClusterContainer_p4 >());
47  //std::cout << "Reading TTCC p4" << std::endl;
48  return m_converter4.createTransient(col_vect.get(), mlog);
49  }
50  else if(compareClassGuid(p3_guid))
51  {
52  std::unique_ptr< TrigTauClusterContainer_p3 > col_vect(poolReadObject< TrigTauClusterContainer_p3 >());
53  //std::cout << "Reading TTCC p3" << std::endl;
54  return m_converter3.createTransient(col_vect.get(), mlog);
55  }
56  else if(compareClassGuid(tlp1_guid))
57  {
58  std::unique_ptr< TrigTauClusterContainer_tlp1 > col_vect(poolReadObject< TrigTauClusterContainer_tlp1 >());
59  //std::cout << "Reading TTC tlp1" << std::endl;
60  return m_converter1.createTransient( col_vect.get(), mlog );
61  }
62  else
63  {
64  throw std::runtime_error("Unsupported persistent version of TrigTauClusterContainer");
65  }
66 
67 }//end of create transient method
68 
TrigTauClusterContainerCnv::m_converter4
TrigTauClusterContainerCnv_p4 m_converter4
Definition: TrigTauClusterContainerCnv.h:47
TrigTauClusterContainer_p3.h
TrigTauClusterContainer_p5.h
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TrigTauClusterContainerCnv::m_converter1
TrigTauClusterContainerCnv_tlp1 m_converter1
Definition: TrigTauClusterContainerCnv.h:45
TrigTauClusterContainer_p4.h
TrigTauClusterContainer_tlp1.h
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
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
TrigTauClusterContainerCnv::m_converter3
TrigTauClusterContainerCnv_p3 m_converter3
Definition: TrigTauClusterContainerCnv.h:46
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigTauClusterContainer
Container from TrigTauCluster type objects.
Definition: TrigTauClusterContainer.h:32
TrigTauClusterContainerCnv::m_converter5
TrigTauClusterContainerCnv_p5 m_converter5
Definition: TrigTauClusterContainerCnv.h:48
TrigTauClusterContainerCnv.h
TrigTauClusterContainer_p5
Definition: TrigTauClusterContainer_p5.h:10
DEBUG
#define DEBUG
Definition: page_access.h:11
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TrigTauClusterContainerCnv::createTransient
virtual TrigTauClusterContainer * createTransient()
Definition: TrigTauClusterContainerCnv.cxx:26
TrigTauClusterContainerCnv::createPersistent
virtual TrigTauClusterContainer_PERS * createPersistent(TrigTauClusterContainer *transObj)
Definition: TrigTauClusterContainerCnv.cxx:12