ATLAS Offline Software
LArFebErrorSummaryCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include "GaudiKernel/StatusCode.h"
8 #include "GaudiKernel/MsgStream.h"
11 
12 
15 {}
16 
17 
20 {
21  MsgStream log(msgSvc(), "LArFebErrorSummaryConverter" );
22  LArFebErrorSummary_p1 *persObj = m_converter.createPersistent( transCont, log );
23  return persObj;
24 }
25 
28 {
29  MsgStream log(msgSvc(), "LArFebErrorSummaryConverter" );
30  LArFebErrorSummary *trans = NULL;
31 
32  // GUID for persistent classes
33  static const pool::Guid guid_p1("9448FB64-AB7E-4995-A5FC-23E9A6C1AF80");
34 
35  if( compareClassGuid(guid_p1) ) {
36  std::unique_ptr<LArFebErrorSummary_p1> col_vect( poolReadObject<LArFebErrorSummary_p1>() );
37  trans = m_converter.createTransient( col_vect.get(), log );
38  }
39  else {
40  // log << MSG::ERROR << "failed trying to read : " << m_token << endmsg;
41  throw std::runtime_error("Unsupported persistent version of LArFebErrorSummary ") ;
42  }
43  return trans;
44 }
LArFebErrorSummaryCnv::createTransient
virtual LArFebErrorSummary * createTransient()
Definition: LArFebErrorSummaryCnv.cxx:27
LArFebErrorSummaryCnv::m_converter
LArFebErrorSummaryCnv_p1 m_converter
Definition: LArFebErrorSummaryCnv.h:26
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.
LArFebErrorSummaryCnv.h
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
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
LArFebErrorSummaryCnv::createPersistent
virtual LArFebErrorSummary_PERSISTENT * createPersistent(LArFebErrorSummary *)
Definition: LArFebErrorSummaryCnv.cxx:19
LArFebErrorSummary
Holds information from the FEB Error Summary.
Definition: LArFebErrorSummary.h:23
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LArFebErrorSummaryCnv_p1.h
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
LArFebErrorSummary_p1
persistent class for LArFebErrorSummary, version p2.
Definition: LArFebErrorSummary_p1.h:15
StoreGateSvc.h
LArFebErrorSummaryCnv::LArFebErrorSummaryCnv
LArFebErrorSummaryCnv(ISvcLocator *)
Definition: LArFebErrorSummaryCnv.cxx:13