ATLAS Offline Software
HGTD_ClusterContainerCnv.cxx
Go to the documentation of this file.
1 
11 #include "GaudiKernel/MsgStream.h"
12 
13 #include <memory>
14 
15 #include <iostream>
16 
18  : HGTD_ClusterContainerCnvBase(svcloc) {}
19 
21 
22  static const pool::Guid p1_guid(
23  "7B3D57D6-F590-4266-974D-A0807122DA5F"); // with HGTD_Cluster_p1
24  ATH_MSG_DEBUG("createTransient(): main converter");
25 
26  HGTD_ClusterContainer* p_collection(0);
27  if (compareClassGuid(p1_guid)) {
28  ATH_MSG_DEBUG("createTransient(): T/P version 1 detected");
29  std::unique_ptr<HGTD_ClusterContainer_p1> p_coll(
30  poolReadObject<HGTD_ClusterContainer_p1>());
31  p_collection = m_converter_p1.createTransient(p_coll.get(), msg());
32  } else {
33  throw std::runtime_error(
34  "Unsupported persistent version of PlanarClusterContainer");
35  }
36  return p_collection;
37 }
38 
40  HGTD_ClusterContainer* transCont) {
42  m_converter_p1.createPersistent(transCont, msg());
43 
44  return pldc_p;
45 }
HGTD_ClusterContainerCnv::createPersistent
virtual HGTD_ClusterContainer_PERS * createPersistent(HGTD_ClusterContainer *transCont) override
Definition: HGTD_ClusterContainerCnv.cxx:39
HGTD_ClusterContainerCnv::createTransient
virtual HGTD_ClusterContainer * createTransient() override
Definition: HGTD_ClusterContainerCnv.cxx:20
HGTD_ClusterContainerCnv.h
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration.
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
HGTD_ClusterContainerCnv::m_converter_p1
HGTD_ClusterContainerCnv_p1 m_converter_p1
Definition: HGTD_ClusterContainerCnv.h:45
HGTD_ClusterContainerCnv::HGTD_ClusterContainerCnv
HGTD_ClusterContainerCnv(ISvcLocator *svcloc)
Definition: HGTD_ClusterContainerCnv.cxx:17
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
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
HGTD_ClusterContainerCnv_p1::createTransient
virtual Trans_t * createTransient(const Pers_t *persistent_container, MsgStream &log)
Definition: HGTD_ClusterContainerCnv_p1.cxx:174
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
Trk::PrepRawDataContainer
Definition: PrepRawDataContainer.h:26
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
HGTD_ClusterContainer_p1
Definition: HGTD_ClusterContainer_p1.h:20