ATLAS Offline Software
TrigPassBitsCnv.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 "TrigPassBitsCnv.h"
7 
8 
9 TrigPassBitsCnv::TrigPassBitsCnv(ISvcLocator *svcloc): TrigPassBitsCnvBase(svcloc) {}
11 
12 //createPersistent
14  MsgStream mlog(msgSvc(), "TrigPassBitsConverter" );
15 
16  TrigPassBitsCnv_p1 converter;
17  TrigPassBits_PERS *persObj = converter.createPersistent( transObj, mlog );
18 
19  return persObj;
20 }
21 
22 //createTransient
24  MsgStream mlog(msgSvc(), "TrigPassBitsConverter" );
25 
26  static const pool::Guid p1_guid("391FFE21-5D82-471E-9FFC-B77150142B8F");
27 
28  if( compareClassGuid(p1_guid) ) {
29 
30  std::unique_ptr< TrigPassBits_p1 > col_vect( poolReadObject< TrigPassBits_p1 >() );
31  TrigPassBitsCnv_p1 converter;
32  return converter.createTransient( col_vect.get(), mlog );
33 
34  }
35  else {
36  throw std::runtime_error("Unsupported persistent version");
37  }
38 
39 }
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TrigPassBitsCnv::createTransient
virtual TrigPassBits * createTransient()
Definition: TrigPassBitsCnv.cxx:23
TrigPassBitsCnv::createPersistent
virtual TrigPassBits_PERS * createPersistent(TrigPassBits *transObj)
Definition: TrigPassBitsCnv.cxx:13
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
TrigPassBits_p1
Definition: TrigPassBits_p1.h:21
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
TrigPassBitsCnv_p1
Definition: TrigPassBitsCnv_p1.h:28
TrigPassBitsCnv::~TrigPassBitsCnv
~TrigPassBitsCnv()
Definition: TrigPassBitsCnv.cxx:10
TrigPassBits
Definition: Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/TrigPassBits.h:17
TrigPassBitsCnv.h
TrigPassBitsCnv_p1.h
TrigPassBitsCnv::TrigPassBitsCnv
TrigPassBitsCnv(ISvcLocator *svcloc)
Definition: TrigPassBitsCnv.cxx:9
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.