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 
24 
25 namespace MuonGMR4{
26  class MuonDetectorManager;
27 }
28 
29 namespace Muon
30 {
35  class sTgcRdoToPrepDataToolMT : public extends<AthAlgTool, IMuonRdoToPrepDataTool>
36  {
37  public:
39  sTgcRdoToPrepDataToolMT(const std::string& t, const std::string& n, const IInterface* p);
40 
42  virtual ~sTgcRdoToPrepDataToolMT()=default;
43 
45  virtual StatusCode initialize() override;
46 
53  StatusCode decode(const EventContext& ctx, const std::vector<IdentifierHash>& idVect) const override;
54  StatusCode decode(const EventContext& ctx, const std::vector<uint32_t>& robIds) const override;
55  StatusCode provideEmptyContainer(const EventContext& ctx) const override;
56 
57  protected:
58  struct outputCache {
63  bool isValid{false};
64  };
65 
66  StatusCode processCollection(const EventContext& ctx,
67  outputCache& xAODcontainers,
68  const STGC_RawDataCollection *rdoColl) const;
69 
70  outputCache setupOutputContainers(const EventContext& ctx) const;
71  const STGC_RawDataContainer* getRdoContainer(const EventContext& ctx) const;
72 
73  void processRDOContainer(const EventContext& ctx,
74  outputCache& xAODcontainers,
75  const std::vector<IdentifierHash>& idsToDecode) const;
76 
77  SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> m_muDetMgrKey {this, "DetectorManagerKey", "MuonDetectorManager", "Key of input MuonDetectorManager condition data"};
78 
79  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
80 
81 
82  SG::ReadHandleKey<STGC_RawDataContainer> m_rdoContainerKey{this, "InputCollection", "sTGCRDO", "RDO container to read"};
83  SG::WriteHandleKey<sTgcPrepDataContainer> m_stgcPrepDataContainerKey{this, "OutputCollection", "STGC_Measurements", "Muon::sTgcPrepDataContainer to record"};
84  Gaudi::Property<bool> m_merge{this, "Merge", true}; // merge Prds
85 
86  ToolHandle<ISTgcClusterBuilderTool> m_clusterBuilderTool{this,"ClusterBuilderTool","Muon::SimpleSTgcClusterBuilderTool/SimpleSTgcClusterBuilderTool"};
87  ToolHandle<INSWCalibTool> m_calibTool{this,"NSWCalibTool", ""};
88 
90  SG::UpdateHandleKey<sTgcPrepDataCollection_Cache> m_prdContainerCacheKey{this, "PrdCacheKey", "", "Optional external cache for the sTGC PRD container"};
91 
92  // xAOD output containers keys
93  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"};
94  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"};
95  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"};
96 
97  Gaudi::Property<bool> m_useNewGeo{this, "UseR4DetMgr", false,
98  "Switch between the legacy and the new geometry"};
99 
101 
102 
103  };
104 } // end of namespace
105 
106 #endif // MUONTGC_CNVTOOLS_STGCRDOTOPREPDATATOOL_H
Muon::sTgcRdoToPrepDataToolMT::m_clusterBuilderTool
ToolHandle< ISTgcClusterBuilderTool > m_clusterBuilderTool
Definition: sTgcRdoToPrepDataToolMT.h:86
Muon::sTgcRdoToPrepDataToolMT::outputCache::pad
SG::WriteHandle< xAOD::sTgcPadContainer > pad
Definition: sTgcRdoToPrepDataToolMT.h:61
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:62
Muon::sTgcRdoToPrepDataToolMT::m_detMgrR4
const MuonGMR4::MuonDetectorManager * m_detMgrR4
Definition: sTgcRdoToPrepDataToolMT.h:100
Muon::sTgcRdoToPrepDataToolMT::sTgcRdoToPrepDataToolMT
sTgcRdoToPrepDataToolMT(const std::string &t, const std::string &n, const IInterface *p)
Constructor.
Definition: sTgcRdoToPrepDataToolMT.cxx:23
Muon::sTgcRdoToPrepDataToolMT::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: sTgcRdoToPrepDataToolMT.h:79
Muon::sTgcRdoToPrepDataToolMT::m_useNewGeo
Gaudi::Property< bool > m_useNewGeo
Definition: sTgcRdoToPrepDataToolMT.h:97
INSWCalibTool.h
Muon::sTgcRdoToPrepDataToolMT::outputCache::wire
SG::WriteHandle< xAOD::sTgcWireContainer > wire
Definition: sTgcRdoToPrepDataToolMT.h:60
Muon::STGC_RawDataContainer
Definition: STGC_RawDataContainer.h:18
Muon::sTgcRdoToPrepDataToolMT::m_merge
Gaudi::Property< bool > m_merge
Definition: sTgcRdoToPrepDataToolMT.h:84
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:59
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Muon::sTgcRdoToPrepDataToolMT::getRdoContainer
const STGC_RawDataContainer * getRdoContainer(const EventContext &ctx) const
Definition: sTgcRdoToPrepDataToolMT.cxx:292
sTgcPrepDataContainer.h
Muon::sTgcRdoToPrepDataToolMT::processCollection
StatusCode processCollection(const EventContext &ctx, outputCache &xAODcontainers, const STGC_RawDataCollection *rdoColl) const
Definition: sTgcRdoToPrepDataToolMT.cxx:51
STGC_RawDataContainer.h
sTgcWireContainer.h
Muon::sTgcRdoToPrepDataToolMT::setupOutputContainers
outputCache setupOutputContainers(const EventContext &ctx) const
Definition: sTgcRdoToPrepDataToolMT.cxx:358
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Muon::sTgcRdoToPrepDataToolMT::m_rdoContainerKey
SG::ReadHandleKey< STGC_RawDataContainer > m_rdoContainerKey
Definition: sTgcRdoToPrepDataToolMT.h:82
Muon::sTgcRdoToPrepDataToolMT::processRDOContainer
void processRDOContainer(const EventContext &ctx, outputCache &xAODcontainers, const std::vector< IdentifierHash > &idsToDecode) const
Definition: sTgcRdoToPrepDataToolMT.cxx:306
MuonGMR4
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
Definition: MdtCalibInput.h:20
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:63
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:77
AthAlgTool.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:90
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:335
ReadCondHandleKey.h
Muon::sTgcRdoToPrepDataToolMT::m_calibTool
ToolHandle< INSWCalibTool > m_calibTool
Definition: sTgcRdoToPrepDataToolMT.h:87
Muon::sTgcRdoToPrepDataToolMT::m_xAODPadKey
SG::WriteHandleKey< xAOD::sTgcPadContainer > m_xAODPadKey
Definition: sTgcRdoToPrepDataToolMT.h:94
Muon::sTgcRdoToPrepDataToolMT::m_stgcPrepDataContainerKey
SG::WriteHandleKey< sTgcPrepDataContainer > m_stgcPrepDataContainerKey
Definition: sTgcRdoToPrepDataToolMT.h:83
MuonDetectorManager.h
sTgcPadContainer.h
Muon::sTgcRdoToPrepDataToolMT::outputCache
Definition: sTgcRdoToPrepDataToolMT.h:58
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager >
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
Muon::sTgcRdoToPrepDataToolMT::outputCache::prd
SG::WriteHandle< Muon::sTgcPrepDataContainer > prd
Definition: sTgcRdoToPrepDataToolMT.h:62
Muon::sTgcRdoToPrepDataToolMT::initialize
virtual StatusCode initialize() override
Standard AthAlgTool initialize method.
Definition: sTgcRdoToPrepDataToolMT.cxx:28
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:95
Muon::sTgcRdoToPrepDataToolMT::m_xAODStripKey
SG::WriteHandleKey< xAOD::sTgcStripContainer > m_xAODStripKey
Definition: sTgcRdoToPrepDataToolMT.h:93
Muon::sTgcRdoToPrepDataToolMT
Definition: sTgcRdoToPrepDataToolMT.h:36
IMuonIdHelperSvc.h
Muon::sTgcRdoToPrepDataToolMT::provideEmptyContainer
StatusCode provideEmptyContainer(const EventContext &ctx) const override
Definition: sTgcRdoToPrepDataToolMT.cxx:352
ServiceHandle< Muon::IMuonIdHelperSvc >