ATLAS Offline Software
TrigMissingETCnv.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 "TrigMissingETCnv.h"
10 
13 
14 
15 
17  MsgStream mlog(msgSvc(), "TrigMissingETConverter" );
18 
19  mlog << MSG::DEBUG << "TrigMissingETCnv::createPersistent" << endmsg;
20 
21 // TrigMissingETCnv_p1 converter;
22  TrigMissingETCnv_p2 converter;
23 
24  TrigMissingET_PERS *persObj = converter.createPersistent( transObj, mlog );
25 
26  return persObj;
27 }
28 
29 
31  MsgStream mlog(msgSvc(), "TrigMissingETConverter" );
32 
33  mlog << MSG::DEBUG << "TrigMissingETCnv::createTransient " << endmsg;
34 
35  static const pool::Guid p2_guid("9972F10B-2B6A-42A7-AF71-D8FB60F07C6D");
36  static const pool::Guid p1_guid("A65F0499-A789-4D66-9930-E8651FE91F8A");
37  static const pool::Guid p0_guid("1403772C-7444-4340-930B-ABD51C243A09");
38 
39  if( compareClassGuid(p2_guid) ) {
40 
41  std::unique_ptr< TrigMissingET_p2 > col_vect( poolReadObject< TrigMissingET_p2 >() );
42  TrigMissingETCnv_p2 converter;
43  return converter.createTransient( col_vect.get(), mlog );
44 
45  }
46  else if( compareClassGuid(p1_guid) ) {
47 
48  std::unique_ptr< TrigMissingET_p1 > col_vect( poolReadObject< TrigMissingET_p1 >() );
49  TrigMissingETCnv_p1 converter;
50  return converter.createTransient( col_vect.get(), mlog );
51 
52  }
53  else if( compareClassGuid(p0_guid) ) {
54  // old version from before TP separation, just return it
55  return this->poolReadObject<TrigMissingET>();
56  }
57  else {
58  throw std::runtime_error("Unsupported persistent version");
59  }
60 
61 }
TrigMissingETCnv_p1
Definition: TrigMissingETCnv_p1.h:32
TrigMissingET_p2.h
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TrigMissingET_p2
Definition: TrigMissingET_p2.h:26
TrigMissingET_p1.h
TrigMissingETCnv_p2.h
TrigMissingETCnv_p2
Definition: TrigMissingETCnv_p2.h:31
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
TrigMissingETCnv::createPersistent
virtual TrigMissingET_PERS * createPersistent(TrigMissingET *transObj)
Definition: TrigMissingETCnv.cxx:16
TrigMissingETCnv::~TrigMissingETCnv
~TrigMissingETCnv()
Definition: TrigMissingETCnv.cxx:12
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
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
TrigMissingETCnv::createTransient
virtual TrigMissingET * createTransient()
Definition: TrigMissingETCnv.cxx:30
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigMissingETCnv.h
TrigMissingET
Class for LVL2/EF MissingET trigger.
Definition: Trigger/TrigEvent/TrigMissingEtEvent/TrigMissingEtEvent/TrigMissingET.h:35
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.
TrigMissingETCnv_p1.h
TrigMissingETCnv::TrigMissingETCnv
TrigMissingETCnv(ISvcLocator *svcloc)
Definition: TrigMissingETCnv.cxx:11