ATLAS Offline Software
MdtROD_Decoder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONBYTESTREAM_MDTROD_DECODER_H
6 #define MUONBYTESTREAM_MDTROD_DECODER_H
7 
8 #include <cassert>
9 #include <map>
10 #include <string>
11 #include <vector>
12 
16 #include "GaudiKernel/ServiceHandle.h"
17 #include "MDT_Hid2RESrcID.h"
18 #include "MdtAmtReadOut.h"
19 #include "MdtCsmReadOut.h"
20 #include "MdtHptdcReadOut.h"
21 #include "MdtRODReadOut.h"
24 #include "MuonRDO/MdtAmtHit.h"
25 #include "MuonRDO/MdtCsm.h"
28 #include "eformat/SourceIdentifier.h"
29 #include "eformat/Version.h"
30 
31 class MdtROD_Decoder : public AthAlgTool {
32 public:
33  using leading_amt_map = std::map<uint16_t, std::unique_ptr<MdtAmtHit>>;
34 
37  MdtROD_Decoder(const std::string& type, const std::string& name, const IInterface* parent);
38 
41  virtual ~MdtROD_Decoder() = default;
42 
45  static const InterfaceID& interfaceID();
46 
47  virtual StatusCode initialize() override;
48  virtual StatusCode finalize() override;
49 
51  MDT_Hid2RESrcID* getHid2RE() const { return m_hid2re.get(); }
52 
54 
55  int specialROBNumber() const { return m_specialROBNumber; }
56 
57 private:
58  std::unique_ptr<MDT_Hid2RESrcID> m_hid2re{};
59  SG::ReadCondHandleKey<MuonMDT_CablingMap> m_readKey{this, "ReadKey", "MuonMDT_CablingMap", "Key of MuonMDT_CablingMap"};
60 
61  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
62 
65 
66  // variables to count how often the caching kicks in
67  // Mutable as this is just to count calls of const function
68  mutable std::atomic_uint m_nCache ATLAS_THREAD_SAFE = 0;
69  mutable std::atomic_uint m_nNotCache ATLAS_THREAD_SAFE = 0;
70 };
71 
72 #endif
MdtROD_Decoder::ATLAS_THREAD_SAFE
std::atomic_uint m_nCache ATLAS_THREAD_SAFE
Definition: MdtROD_Decoder.h:68
MdtROD_Decoder::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MdtROD_Decoder.h:61
MdtROD_Decoder::finalize
virtual StatusCode finalize() override
Definition: MdtROD_Decoder.cxx:41
MdtROD_Decoder::m_hid2re
std::unique_ptr< MDT_Hid2RESrcID > m_hid2re
Definition: MdtROD_Decoder.h:58
MdtCsmReadOut.h
MdtROD_Decoder::getHid2RE
MDT_Hid2RESrcID * getHid2RE() const
TODO Add documentation.
Definition: MdtROD_Decoder.h:51
MdtCsmContainer
This container provides acces to the MDT RDOs.
Definition: MdtCsmContainer.h:22
MdtCsmContainer.h
MdtROD_Decoder::m_readKey
SG::ReadCondHandleKey< MuonMDT_CablingMap > m_readKey
Definition: MdtROD_Decoder.h:59
MdtROD_Decoder::specialROBNumber
int specialROBNumber() const
Definition: MdtROD_Decoder.h:55
MdtROD_Decoder::interfaceID
static const InterfaceID & interfaceID()
AlgTool InterfaceID.
Definition: MdtROD_Decoder.cxx:28
eformat::ROBFragment
Definition: L1CaloBsDecoderUtil.h:12
MdtAmtReadOut.h
MuonMDT_CablingMap.h
RawEvent.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MdtROD_Decoder::~MdtROD_Decoder
virtual ~MdtROD_Decoder()=default
destructor
MdtROD_Decoder
Definition: MdtROD_Decoder.h:31
MdtROD_Decoder::MdtROD_Decoder
MdtROD_Decoder(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Definition: MdtROD_Decoder.cxx:21
MdtROD_Decoder::initialize
virtual StatusCode initialize() override
Definition: MdtROD_Decoder.cxx:30
ReadCondHandleKey.h
MdtAmtHit.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
MdtCsm.h
SG::ReadCondHandleKey< MuonMDT_CablingMap >
MDT_Hid2RESrcID.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MdtROD_Decoder::m_specialROBNumber
int m_specialROBNumber
TMP special ROB number for sector13 runs.
Definition: MdtROD_Decoder.h:64
AthAlgTool
Definition: AthAlgTool.h:26
checker_macros.h
Define macros for attributes used to control the static checker.
MDT_Hid2RESrcID
Definition: MDT_Hid2RESrcID.h:30
MdtROD_Decoder::fillCollections
StatusCode fillCollections(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment &robFrag, MdtCsmContainer &rdoIDC) const
Definition: MdtROD_Decoder.cxx:50
IMuonIdHelperSvc.h
MdtHptdcReadOut.h
ServiceHandle< Muon::IMuonIdHelperSvc >
MdtRODReadOut.h
MdtROD_Decoder::leading_amt_map
std::map< uint16_t, std::unique_ptr< MdtAmtHit > > leading_amt_map
Definition: MdtROD_Decoder.h:33