ATLAS Offline Software
TrigHisto2DCnv.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 "TrigHisto2DCnv.h"
7 
8 TrigHisto2DCnv::TrigHisto2DCnv(ISvcLocator* svcloc): TrigHisto2DCnvBase(svcloc) {}
10 
12  MsgStream mlog(msgSvc(), "TrigHisto2DConverter" );
13  mlog << MSG::DEBUG << "TrigHisto2DCnv::createPersistent" << endmsg;
14 
15  TrigHisto2DCnv_p1 converter;
16  TrigHisto2D_p1 *persObj = converter.createPersistent( transObj, mlog );
17 
18  return persObj;
19 }
20 
22  MsgStream mlog(msgSvc(), "TrigHisto2DConverter" );
23  mlog << MSG::DEBUG << "TrigHisto2DCnv::createTransient " << endmsg;
24 
25  static const pool::Guid p1_guid("8CF4D0A0-2957-4014-AEB2-140D1A013E7F");
26 
27  TrigHisto2D *transObj = 0;
28 
29  if( compareClassGuid(p1_guid) ) {
30  mlog << MSG::DEBUG << "TrigHisto2DCnv::reading p1 persistent object" << endmsg;
31  std::unique_ptr<TrigHisto2D_p1> pers_ptr( poolReadObject<TrigHisto2D_p1>() );
32  TrigHisto2DCnv_p1 converter;
33  transObj = converter.createTransient(pers_ptr.get(), mlog);
34  }
35  else {
36  throw std::runtime_error("Unsupported persistent version of Data container");
37  }
38 
39  return transObj;
40 }
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TrigHisto2D_p1
The persistent partner of the TrigHisto2D class.
Definition: TrigHisto2D_p1.h:17
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
TrigHisto2DCnv::~TrigHisto2DCnv
~TrigHisto2DCnv()
Definition: TrigHisto2DCnv.cxx:9
TrigHisto2DCnv::TrigHisto2DCnv
TrigHisto2DCnv(ISvcLocator *svcloc)
Definition: TrigHisto2DCnv.cxx:8
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
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigHisto2DCnv::createTransient
TrigHisto2D * createTransient()
Definition: TrigHisto2DCnv.cxx:21
TrigHisto2DCnv.h
TrigHisto2D
A very basic two dimensional histogram to provide storage of HLT distributions, allowing constraints ...
Definition: Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigHisto2D.h:24
DEBUG
#define DEBUG
Definition: page_access.h:11
TrigHisto2DCnv_p1
Definition: TrigHisto2DCnv_p1.h:24
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TrigHisto2DCnv_p1.h
TrigHisto2DCnv::createPersistent
TrigHisto2D_PERS * createPersistent(TrigHisto2D *transObj)
Definition: TrigHisto2DCnv.cxx:11