ATLAS Offline Software
LArFebErrorSummaryCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include "GaudiKernel/StatusCode.h"
10 
11 
13  LArFebErrorSummaryCnvBase(svcLoc, "LArFebErrorSummaryCnv")
14 {}
15 
16 
19 {
20  LArFebErrorSummary_p1 *persObj = m_converter.createPersistent( transCont, msg() );
21  return persObj;
22 }
23 
26 {
27  LArFebErrorSummary *trans = NULL;
28 
29  // GUID for persistent classes
30  static const pool::Guid guid_p1("9448FB64-AB7E-4995-A5FC-23E9A6C1AF80");
31 
32  if( compareClassGuid(guid_p1) ) {
33  std::unique_ptr<LArFebErrorSummary_p1> col_vect( poolReadObject<LArFebErrorSummary_p1>() );
34  trans = m_converter.createTransient( col_vect.get(), msg() );
35  }
36  else {
37  // log << MSG::ERROR << "failed trying to read : " << m_token << endmsg;
38  throw std::runtime_error("Unsupported persistent version of LArFebErrorSummary ") ;
39  }
40  return trans;
41 }
LArFebErrorSummaryCnv::createTransient
virtual LArFebErrorSummary * createTransient()
Definition: LArFebErrorSummaryCnv.cxx:25
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
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:18
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
LArFebErrorSummary
Holds information from the FEB Error Summary.
Definition: LArFebErrorSummary.h:23
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:12