ATLAS Offline Software
DetElementSurfaceCnv_p1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "Identifier/Identifier.h"
7 #include "GaudiKernel/MsgStream.h"
8 
9 
11 {
12  //transObj->m_id = persObj->m_id;
13  //std::cout<<"DetElementSurfaceCnv_p1::createTransient persObj->m_id:"<<persObj->m_id<<std::endl;
14 
15  m_id = persObj->m_id; // store Id, and then use in createSurface
16  return nullptr;
17 }
18 
20 {
21  //transObj->m_id = persObj->m_id;
22  //std::cout<<"DetElementSurfaceCnv_p1::createSurface for m_id"<<m_id<<std::endl;
23  // use tool to get detector element's surface
24  return m_eventCnvTool->getSurface(m_id);
25 }
26 
28 {
29  // NOT USED - but need to have something here to fufill interface.
30 
31  // std::cout<<"DetElementSurfaceCnv_p1::persToTrans"<<std::endl;
32  // transObj = new Trk::DetElementSurface( createTransient( persObj, log ) );
33 }
34 
36 {
37  //std::cout<<"DetElementSurfaceCnv_p1::transToPers: id = "<<transObj->associatedDetectorElementIdentifier()<<std::endl;
38  // persObj->m_id = transObj->associatedDetectorElementIdentifier();
39  //persObj->m_id = transObj->associatedDetectorElementIdentifier().get_compact();
41 }
DetElementSurfaceCnv_p1::createSurface
const Trk::Surface * createSurface(MsgStream &log)
Definition: DetElementSurfaceCnv_p1.cxx:19
Trk::DetElementSurface::associatedDetectorElementIdentifier
const Identifier associatedDetectorElementIdentifier() const
Definition: DetElementSurface.h:50
Identifier::get_identifier32
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
DetElementSurfaceCnv_p1::transToPers
virtual void transToPers(const Trk::DetElementSurface *transObj, Trk::DetElementSurface_p1 *persObj, MsgStream &log)
Definition: DetElementSurfaceCnv_p1.cxx:35
Trk::DetElementSurface_p1
Definition: DetElementSurface_p1.h:18
Identifier32::get_compact
value_type get_compact() const
Get the compact id.
Definition: Identifier32.h:44
Trk::DetElementSurface_p1::m_id
Identifier32::value_type m_id
Definition: DetElementSurface_p1.h:22
DetElementSurfaceCnv_p1::persToTrans
virtual void persToTrans(const Trk::DetElementSurface_p1 *persObj, Trk::DetElementSurface *transObj, MsgStream &log)
Definition: DetElementSurfaceCnv_p1.cxx:27
DetElementSurfaceCnv_p1::createTransient
virtual Trk::DetElementSurface * createTransient(const Trk::DetElementSurface_p1 *persObj, MsgStream &log)
Definition: DetElementSurfaceCnv_p1.cxx:10
Trk::DetElementSurface
Definition: DetElementSurface.h:32
DetElementSurfaceCnv_p1::m_id
Identifier m_id
Used in a horrible hack, in createSurface()
Definition: DetElementSurfaceCnv_p1.h:56
DetElementSurfaceCnv_p1::m_eventCnvTool
ToolHandle< Trk::IEventCnvSuperTool > m_eventCnvTool
Definition: DetElementSurfaceCnv_p1.h:55
DetElementSurfaceCnv_p1.h
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75