ATLAS Offline Software
Loading...
Searching...
No Matches
sTgcRdoToPrepDataToolMT.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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
28
29namespace MuonGMR4{
31}
32
33namespace Muon
34{
38
39 class sTgcRdoToPrepDataToolMT : public extends<AthAlgTool, IMuonRdoToPrepDataTool>
40 {
41 public:
43 using base_class::base_class;
44
46 virtual ~sTgcRdoToPrepDataToolMT()=default;
47
49 virtual StatusCode initialize() override;
50
56
57 StatusCode decode(const EventContext& ctx, const std::vector<IdentifierHash>& idVect) const override;
58 StatusCode decode(const EventContext& ctx, const std::vector<uint32_t>& robIds) const override;
59 StatusCode provideEmptyContainer(const EventContext& ctx) const override;
60
61 protected:
108
109 StatusCode processCollection(const EventContext& ctx,
110 DataCache& xAODcontainers,
111 const STGC_RawDataCollection *rdoColl) const;
112
113 DataCache setupOutputContainers(const EventContext& ctx) const;
114
115 StatusCode processRDOContainer(const EventContext& ctx,
116 DataCache& xAODcontainers,
117 const std::vector<IdentifierHash>& idsToDecode) const;
118
119 SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> m_muDetMgrKey {this, "DetectorManagerKey", "MuonDetectorManager", "Key of input MuonDetectorManager condition data"};
120
121 ServiceHandle<IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "MuonIdHelperSvc/MuonIdHelperSvc"};
122
123
124 SG::ReadHandleKey<STGC_RawDataContainer> m_rdoContainerKey{this, "InputCollection", "sTGCRDO", "RDO container to read"};
125 PrdKey_t m_stgcPrepDataContainerKey{this, "OutputCollection", "STGC_Measurements", "sTgcPrepDataContainer to record"};
126 Gaudi::Property<bool> m_merge{this, "Merge", true}; // merge Prds
127
128 ToolHandle<ISTgcClusterBuilderTool> m_clusterBuilderTool{this,"ClusterBuilderTool","SimpleSTgcClusterBuilderTool/SimpleSTgcClusterBuilderTool"};
129 ToolHandle<INSWCalibTool> m_calibTool{this,"NSWCalibTool", ""};
130
132 SG::UpdateHandleKey<sTgcPrepDataCollection_Cache> m_prdContainerCacheKey{this, "PrdCacheKey", "", "Optional external cache for the sTGC PRD container"};
133
134 // xAOD output containers keys
135 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"};
136 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"};
137 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"};
138
139 Gaudi::Property<bool> m_useNewGeo{this, "UseR4DetMgr", false,
140 "Switch between the legacy and the new geometry"};
141
143
144
145 };
146} // end of namespace
147
148#endif // MUONTGC_CNVTOOLS_STGCRDOTOPREPDATATOOL_H
StatusCode provideEmptyContainer(const EventContext &ctx) const override
virtual ~sTgcRdoToPrepDataToolMT()=default
Destructor.
ToolHandle< INSWCalibTool > m_calibTool
ToolHandle< ISTgcClusterBuilderTool > m_clusterBuilderTool
StatusCode processRDOContainer(const EventContext &ctx, DataCache &xAODcontainers, const std::vector< IdentifierHash > &idsToDecode) const
SG::ReadHandleKey< STGC_RawDataContainer > m_rdoContainerKey
StatusCode processCollection(const EventContext &ctx, DataCache &xAODcontainers, const STGC_RawDataCollection *rdoColl) const
SG::WriteHandleKey< xAOD::sTgcWireContainer > m_xAODWireKey
SG::UpdateHandleKey< sTgcPrepDataCollection_Cache > m_prdContainerCacheKey
This is the key for the cache for the sTGC PRD containers, can be empty.
const MuonGMR4::MuonDetectorManager * m_detMgrR4
ServiceHandle< IMuonIdHelperSvc > m_idHelperSvc
SG::WriteHandleKey< xAOD::sTgcStripContainer > m_xAODStripKey
SG::WriteHandleKey< xAOD::sTgcPadContainer > m_xAODPadKey
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...
DataCache setupOutputContainers(const EventContext &ctx) const
SG::WriteHandleKey< sTgcPrepDataContainer > PrdKey_t
virtual StatusCode initialize() override
Standard AthAlgTool initialize method.
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_muDetMgrKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which an UpdateHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
MuonPrepDataCollection< sTgcPrepData > sTgcPrepDataCollection
sTgcPadAuxContainer_v1 sTgcPadAuxContainer
sTgcStripContainer_v1 sTgcStripContainer
sTgcWireContainer_v1 sTgcWireContainer
sTgcWireAuxContainer_v1 sTgcWireAuxContainer
sTgcStripAuxContainer_v1 sTgcStripAuxContainer
sTgcPadContainer_v1 sTgcPadContainer
Data cache to hold the translated prd & xAOD containers.
void translateAndSort(sTgcPrepDataCollection &coll)
Sort the prepdata collection by the Identifier of the objects contained and then translate the prd ob...
bool isValid
Flag indicating whether the container is valid.
std::vector< std::unique_ptr< sTgcPrepDataCollection > > collections
Prep data collections that will be appended to the container in store gate.
DataCache(const std::size_t hashMax, const PrdKey_t &key, const EventContext &ctx)
Constructor to instantiate the cache.
PadCont_t pads
Container to hold the translated xAOD pads.
DataCache(DataCache &&other)=default
Default move constructor.
const MuonGMR4::MuonDetectorManager * detMgr
Pointer to the R4 detector manager.
xAOD::FillContainer< xAOD::sTgcWireContainer, xAOD::sTgcWireAuxContainer > WireCont_t
xAOD::FillContainer< xAOD::sTgcStripContainer, xAOD::sTgcStripAuxContainer > StripCont_t
WireCont_t wires
Container to hold the translated xAOD wires.
~DataCache()
Overwrite the destructor to ensure that the xAOD containers are made.
StripCont_t strips
Container to hold the translated xAOD strips.
SG::WriteHandle< sTgcPrepDataContainer > prdWriteHandle
Instantiated WriteHandle.
xAOD::FillContainer< xAOD::sTgcPadContainer, xAOD::sTgcPadAuxContainer > PadCont_t
void translate(const sTgcPrepDataCollection &coll)
Translate the prd objects conained in the collection to xAOD objects.
DataCache & operator=(DataCache &&other)=default
Default move operator.