ATLAS Offline Software
SCT_FlaggedCondDataCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
11 #include "SCT_FlaggedCondDataCnv.h"
12 
13 #include <memory>
14 
17  MsgStream log(msgSvc(), "SCT_FlaggedCondDataCnv");
19  std::unique_ptr<SCT_FlaggedCondData_PERS> persObj = std::make_unique<SCT_FlaggedCondData_PERS>();
20  cnv.transToPers(transCont, persObj.get(), log);
21  return persObj.release();
22 }
23 
26  MsgStream log(msgSvc(), "SCT_FlaggedCondDataCnv");
27  static const pool::Guid p1_guid("0C10E502-F02B-440B-9E8F-6A8C31915D7C");
28  if (compareClassGuid(p1_guid)) {
30  std::unique_ptr<SCT_FlaggedCondData_p1> col_vect( poolReadObject< SCT_FlaggedCondData_p1 >() );
32  std::unique_ptr<SCT_FlaggedCondData> trasnObj = std::make_unique<SCT_FlaggedCondData>();
33  cnv.persToTrans(col_vect.get(), trasnObj.get(), log);
34  return trasnObj.release();
35  }
36  throw std::runtime_error("Unsupported persistent version of Data Collection");
37 }
SCT_FlaggedCondDataCnv_p1
Definition: SCT_FlaggedCondDataCnv_p1.h:20
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
SCT_FlaggedCondDataCnv::createTransient
virtual SCT_FlaggedCondData * createTransient()
Definition: SCT_FlaggedCondDataCnv.cxx:25
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
SCT_FlaggedCondDataCnv::createPersistent
virtual SCT_FlaggedCondData_PERS * createPersistent(SCT_FlaggedCondData *transCont)
Definition: SCT_FlaggedCondDataCnv.cxx:16
SCT_FlaggedCondData_p1
Definition: SCT_FlaggedCondData_p1.h:13
SCT_FlaggedCondDataCnv.h
Header file which defines a typedef for templated converter class.
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
SCT_FlaggedCondData
std::map< IdentifierHash, std::string > SCT_FlaggedCondData
Typedef for data object used in SCT_Clusterization and SCT_FlaggedConditionTool.
Definition: SCT_FlaggedCondData.h:26
SCT_FlaggedCondDataCnv_p1::persToTrans
virtual void persToTrans(const SCT_FlaggedCondData_p1 *persObj, SCT_FlaggedCondData *transObj, MsgStream &log)
Definition: SCT_FlaggedCondDataCnv_p1.cxx:16
SCT_FlaggedCondDataCnv_p1::transToPers
virtual void transToPers(const SCT_FlaggedCondData *transObj, SCT_FlaggedCondData_p1 *persObj, MsgStream &log)
Definition: SCT_FlaggedCondDataCnv_p1.cxx:24