ATLAS Offline Software
TgcCoinDataContainerCnv.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 /* Takashi Kubota - June 30, 2008 */
7 
8 // Gaudi
9 #include "GaudiKernel/StatusCode.h"
10 #include "GaudiKernel/MsgStream.h"
11 
12 // Athena
13 #include "StoreGate/StoreGateSvc.h"
14 
15 // Id includes
19 
20 
21 
23  TgcCoinDataContainerCnvBase(svcloc, "TgcCoinDataContainerCnv")
24 {
25 }
26 
28 
30  // Call base clase initialize
32 
33  return StatusCode::SUCCESS;
34 }
35 
38  return pixdc_p;
39 }
40 
42  static const pool::Guid p0_guid("F81C4564-B1C5-4053-A6F6-E0ED77907BE5"); // before t/p split
43  static const pool::Guid p1_guid("C312D3F5-60DB-41D5-895B-9FD4EF443E0B"); // with TgcCoinData_tlp1
44  static const pool::Guid p2_guid("524775D8-A66F-4AD3-912E-7D05389C1011"); // with TgcCoinData_tlp2
45  static const pool::Guid p3_guid("95BF89C7-1FFC-464F-A14D-742F9E874E56"); // with TgcCoinData_tlp3
46  Muon::TgcCoinDataContainer* p_collection(nullptr);
47  if( compareClassGuid(p3_guid) ) {
48  poolReadObject< TgcCoinDataContainer_PERS >( m_TPConverter_tlp3 );
49  p_collection = m_TPConverter_tlp3.createTransient( msg() );
50  }
51  else if( compareClassGuid(p2_guid) ) {
52  poolReadObject< TgcCoinDataContainer_PERS >( m_TPConverter_tlp2 );
53  p_collection = m_TPConverter_tlp2.createTransient( msg() );
54  }
55  else if( compareClassGuid(p1_guid) ) {
56  poolReadObject< Muon::TgcCoinDataContainer_tlp1 >( m_TPConverter_tlp1 );
57  p_collection = m_TPConverter_tlp1.createTransient( msg() );
58  }
59  else if( compareClassGuid(p0_guid) ) {
60  throw std::runtime_error("Not currently supporting reading non TP-split CoinDatas");
61  }
62  else {
63  throw std::runtime_error("Unsupported persistent version of TgcCoinDataContainer");
64 
65  }
66  return p_collection;
67 }
TgcCoinDataContainerCnv.h
TgcCoinDataContainerCnv::initialize
virtual StatusCode initialize()
Gaudi Service Interface method implementations:
Definition: TgcCoinDataContainerCnv.cxx:29
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
TgcCoinDataContainerCnv::createTransient
virtual Muon::TgcCoinDataContainer * createTransient()
Definition: TgcCoinDataContainerCnv.cxx:41
TopLevelTPConverter::createTransient
TRANS * createTransient(MsgStream &log)
Create transient representation of the persistent object known to this converter.
Definition: TopLevelTPConverter.h:62
T_AthenaPoolCustomCnv
Compatibility for old converter classes that don't get passed the key.
Definition: T_AthenaPoolCustomCnv.h:132
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TgcCoinDataContainerCnv::m_TPConverter_tlp1
TgcCoinDataContainerCnv_tlp1 m_TPConverter_tlp1
Definition: TgcCoinDataContainerCnv.h:48
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::TgcCoinDataContainer_tlp3
Definition: TgcCoinDataContainer_tlp3.h:23
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
TgcCoinDataContainer.h
Muon::MuonCoinDataContainer
Definition: MuonCoinDataContainer.h:32
TgcCoinDataContainerCnv::m_TPConverter_tlp3
TgcCoinDataContainerCnv_tlp3 m_TPConverter_tlp3
Definition: TgcCoinDataContainerCnv.h:50
TgcCoinDataContainerCnv::createPersistent
virtual TgcCoinDataContainer_PERS * createPersistent(Muon::TgcCoinDataContainer *transCont)
Definition: TgcCoinDataContainerCnv.cxx:36
TgcCoinDataContainerCnv::~TgcCoinDataContainerCnv
virtual ~TgcCoinDataContainerCnv()
TgcCoinDataContainerCnv::m_TPConverter_tlp2
TgcCoinDataContainerCnv_tlp2 m_TPConverter_tlp2
Definition: TgcCoinDataContainerCnv.h:49
TgcReadoutElement.h
TgcIdHelper.h
TopLevelTPConverter::createPersistent
virtual TL_PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of transObj.
Definition: TopLevelTPConverter.h:110
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
T_AthenaPoolCustCnv::initialize
virtual StatusCode initialize()
Gaudi Service Interface method implementations:
TgcCoinDataContainerCnv::TgcCoinDataContainerCnv
TgcCoinDataContainerCnv(ISvcLocator *svcloc)
Definition: TgcCoinDataContainerCnv.cxx:22
StoreGateSvc.h