ATLAS Offline Software
LArNoisyROSummaryCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "LArNoisyROSummaryCnv.h"
6 
7 #include "GaudiKernel/StatusCode.h"
8 #include "GaudiKernel/MsgStream.h"
14 
15 
18 {}
19 
20 
23 {
24  MsgStream log(msgSvc(), "LArNoisyROSummaryConverter" );
25  LArNoisyROSummary_p5 *persObj = m_converter.createPersistent( transCont, log );
26  return persObj;
27 }
28 
31 {
32  MsgStream log(msgSvc(), "LArNoisyROSummaryConverter" );
33  LArNoisyROSummary *trans = NULL;
34 
35  // GUID for persistent classes
36  static const pool::Guid guid_p1("4681BC21-3C00-4540-BED6-58E37700D9B9");
37  static const pool::Guid guid_p2("C33CED2C-2101-4B0C-9BCB-739B004639F4");
38  static const pool::Guid guid_p3("7801CF21-F2F2-4E87-9B87-744F31A37D1B");
39  static const pool::Guid guid_p4("8F9E9A44-699E-4056-96CC-555ADA1179D4");
40  static const pool::Guid guid_p5("4AE11DAE-F40C-4B90-B105-0A7BA5D29C1D");
41 
42  if( compareClassGuid(guid_p5) ) {
43  std::unique_ptr<LArNoisyROSummary_p5> col_vect( poolReadObject<LArNoisyROSummary_p5>() );
44  trans = m_converter.createTransient( col_vect.get(), log );
45  }
46  else if( compareClassGuid(guid_p4) ) {
47  LArNoisyROSummaryCnv_p4 converter;
48  std::unique_ptr<LArNoisyROSummary_p4> col_vect( poolReadObject<LArNoisyROSummary_p4>() );
49  trans = converter.createTransient( col_vect.get(), log );
50  }
51  else if( compareClassGuid(guid_p3) ) {
52  LArNoisyROSummaryCnv_p3 converter;
53  std::unique_ptr<LArNoisyROSummary_p3> col_vect( poolReadObject<LArNoisyROSummary_p3>() );
54  trans = converter.createTransient( col_vect.get(), log );
55  }
56  else if( compareClassGuid(guid_p2) ) {
57  LArNoisyROSummaryCnv_p2 converter;
58  std::unique_ptr<LArNoisyROSummary_p2> col_vect( poolReadObject<LArNoisyROSummary_p2>() );
59  trans = converter.createTransient( col_vect.get(), log );
60  }
61  else if( compareClassGuid(guid_p1) ) {
62  LArNoisyROSummaryCnv_p1 converter;
63  std::unique_ptr<LArNoisyROSummary_p1> col_vect( poolReadObject<LArNoisyROSummary_p1>() );
64  trans = converter.createTransient( col_vect.get(), log );
65  }
66  else {
67  // log << MSG::ERROR << "failed trying to read : " << m_token << endmsg;
68  throw std::runtime_error("Unsupported persistent version of LArNoisyROSummary ") ;
69  }
70  return trans;
71 }
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
LArNoisyROSummaryCnv::createPersistent
virtual LArNoisyROSummary_PERSISTENT * createPersistent(LArNoisyROSummary *)
Definition: LArNoisyROSummaryCnv.cxx:22
LArNoisyROSummaryCnv_p1.h
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
LArNoisyROSummaryCnv_p4.h
LArNoisyROSummaryCnv.h
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
LArNoisyROSummaryCnv_p3.h
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
LArNoisyROSummaryCnv::m_converter
LArNoisyROSummaryCnv_p5 m_converter
Definition: LArNoisyROSummaryCnv.h:26
LArNoisyROSummaryCnv_p4
Definition: LArNoisyROSummaryCnv_p4.h:16
LArNoisyROSummary_p5
Definition: LArNoisyROSummary_p5.h:15
LArNoisyROSummaryCnv::LArNoisyROSummaryCnv
LArNoisyROSummaryCnv(ISvcLocator *)
Definition: LArNoisyROSummaryCnv.cxx:16
LArNoisyROSummaryCnv_p2
Definition: LArNoisyROSummaryCnv_p2.h:16
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LArNoisyROSummaryCnv_p3
Definition: LArNoisyROSummaryCnv_p3.h:16
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
StoreGateSvc.h
LArNoisyROSummaryCnv::createTransient
virtual LArNoisyROSummary * createTransient()
Definition: LArNoisyROSummaryCnv.cxx:30
LArNoisyROSummaryCnv_p2.h
LArNoisyROSummary
Summary information for noisy LAr preamp / FEBs.
Definition: LArNoisyROSummary.h:26
LArNoisyROSummaryCnv_p1
Definition: LArNoisyROSummaryCnv_p1.h:16