ATLAS Offline Software
sTgcRdoToPrepDataToolMT.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONTGC_CNVTOOLS_sTgcRdoToPrepDataToolMT
6 #define MUONTGC_CNVTOOLS_sTgcRdoToPrepDataToolMT
7 
10 #include "GaudiKernel/ServiceHandle.h"
11 #include "GaudiKernel/ToolHandle.h"
12 
25 
26 namespace Muon
27 {
32  class sTgcRdoToPrepDataToolMT : public extends<AthAlgTool, IMuonRdoToPrepDataTool>
33  {
34  public:
36  sTgcRdoToPrepDataToolMT(const std::string& t, const std::string& n, const IInterface* p);
37 
39  virtual ~sTgcRdoToPrepDataToolMT()=default;
40 
42  virtual StatusCode initialize() override;
43 
50  StatusCode decode(const EventContext& ctx, const std::vector<IdentifierHash>& idVect) const override;
51  StatusCode decode(const EventContext& ctx, const std::vector<uint32_t>& robIds) const override;
52  StatusCode provideEmptyContainer(const EventContext& ctx) const override;
53 
54  protected:
55  struct outputCache {
60  bool isValid{false};
61  };
62 
63  StatusCode processCollection(const EventContext& ctx,
64  outputCache& xAODcontainers,
65  const STGC_RawDataCollection *rdoColl) const;
66 
67  outputCache setupOutputContainers(const EventContext& ctx) const;
68  const STGC_RawDataContainer* getRdoContainer(const EventContext& ctx) const;
69 
70  void processRDOContainer(const EventContext& ctx,
71  outputCache& xAODcontainers,
72  const std::vector<IdentifierHash>& idsToDecode) const;
73 
74  SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> m_muDetMgrKey {this, "DetectorManagerKey", "MuonDetectorManager", "Key of input MuonDetectorManager condition data"};
75 
76  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
77 
78 
79  SG::ReadHandleKey<STGC_RawDataContainer> m_rdoContainerKey{this, "InputCollection", "sTGCRDO", "RDO container to read"};
80  SG::WriteHandleKey<sTgcPrepDataContainer> m_stgcPrepDataContainerKey{this, "OutputCollection", "STGC_Measurements", "Muon::sTgcPrepDataContainer to record"};
81  Gaudi::Property<bool> m_merge{this, "Merge", true}; // merge Prds
82 
83  ToolHandle<ISTgcClusterBuilderTool> m_clusterBuilderTool{this,"ClusterBuilderTool","Muon::SimpleSTgcClusterBuilderTool/SimpleSTgcClusterBuilderTool"};
84  ToolHandle<INSWCalibTool> m_calibTool{this,"NSWCalibTool", ""};
85 
87  SG::UpdateHandleKey<sTgcPrepDataCollection_Cache> m_prdContainerCacheKey{this, "PrdCacheKey", "", "Optional external cache for the sTGC PRD container"};
88 
89  // xAOD output containers keys
90  SG::WriteHandleKey<xAOD::sTgcStripContainer> m_xAODStripKey{this, "xAODStripKey", "", "If empty, do not produce xAOD, otherwise this is the key of the output xAOD MDT PRD container"};
91  SG::WriteHandleKey<xAOD::sTgcPadContainer> m_xAODPadKey{this, "xAODPadKey", "", "If empty, do not produce xAOD, otherwise this is the key of the output xAOD MDT PRD container"};
92  SG::WriteHandleKey<xAOD::sTgcWireContainer> m_xAODWireKey{this, "xAODWireKey", "", "If empty, do not produce xAOD, otherwise this is the key of the output xAOD MDT PRD container"};
93 
94  Gaudi::Property<bool> m_useNewGeo{this, "UseR4DetMgr", false,
95  "Switch between the legacy and the new geometry"};
96 
98 
99 
100  };
101 } // end of namespace
102 
103 #endif // MUONTGC_CNVTOOLS_STGCRDOTOPREPDATATOOL_H
Muon::sTgcRdoToPrepDataToolMT::m_clusterBuilderTool
ToolHandle< ISTgcClusterBuilderTool > m_clusterBuilderTool
Definition: sTgcRdoToPrepDataToolMT.h:83
Muon::sTgcRdoToPrepDataToolMT::outputCache::pad
SG::WriteHandle< xAOD::sTgcPadContainer > pad
Definition: sTgcRdoToPrepDataToolMT.h:58
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
MuonPrepDataCollection_Cache.h
SG::UpdateHandleKey
Property holding a SG store/key/clid from which an UpdateHandle is made.
Definition: UpdateHandleKey.h:40
MuonGMR4::MuonDetectorManager
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:61
Muon::sTgcRdoToPrepDataToolMT::m_detMgrR4
const MuonGMR4::MuonDetectorManager * m_detMgrR4
Definition: sTgcRdoToPrepDataToolMT.h:97
Muon::sTgcRdoToPrepDataToolMT::sTgcRdoToPrepDataToolMT
sTgcRdoToPrepDataToolMT(const std::string &t, const std::string &n, const IInterface *p)
Constructor.
Definition: sTgcRdoToPrepDataToolMT.cxx:22
Muon::sTgcRdoToPrepDataToolMT::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: sTgcRdoToPrepDataToolMT.h:76
Muon::sTgcRdoToPrepDataToolMT::m_useNewGeo
Gaudi::Property< bool > m_useNewGeo
Definition: sTgcRdoToPrepDataToolMT.h:94
INSWCalibTool.h
Muon::sTgcRdoToPrepDataToolMT::outputCache::wire
SG::WriteHandle< xAOD::sTgcWireContainer > wire
Definition: sTgcRdoToPrepDataToolMT.h:57
Muon::STGC_RawDataContainer
Definition: STGC_RawDataContainer.h:18
Muon::sTgcRdoToPrepDataToolMT::m_merge
Gaudi::Property< bool > m_merge
Definition: sTgcRdoToPrepDataToolMT.h:81
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
Muon::sTgcRdoToPrepDataToolMT::outputCache::strip
SG::WriteHandle< xAOD::sTgcStripContainer > strip
Definition: sTgcRdoToPrepDataToolMT.h:56
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
Muon::sTgcRdoToPrepDataToolMT::getRdoContainer
const STGC_RawDataContainer * getRdoContainer(const EventContext &ctx) const
Definition: sTgcRdoToPrepDataToolMT.cxx:291
sTgcPrepDataContainer.h
Muon::sTgcRdoToPrepDataToolMT::processCollection
StatusCode processCollection(const EventContext &ctx, outputCache &xAODcontainers, const STGC_RawDataCollection *rdoColl) const
Definition: sTgcRdoToPrepDataToolMT.cxx:50
STGC_RawDataContainer.h
sTgcWireContainer.h
Muon::sTgcRdoToPrepDataToolMT::setupOutputContainers
outputCache setupOutputContainers(const EventContext &ctx) const
Definition: sTgcRdoToPrepDataToolMT.cxx:357
Muon::sTgcRdoToPrepDataToolMT::m_rdoContainerKey
SG::ReadHandleKey< STGC_RawDataContainer > m_rdoContainerKey
Definition: sTgcRdoToPrepDataToolMT.h:79
Muon::sTgcRdoToPrepDataToolMT::processRDOContainer
void processRDOContainer(const EventContext &ctx, outputCache &xAODcontainers, const std::vector< IdentifierHash > &idsToDecode) const
Definition: sTgcRdoToPrepDataToolMT.cxx:305
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
IMuonRdoToPrepDataTool.h
beamspotman.n
n
Definition: beamspotman.py:731
Muon::sTgcRdoToPrepDataToolMT::outputCache::isValid
bool isValid
Definition: sTgcRdoToPrepDataToolMT.h:60
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Muon::sTgcRdoToPrepDataToolMT::~sTgcRdoToPrepDataToolMT
virtual ~sTgcRdoToPrepDataToolMT()=default
Destructor.
Muon::sTgcRdoToPrepDataToolMT::m_muDetMgrKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_muDetMgrKey
Definition: sTgcRdoToPrepDataToolMT.h:74
AthAlgTool.h
MuonDetectorManager.h
Muon::sTgcRdoToPrepDataToolMT::m_prdContainerCacheKey
SG::UpdateHandleKey< sTgcPrepDataCollection_Cache > m_prdContainerCacheKey
This is the key for the cache for the sTGC PRD containers, can be empty.
Definition: sTgcRdoToPrepDataToolMT.h:87
Muon::sTgcRdoToPrepDataToolMT::decode
StatusCode decode(const EventContext &ctx, const std::vector< IdentifierHash > &idVect) const override
Decode RDO to PRD A vector of IdentifierHash are passed in, and the data corresponding to this list...
Definition: sTgcRdoToPrepDataToolMT.cxx:334
ReadCondHandleKey.h
Muon::sTgcRdoToPrepDataToolMT::m_calibTool
ToolHandle< INSWCalibTool > m_calibTool
Definition: sTgcRdoToPrepDataToolMT.h:84
Muon::sTgcRdoToPrepDataToolMT::m_xAODPadKey
SG::WriteHandleKey< xAOD::sTgcPadContainer > m_xAODPadKey
Definition: sTgcRdoToPrepDataToolMT.h:91
Muon::sTgcRdoToPrepDataToolMT::m_stgcPrepDataContainerKey
SG::WriteHandleKey< sTgcPrepDataContainer > m_stgcPrepDataContainerKey
Definition: sTgcRdoToPrepDataToolMT.h:80
MuonDetectorManager.h
sTgcPadContainer.h
Muon::sTgcRdoToPrepDataToolMT::outputCache
Definition: sTgcRdoToPrepDataToolMT.h:55
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager >
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
Muon::sTgcRdoToPrepDataToolMT::outputCache::prd
SG::WriteHandle< Muon::sTgcPrepDataContainer > prd
Definition: sTgcRdoToPrepDataToolMT.h:59
Muon::sTgcRdoToPrepDataToolMT::initialize
virtual StatusCode initialize() override
Standard AthAlgTool initialize method.
Definition: sTgcRdoToPrepDataToolMT.cxx:27
ISTgcClusterBuilderTool.h
Muon::STGC_RawDataCollection
Definition: STGC_RawDataCollection.h:18
sTgcStripContainer.h
Muon::sTgcRdoToPrepDataToolMT::m_xAODWireKey
SG::WriteHandleKey< xAOD::sTgcWireContainer > m_xAODWireKey
Definition: sTgcRdoToPrepDataToolMT.h:92
Muon::sTgcRdoToPrepDataToolMT::m_xAODStripKey
SG::WriteHandleKey< xAOD::sTgcStripContainer > m_xAODStripKey
Definition: sTgcRdoToPrepDataToolMT.h:90
Muon::sTgcRdoToPrepDataToolMT
Definition: sTgcRdoToPrepDataToolMT.h:33
IMuonIdHelperSvc.h
Muon::sTgcRdoToPrepDataToolMT::provideEmptyContainer
StatusCode provideEmptyContainer(const EventContext &ctx) const override
Definition: sTgcRdoToPrepDataToolMT.cxx:351
ServiceHandle< Muon::IMuonIdHelperSvc >