ATLAS Offline Software
EventCnvSuperTool.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_EVENTCNVSUPERTOOL
6 #define TRKEVENTCNVTOOLS_EVENTCNVSUPERTOOL
7 
9 #include "GaudiKernel/ToolHandle.h"
12 
13 #include <atomic>
14 
15 class Identifier;
16 class AtlasDetectorID;
17 
18 namespace Trk
19 {
20  class ITrkEventCnvTool;
21  class Surface;
22  class RIO_OnTrack;
23 
26 class EventCnvSuperTool : public extends<AthAlgTool, IEventCnvSuperTool>
27  {
28  public:
29 
30  EventCnvSuperTool(const std::string& t,
31  const std::string& n,
32  const IInterface* p);
33 
34  virtual ~EventCnvSuperTool ();
35 
36  virtual StatusCode initialize() override;
37 
38  virtual StatusCode finalize() override;
39 
40  virtual const Trk::ITrkEventCnvTool* getCnvTool(const Identifier& id) const override;
41 
43  virtual const Trk::Surface* getSurface(const Identifier& id) const override;
44 
46  virtual void recreateRIO_OnTrack( RIO_OnTrack *RoT ) const override;
47 
49  virtual void prepareRIO_OnTrack( RIO_OnTrack* Rot) const override;
50 
52  virtual void prepareRIO_OnTrackLink( const RIO_OnTrack* Rot,
53  ELKey_t& key,
54  ELIndex_t& index ) const override;
55 
56  virtual bool canHandleInDet() const override { return m_haveIdCnvTool;}
57  virtual bool canHandleMuonSpectrometer() const override { return m_haveMuonCnvTool;}
58  virtual int maxNumberOfErrors() const override { return m_maxErrCount;}
59 
60  virtual bool noGeometry() const override {return !(m_haveIdCnvTool&&m_haveMuonCnvTool);}
61 
62  virtual bool doTrackOverlay() const override {return m_doTrackOverlay;}
63 
64  private:
65  ToolHandle<Trk::ITrkEventCnvTool> m_idCnvTool {this, "IdCnvTool", "InDet::InDetEventCnvTool/InDetEventCnvTool", "Tool used to handle ID RoTs etc"};
66  ToolHandle<Trk::ITrkEventCnvTool> m_muonCnvTool {this, "MuonCnvTool", "Muon::MuonEventCnvTool/MuonEventCnvTool", "Tool used to handle Muon RoTs etc"};
67  const AtlasDetectorID* m_detID; // atlas id helper
68 
71 
72  bool m_doMuons;
73  bool m_doID;
74 
76 
77  mutable std::atomic_int m_errCount;
79  };
80  }
81 #endif
82 
Trk::EventCnvSuperTool::finalize
virtual StatusCode finalize() override
Definition: EventCnvSuperTool.cxx:102
index
Definition: index.py:1
Trk::EventCnvSuperTool::m_doMuons
bool m_doMuons
Property deciding whether to attempt Muon conversions.
Definition: EventCnvSuperTool.h:72
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
Trk::EventCnvSuperTool::doTrackOverlay
virtual bool doTrackOverlay() const override
Definition: EventCnvSuperTool.h:62
Trk::EventCnvSuperTool::getCnvTool
virtual const Trk::ITrkEventCnvTool * getCnvTool(const Identifier &id) const override
Definition: EventCnvSuperTool.cxx:112
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::EventCnvSuperTool::EventCnvSuperTool
EventCnvSuperTool(const std::string &t, const std::string &n, const IInterface *p)
Definition: EventCnvSuperTool.cxx:16
Trk::EventCnvSuperTool::m_errCount
std::atomic_int m_errCount
Current number of ERROR/WARNING messages sent to output.
Definition: EventCnvSuperTool.h:77
Trk::EventCnvSuperTool::prepareRIO_OnTrackLink
virtual void prepareRIO_OnTrackLink(const RIO_OnTrack *Rot, ELKey_t &key, ELIndex_t &index) const override
Take the passed RoT and return the EL components to write to disc.
Definition: EventCnvSuperTool.cxx:192
IEventCnvSuperTool.h
Trk::EventCnvSuperTool::canHandleInDet
virtual bool canHandleInDet() const override
Definition: EventCnvSuperTool.h:56
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Trk::EventCnvSuperTool::m_haveIdCnvTool
bool m_haveIdCnvTool
Flag set in intialise, letting us know whether the tool has been found.
Definition: EventCnvSuperTool.h:69
Trk::EventCnvSuperTool::canHandleMuonSpectrometer
virtual bool canHandleMuonSpectrometer() const override
Definition: EventCnvSuperTool.h:57
Trk::EventCnvSuperTool::m_muonCnvTool
ToolHandle< Trk::ITrkEventCnvTool > m_muonCnvTool
Tool used to handle Muon RoTs etc.
Definition: EventCnvSuperTool.h:66
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
Trk::EventCnvSuperTool::prepareRIO_OnTrack
virtual void prepareRIO_OnTrack(RIO_OnTrack *Rot) const override
Take the passed RoT and prepare the PRD ElementLink for writing to disc.
Definition: EventCnvSuperTool.cxx:181
Trk::ITrkEventCnvTool
Definition: ITrkEventCnvTool.h:31
Trk::EventCnvSuperTool::m_detID
const AtlasDetectorID * m_detID
Definition: EventCnvSuperTool.h:67
Trk::EventCnvSuperTool::noGeometry
virtual bool noGeometry() const override
Definition: EventCnvSuperTool.h:60
Trk::EventCnvSuperTool::maxNumberOfErrors
virtual int maxNumberOfErrors() const override
Definition: EventCnvSuperTool.h:58
Trk::EventCnvSuperTool
Tool to handle TP conversions for Tracking EDM.
Definition: EventCnvSuperTool.h:27
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::EventCnvSuperTool::m_idCnvTool
ToolHandle< Trk::ITrkEventCnvTool > m_idCnvTool
Tool used to handle ID RoTs etc.
Definition: EventCnvSuperTool.h:65
Trk::EventCnvSuperTool::~EventCnvSuperTool
virtual ~EventCnvSuperTool()
Definition: EventCnvSuperTool.cxx:41
Trk::MeasurementBaseType::RIO_OnTrack
@ RIO_OnTrack
Definition: MeasurementBase.h:49
TPObjRef.h
Trk::EventCnvSuperTool::m_haveMuonCnvTool
bool m_haveMuonCnvTool
Flag set in intialise, letting us know whether the tool has been found.
Definition: EventCnvSuperTool.h:70
Trk::EventCnvSuperTool::initialize
virtual StatusCode initialize() override
Definition: EventCnvSuperTool.cxx:47
Trk::EventCnvSuperTool::getSurface
virtual const Trk::Surface * getSurface(const Identifier &id) const override
From passed Identifier.
Definition: EventCnvSuperTool.cxx:147
Trk::EventCnvSuperTool::m_doID
bool m_doID
Property deciding whether to attempt ID conversions.
Definition: EventCnvSuperTool.h:73
Trk::EventCnvSuperTool::recreateRIO_OnTrack
virtual void recreateRIO_OnTrack(RIO_OnTrack *RoT) const override
Take the passed RoT and recreate it (i.e.
Definition: EventCnvSuperTool.cxx:166
Trk::EventCnvSuperTool::m_doTrackOverlay
bool m_doTrackOverlay
Property for whether track overlay is being used, in which case different PRD containers are used by ...
Definition: EventCnvSuperTool.h:75
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
Trk::EventCnvSuperTool::m_maxErrCount
int m_maxErrCount
Maximum number of permissable ERROR/WARNING messages sent to output.
Definition: EventCnvSuperTool.h:78
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
Identifier
Definition: IdentifierFieldParser.cxx:14