ATLAS Offline Software
Loading...
Searching...
No Matches
sTGCSimHitCollectionCnv.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// Gaudi
8#include "GaudiKernel/StatusCode.h"
9#include "GaudiKernel/MsgStream.h"
10
11// Athena
13
19#include "HitManagement/AthenaHitsVector.h" //for back-compatibility
20
21
26
28
30 MsgStream log(msgSvc(), "sTGCSimHitCollectionCnv" );
31 ATH_MSG_DEBUG("createPersistent(): main converter");
32 sTGCSimHitCollection_PERS *pixdc_p= m_TPConverter_p3.createPersistent( transCont, log );
33 return pixdc_p;
34}
35
37 MsgStream log(msgSvc(), "sTGCSimHitCollectionCnv" );
38 static const pool::Guid p1_guid("F8B975D2-8130-11E8-ABF4-4B4A6A2B6EE5");
39 static const pool::Guid p2_guid("B9521CC6-6E3B-11E8-ADBB-02163E01BDDD");
40 static const pool::Guid p3_guid("8F3FFD1C-C9A0-4DA7-B99E-A3828B6AC789");
41 static const pool::Guid p4_guid("018E2DAC-18EB-79C4-B562-FD7C035C92C1");
42
43 ATH_MSG_DEBUG("createTransient(): main converter");
44 sTGCSimHitCollection* p_collection(nullptr);
45 if( compareClassGuid(p4_guid) ) {
46 ATH_MSG_DEBUG("createTransient(): T/P version 4 detected");
47 std::unique_ptr< Muon::sTGCSimHitCollection_p4 > col_vect( this->poolReadObject< Muon::sTGCSimHitCollection_p4 >() );
48 p_collection = m_TPConverter_p4.createTransient( col_vect.get(), log );
49 } else if( compareClassGuid(p3_guid) ) {
50 ATH_MSG_DEBUG("createTransient(): T/P version 3 detected");
51 std::unique_ptr< Muon::sTGCSimHitCollection_p3 > col_vect( this->poolReadObject< Muon::sTGCSimHitCollection_p3 >() );
52 p_collection = m_TPConverter_p3.createTransient( col_vect.get(), log );
53 } else if( compareClassGuid(p2_guid) ) {
54 ATH_MSG_DEBUG("createTransient(): T/P version 2 detected");
55 std::unique_ptr< Muon::sTGCSimHitCollection_p2 > col_vect( this->poolReadObject< Muon::sTGCSimHitCollection_p2 >() );
56 p_collection = m_TPConverter_p2.createTransient( col_vect.get(), log );
57 } else if( compareClassGuid(p1_guid) ) {
58 ATH_MSG_DEBUG("createTransient(): T/P version 1 detected");
59 std::unique_ptr< Muon::sTGCSimHitCollection_p1 > col_vect( this->poolReadObject< Muon::sTGCSimHitCollection_p1 >() );
60 p_collection = m_TPConverter_p1.createTransient( col_vect.get(), log );
61 }
62 //----------------------------------------------------------------
63 else {
64 throw std::runtime_error("Unsupported persistent version of sTGCSimHitCollection");
65
66 }
67 return p_collection;
68}
#define ATH_MSG_DEBUG(x)
virtual sTGCSimHitCollection_PERS * createPersistent(sTGCSimHitCollection *transCont)
sTGCSimHitCollectionCnv_p4 m_TPConverter_p4
virtual sTGCSimHitCollection * createTransient()
sTGCSimHitCollectionCnv_p2 m_TPConverter_p2
sTGCSimHitCollectionCnv_p3 m_TPConverter_p3
virtual ~sTGCSimHitCollectionCnv()
sTGCSimHitCollectionCnv(ISvcLocator *svcloc)
sTGCSimHitCollectionCnv_p1 m_TPConverter_p1
Muon::sTGCSimHitCollection_p3 sTGCSimHitCollection_PERS
T_AthenaPoolCustomCnv< sTGCSimHitCollection, sTGCSimHitCollection_PERS > sTGCSimHitCollectionCnvBase
AtlasHitsVector< sTGCSimHit > sTGCSimHitCollection