ATLAS Offline Software
CscStripPrepDataContainerCnv.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"
8 #include "GaudiKernel/MsgStream.h"
11 
13  CscStripPrepDataContainerCnvBase(svcloc, "CscStripPrepDataContainerCnv")
14 {
15 }
16 
18 
20  // Call base clase initialize
22 
23  return StatusCode::SUCCESS;
24 }
25 
28  return pixdc_p;
29 }
30 
32  static const pool::Guid p0_guid("A41C9D99-F977-43B5-8DFC-819F057A9136"); // before t/p split
33  static const pool::Guid p1_guid("6075244C-C6BB-4E24-B711-E7E4ED0F7462"); // with CscStripPrepData_tlp1
34 
35  Muon::CscStripPrepDataContainer* p_collection(nullptr);
36  if( compareClassGuid(p1_guid) ) {
37  std::unique_ptr< CscStripPrepDataContainer_PERS > p_coll( poolReadObject< CscStripPrepDataContainer_PERS >() );
38  p_collection = m_TPConverter.createTransient( p_coll.get(), msg() );
39  }
40 
41  else if( compareClassGuid(p0_guid) ) {
42  throw std::runtime_error("Not currently supporting reading non TP-split PRDs");
43  }
44  else {
45  throw std::runtime_error("Unsupported persistent version of CscStripPrepDataContainer");
46 
47  }
48  return p_collection;
49 }
Muon::MuonPrepDataContainer
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
Definition: MuonPrepDataContainer.h:42
CscStripPrepDataContainerCnv::m_TPConverter
CscStripPrepDataContainerCnv_tlp1 m_TPConverter
Definition: CscStripPrepDataContainerCnv.h:46
CscStripPrepDataContainer.h
CscStripPrepDataContainerCnv::CscStripPrepDataContainerCnv
CscStripPrepDataContainerCnv(ISvcLocator *svcloc)
Definition: CscStripPrepDataContainerCnv.cxx:12
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
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
CscStripPrepDataContainerCnv::~CscStripPrepDataContainerCnv
virtual ~CscStripPrepDataContainerCnv()
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CscStripPrepDataContainerCnv.h
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
CscStripPrepDataContainerCnv::createPersistent
virtual CscStripPrepDataContainer_PERS * createPersistent(Muon::CscStripPrepDataContainer *transCont)
Definition: CscStripPrepDataContainerCnv.cxx:26
CscStripPrepDataContainerCnv::initialize
virtual StatusCode initialize()
Gaudi Service Interface method implementations:
Definition: CscStripPrepDataContainerCnv.cxx:19
Muon::CscStripPrepDataContainer_tlp1
Definition: CscStripPrepDataContainer_tlp1.h:24
CscStripPrepDataContainerCnv::createTransient
virtual Muon::CscStripPrepDataContainer * createTransient()
Definition: CscStripPrepDataContainerCnv.cxx:31
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:
StoreGateSvc.h