ATLAS Offline Software
TrigHisto1DCnv.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 "TrigHisto1DCnv.h"
7 
8 TrigHisto1DCnv::TrigHisto1DCnv(ISvcLocator* svcloc): TrigHisto1DCnvBase(svcloc) {}
10 
12  MsgStream mlog(msgSvc(), "TrigHisto1DConverter" );
13  mlog << MSG::DEBUG << "TrigHisto1DCnv::createPersistent" << endmsg;
14 
15  TrigHisto1DCnv_p1 converter;
16  TrigHisto1D_p1 *persObj = converter.createPersistent( transObj, mlog );
17 
18  return persObj;
19 }
20 
22  MsgStream mlog(msgSvc(), "TrigHisto1DConverter" );
23  mlog << MSG::DEBUG << "TrigHisto1DCnv::createTransient " << endmsg;
24 
25  static const pool::Guid p1_guid("C304621E-2266-4863-9B47-7C3450B00399");
26 
27  TrigHisto1D *transObj = 0;
28 
29  if( compareClassGuid(p1_guid) ) {
30  mlog << MSG::DEBUG << "TrigHisto1DCnv::reading p1 persistent object" << endmsg;
31  std::unique_ptr<TrigHisto1D_p1> pers_ptr( poolReadObject<TrigHisto1D_p1>() );
32  TrigHisto1DCnv_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 }
TrigHisto1DCnv::TrigHisto1DCnv
TrigHisto1DCnv(ISvcLocator *svcloc)
Definition: TrigHisto1DCnv.cxx:8
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
TrigHisto1D
A very basic one dimensional histogram to provide storage of HLT distributions, allowing constraints ...
Definition: TrigHisto1D.h:23
TrigHisto1DCnv_p1.h
TrigHisto1DCnv::createPersistent
TrigHisto1D_PERS * createPersistent(TrigHisto1D *transObj)
Definition: TrigHisto1DCnv.cxx:11
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
TrigHisto1DCnv::createTransient
TrigHisto1D * createTransient()
Definition: TrigHisto1DCnv.cxx:21
DEBUG
#define DEBUG
Definition: page_access.h:11
TrigHisto1DCnv::~TrigHisto1DCnv
~TrigHisto1DCnv()
Definition: TrigHisto1DCnv.cxx:9
TrigHisto1DCnv_p1
Definition: TrigHisto1DCnv_p1.h:24
TrigHisto1D_p1
The persistent partner of TrigHisto1D class.
Definition: TrigHisto1D_p1.h:17
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TrigHisto1DCnv.h