ATLAS Offline Software
LArNoisyROSummaryCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "LArNoisyROSummaryCnv.h"
6 
7 #include "GaudiKernel/StatusCode.h"
14 
15 
17  LArNoisyROSummaryCnvBase(svcLoc, "LArNoisyROSummaryConverter")
18 {}
19 
20 
23 {
24  LArNoisyROSummary_p6 *persObj = m_converter.createPersistent( transCont, msg() );
25  return persObj;
26 }
27 
30 {
31  LArNoisyROSummary *trans = NULL;
32 
33  // GUID for persistent classes
34  static const pool::Guid guid_p1("4681BC21-3C00-4540-BED6-58E37700D9B9");
35  static const pool::Guid guid_p2("C33CED2C-2101-4B0C-9BCB-739B004639F4");
36  static const pool::Guid guid_p3("7801CF21-F2F2-4E87-9B87-744F31A37D1B");
37  static const pool::Guid guid_p4("8F9E9A44-699E-4056-96CC-555ADA1179D4");
38  static const pool::Guid guid_p5("4AE11DAE-F40C-4B90-B105-0A7BA5D29C1D");
39  static const pool::Guid guid_p6("D2B7F48F-058E-47C9-902D-0A847F5E2194");
40 
41  if( compareClassGuid(guid_p6) ) {
42  std::unique_ptr<LArNoisyROSummary_p6> col_vect( poolReadObject<LArNoisyROSummary_p6>() );
43  trans = m_converter.createTransient( col_vect.get(), msg() );
44  }
45  else if( compareClassGuid(guid_p5) ) {
46  LArNoisyROSummaryCnv_p5 converter;
47  std::unique_ptr<LArNoisyROSummary_p5> col_vect( poolReadObject<LArNoisyROSummary_p5>() );
48  trans = converter.createTransient( col_vect.get(), msg() );
49  }
50  else if( compareClassGuid(guid_p4) ) {
51  LArNoisyROSummaryCnv_p4 converter;
52  std::unique_ptr<LArNoisyROSummary_p4> col_vect( poolReadObject<LArNoisyROSummary_p4>() );
53  trans = converter.createTransient( col_vect.get(), msg() );
54  }
55  else if( compareClassGuid(guid_p3) ) {
56  LArNoisyROSummaryCnv_p3 converter;
57  std::unique_ptr<LArNoisyROSummary_p3> col_vect( poolReadObject<LArNoisyROSummary_p3>() );
58  trans = converter.createTransient( col_vect.get(), msg() );
59  }
60  else if( compareClassGuid(guid_p2) ) {
61  LArNoisyROSummaryCnv_p2 converter;
62  std::unique_ptr<LArNoisyROSummary_p2> col_vect( poolReadObject<LArNoisyROSummary_p2>() );
63  trans = converter.createTransient( col_vect.get(), msg() );
64  }
65  else if( compareClassGuid(guid_p1) ) {
66  LArNoisyROSummaryCnv_p1 converter;
67  std::unique_ptr<LArNoisyROSummary_p1> col_vect( poolReadObject<LArNoisyROSummary_p1>() );
68  trans = converter.createTransient( col_vect.get(), msg() );
69  }
70  else {
71  throw std::runtime_error("Unsupported persistent version of LArNoisyROSummary ") ;
72  }
73  return trans;
74 }
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_p5.h
LArNoisyROSummaryCnv.h
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
LArNoisyROSummaryCnv_p5
Definition: LArNoisyROSummaryCnv_p5.h:16
LArNoisyROSummary_p6
Definition: LArNoisyROSummary_p6.h:15
LArNoisyROSummaryCnv_p3.h
T_AthenaPoolCustomCnv
Compatibility for old converter classes that don't get passed the key.
Definition: T_AthenaPoolCustomCnv.h:132
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
LArNoisyROSummaryCnv_p4
Definition: LArNoisyROSummaryCnv_p4.h:16
LArNoisyROSummaryCnv::LArNoisyROSummaryCnv
LArNoisyROSummaryCnv(ISvcLocator *)
Definition: LArNoisyROSummaryCnv.cxx:16
LArNoisyROSummaryCnv_p2
Definition: LArNoisyROSummaryCnv_p2.h:16
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:29
LArNoisyROSummaryCnv_p2.h
LArNoisyROSummary
Summary information for noisy LAr preamp / FEBs.
Definition: LArNoisyROSummary.h:28
LArNoisyROSummaryCnv::m_converter
LArNoisyROSummaryCnv_p6 m_converter
Definition: LArNoisyROSummaryCnv.h:26
LArNoisyROSummaryCnv_p1
Definition: LArNoisyROSummaryCnv_p1.h:16