ATLAS Offline Software
Loading...
Searching...
No Matches
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
15class Identifier;
16class AtlasDetectorID;
17
18namespace Trk
19{
20 class ITrkEventCnvTool;
21 class Surface;
22 class RIO_OnTrack;
23
26class EventCnvSuperTool : public extends<AthAlgTool, IEventCnvSuperTool>
27 {
28 public:
29
30 using base_class::base_class;
31
32 virtual ~EventCnvSuperTool ();
33
34 virtual StatusCode initialize() override;
35
36 virtual StatusCode finalize() override;
37
38 virtual const Trk::ITrkEventCnvTool* getCnvTool(const Identifier& id) const override;
39
41 virtual const Trk::Surface* getSurface(const Identifier& id) const override;
42
44 virtual void recreateRIO_OnTrack( RIO_OnTrack *RoT ) const override;
45
47 virtual void prepareRIO_OnTrack( RIO_OnTrack* Rot) const override;
48
50 virtual void prepareRIO_OnTrackLink( const RIO_OnTrack* Rot,
51 ELKey_t& key,
52 ELIndex_t& index ) const override;
53
54 virtual bool canHandleInDet() const override { return m_haveIdCnvTool;}
55 virtual bool canHandleMuonSpectrometer() const override { return m_haveMuonCnvTool;}
56 virtual int maxNumberOfErrors() const override { return m_maxErrCount;}
57
58 virtual bool noGeometry() const override {return !(m_haveIdCnvTool&&m_haveMuonCnvTool);}
59
60 virtual bool doTrackOverlay() const override {return m_doTrackOverlay;}
61
62 private:
63 ToolHandle<Trk::ITrkEventCnvTool> m_idCnvTool {this, "IdCnvTool", "InDet::InDetEventCnvTool/InDetEventCnvTool", "Tool used to handle ID RoTs etc"};
64 ToolHandle<Trk::ITrkEventCnvTool> m_muonCnvTool {this, "MuonCnvTool", "Muon::MuonEventCnvTool/MuonEventCnvTool", "Tool used to handle Muon RoTs etc"};
65 const AtlasDetectorID* m_detID = nullptr; // atlas id helper
66
67 bool m_haveIdCnvTool = false;
68 bool m_haveMuonCnvTool = false;
69
70 Gaudi::Property<bool> m_doMuons{this, "DoMuons", true,
71 "If true (default), attempt to retrieve Muon helper tool and convert Muon objects."};
72 Gaudi::Property<bool> m_doID{this, "DoID", true,
73 "If true (default), attempt to retrieve Inner Detector helper tool and convert ID objects."};
74
75 Gaudi::Property<bool> m_doTrackOverlay{this, "DoTrackOverlay", false,
76 "If true, ID on-track conversion tools will look for background PRD collections"};
77
78 mutable std::atomic_int m_errCount = 0;
79 Gaudi::Property<int> m_maxErrCount{this, "MaxErrorCount", 10,
80 "Maximum number of errors that will be reported"};
81 };
82 }
83#endif
84
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Tool to handle TP conversions for Tracking EDM.
virtual const Trk::Surface * getSurface(const Identifier &id) const override
From passed Identifier.
ToolHandle< Trk::ITrkEventCnvTool > m_idCnvTool
Tool used to handle ID RoTs etc.
virtual bool doTrackOverlay() const override
virtual bool noGeometry() const override
bool m_haveIdCnvTool
Flag set in intialise, letting us know whether the tool has been found.
virtual bool canHandleInDet() const override
std::atomic_int m_errCount
Current number of ERROR/WARNING messages sent to output.
const AtlasDetectorID * m_detID
Gaudi::Property< bool > m_doTrackOverlay
virtual StatusCode initialize() override
Gaudi::Property< bool > m_doID
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.
Gaudi::Property< bool > m_doMuons
virtual bool canHandleMuonSpectrometer() const override
virtual void prepareRIO_OnTrack(RIO_OnTrack *Rot) const override
Take the passed RoT and prepare the PRD ElementLink for writing to disc.
virtual int maxNumberOfErrors() const override
ToolHandle< Trk::ITrkEventCnvTool > m_muonCnvTool
Tool used to handle Muon RoTs etc.
virtual StatusCode finalize() override
virtual void recreateRIO_OnTrack(RIO_OnTrack *RoT) const override
Take the passed RoT and recreate it (i.e.
Gaudi::Property< int > m_maxErrCount
virtual const Trk::ITrkEventCnvTool * getCnvTool(const Identifier &id) const override
bool m_haveMuonCnvTool
Flag set in intialise, letting us know whether the tool has been found.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
Definition RIO_OnTrack.h:70
Abstract Base Class for tracking surfaces.
Definition Surface.h:79
Ensure that the ATLAS eigen extensions are properly loaded.
Definition index.py:1