ATLAS Offline Software
TrigTrtHitCountsCnv.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 "TrigTrtHitCountsCnv.h"
8 
11 
13  MsgStream mlog(msgSvc(), "TrigTrtHitCountsConverter" );
14  mlog << MSG::DEBUG << "TrigTrtHitCountsCnv::createPersistent" << endmsg;
15 
16  TrigTrtHitCountsCnv_p1 converter;
17  TrigTrtHitCounts_PERS *persObj = converter.createPersistent( transObj, mlog );
18 
19  return persObj;
20 }
21 
23  MsgStream mlog(msgSvc(), "TrigTrtHitCountsConverter" );
24  mlog << MSG::DEBUG << "TrigTrtHitCountsCnv::createTransient " << endmsg;
25 
26  static const pool::Guid p1_guid("FB33CC3C-74B8-43DF-ABDA-E56BEA1D9D61");
27 
28  TrigTrtHitCounts *transObj = 0;
29 
30  if( compareClassGuid(p1_guid) ) {
31  mlog << MSG::DEBUG << "TrigTrtHitCountsCnv::reading p1 persistent object" << endmsg;
32  std::unique_ptr< TrigTrtHitCounts_p1 > pers_ptr( poolReadObject< TrigTrtHitCounts_p1 >() );
33  TrigTrtHitCountsCnv_p1 converter;
34  transObj = converter.createTransient(pers_ptr.get(), mlog);
35  }
36  else {
37  throw std::runtime_error("Unsupported persistent version of Data container");
38  }
39 
40  return transObj;
41 }
TrigTrtHitCountsCnv::createTransient
TrigTrtHitCounts * createTransient()
Definition: TrigTrtHitCountsCnv.cxx:22
TrigTrtHitCountsCnv::TrigTrtHitCountsCnv
TrigTrtHitCountsCnv(ISvcLocator *svcloc)
Definition: TrigTrtHitCountsCnv.cxx:9
TrigTrtHitCountsCnv.h
TrigTrtHitCounts_p1.h
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TrigTrtHitCountsCnv_p1
Definition: TrigTrtHitCountsCnv_p1.h:26
TrigTrtHitCountsCnv::~TrigTrtHitCountsCnv
~TrigTrtHitCountsCnv()
Definition: TrigTrtHitCountsCnv.cxx:10
TrigTrtHitCounts_p1
Definition: TrigTrtHitCounts_p1.h:20
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
TrigTrtHitCounts
A class to store the distributions of time of threshold from the TRT raw data.
Definition: TrigTrtHitCounts.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
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.
TrigTrtHitCountsCnv_p1.h
TrigTrtHitCountsCnv::createPersistent
TrigTrtHitCounts_PERS * createPersistent(TrigTrtHitCounts *transObj)
Definition: TrigTrtHitCountsCnv.cxx:12