ATLAS Offline Software
Loading...
Searching...
No Matches
ITrkEventCnvTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRKEVENTCNVTOOLS_ITRKEVENTCNVTOOL
6#define TRKEVENTCNVTOOLS_ITRKEVENTCNVTOOL
7
8
9#include "GaudiKernel/IAlgTool.h"
10
11#include "AthLinks/ElementLink.h"
14
15#include "GaudiKernel/ServiceHandle.h"
16#include "GaudiKernel/IMessageSvc.h"
17#include "GaudiKernel/MsgStream.h"
18
19class Identifier;
20class IdentifierHash;
21
22namespace Trk
23{
24
26class PrepRawData;
27class RIO_OnTrack;
28
29
30class ITrkEventCnvTool : virtual public IAlgTool
31 {
32 public:
34 typedef std::string ELKey_t;
35 typedef unsigned int ELIndex_t;
36
38
39
41 m_storeGate ( "StoreGateSvc", "ITrkEventCnvTool" ),
42 m_msgSvc ( "MessageSvc", "ITrkEventCnvTool" )
43 {
44// m_log(&(*m_msgSvc), name() );
45 }
46
48 virtual void checkRoT( const Trk::RIO_OnTrack& rioOnTrack ) const =0;
49
54 virtual std::pair<const Trk::TrkDetElementBase*, const Trk::PrepRawData*>
55 getLinks( Trk::RIO_OnTrack& rioOnTrack ) const = 0;
56
58 template <class CONT, class ROT> void prepareRIO_OnTrackElementLink(ROT* rot) const;
59
61 template <class CONT, class ROT>
62 void prepareRIO_OnTrackElementLink(const ROT* rot,
63 ELKey_t& key,
64 ELIndex_t& index) const;
65
67 template <class CONT, class ROT> bool getHashAndIndex(const ROT* rot,
68 const SG::ReadHandleKey<CONT>& contName,
69 typename ElementLink<CONT>::index_type& hashAndIndex) const;
70
78 virtual void prepareRIO_OnTrack( Trk::RIO_OnTrack* rot) const =0;
79
82 virtual void prepareRIO_OnTrackLink( const Trk::RIO_OnTrack* rot,
83 ELKey_t& key,
84 ELIndex_t& index ) const =0;
85
87 virtual void recreateRIO_OnTrack( Trk::RIO_OnTrack *RoT ) const =0;
88
90 virtual const Trk::TrkDetElementBase* getDetectorElement(const Identifier& id, const IdentifierHash& idHash) const =0;
91
93 virtual const Trk::TrkDetElementBase* getDetectorElement(const Identifier& id) const =0;
94
95 virtual void setRoT_Values(std::pair<const Trk::TrkDetElementBase *, const Trk::PrepRawData *>& pair, Trk::RIO_OnTrack *RoT ) const;
96
97 private:
100};
101}
102
104
105#endif
106
Property holding a SG store/key/clid from which a ReadHandle is made.
This is a "hash" representation of an Identifier.
Property holding a SG store/key/clid from which a ReadHandle is made.
bool getHashAndIndex(const ROT *rot, const SG::ReadHandleKey< CONT > &contName, typename ElementLink< CONT >::index_type &hashAndIndex) const
This templated method will return the hashAndIndex of the passed RIO_OnTrack.
virtual const Trk::TrkDetElementBase * getDetectorElement(const Identifier &id) const =0
Returns the detectorElement associated with this Identifier.
virtual void checkRoT(const Trk::RIO_OnTrack &rioOnTrack) const =0
check the passed RIO_OnTrack to make sure it is correctly filled
virtual void prepareRIO_OnTrackLink(const Trk::RIO_OnTrack *rot, ELKey_t &key, ELIndex_t &index) const =0
Similar, but just return the EL components rather then changing ROT.
virtual const Trk::TrkDetElementBase * getDetectorElement(const Identifier &id, const IdentifierHash &idHash) const =0
Returns the detectorElement associated with this Identifier & Hash.
std::string ELKey_t
Key and index types used for an EL to IdentifiableContainer.
virtual std::pair< const Trk::TrkDetElementBase *, const Trk::PrepRawData * > getLinks(Trk::RIO_OnTrack &rioOnTrack) const =0
This method must use the passed RIO_OnTrack to recover pointers The PrepRawData pointer will only be ...
void prepareRIO_OnTrackElementLink(ROT *rot) const
This templated method will set the EL for the passed RIO_OnTrack.
virtual void prepareRIO_OnTrack(Trk::RIO_OnTrack *rot) const =0
Take the passed RoT and prepare the PRD ElementLink for writing to disk.
ServiceHandle< IMessageSvc > m_msgSvc
ServiceHandle< StoreGateSvc > m_storeGate
virtual void recreateRIO_OnTrack(Trk::RIO_OnTrack *RoT) const =0
Take the passed RoT and recreate it (i.e.
virtual void setRoT_Values(std::pair< const Trk::TrkDetElementBase *, const Trk::PrepRawData * > &pair, Trk::RIO_OnTrack *RoT) const
DeclareInterfaceID(ITrkEventCnvTool, 1, 0)
void prepareRIO_OnTrackElementLink(const ROT *rot, ELKey_t &key, ELIndex_t &index) const
This templated method will find EL components for the passed RIO_OnTrack.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
Definition RIO_OnTrack.h:70
This is the base class for all tracking detector elements with read-out relevant information.
STL class.
Ensure that the ATLAS eigen extensions are properly loaded.
Definition index.py:1