ATLAS Offline Software
Loading...
Searching...
No Matches
MdtCsmContainerCnv.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5/*
6 custom POOL converter for MDT CSM
7
8 @author Tadashi Maeno
9 based on SCT_RDO_ContainerCnv by RD Schaffer
10*/
11
12#ifndef MUONEVENTATHENAPOOL_MdtCsmContainerCnv_H
13#define MUONEVENTATHENAPOOL_MdtCsmContainerCnv_H
14
19
20
22
23template < >
24inline
27{
28 MsgStream log(msgSvc(), "MdtCsmContainerCnv" );
29 if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " **** Entered createTransient() "<< endmsg;
30
31 // the use of auto pointers ensures that the persistent object is deleted
32 // using the correct persistent type pointer
33
34 MdtCsmContainer *trans_cont = 0;
35 static const pool::Guid p1_guid("66D77835-5290-4C9A-842A-AF10F384FC93");
36 static const pool::Guid p0_guid("CFDA6FF6-557F-40CB-9C54-B5A7404A9175");
37
38 if( compareClassGuid(p1_guid) ) {
39 std::unique_ptr< MdtCsmContainer_p1 > col_vect( poolReadObject< MdtCsmContainer_p1 >() );
40 trans_cont = m_TPconverter.createTransient( col_vect.get(), log );
41 } else if(compareClassGuid(p0_guid) ) {
42 // old version from before TP separation
43 std::unique_ptr< COLL_vector > col_vect( this->poolReadObject< COLL_vector >() );
44 trans_cont = createTransientFrom_p0( col_vect.get(), log );
45 } else {
46 throw std::runtime_error("Unsupported persistent version of CSC RDO container");
47 }
48 return trans_cont;
49}
50
51
52#endif
#define endmsg
MuonRdoContainerTPCnv< MdtCsmContainer, MdtCsmContainer_p1, MdtCsmContainerCnv_p1 > MdtCsmContainerCnv
This container provides acces to the MDT RDOs.
virtual T * createTransientFrom_p0(COLL_vector *persObj, MsgStream &log)
virtual bool compareClassGuid(const Guid &clid) const