ATLAS Offline Software
Hid2RESrcID.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 LARBYTESTREAM_HID2RESRCID_H
6 #define LARBYTESTREAM_HID2RESRCID_H
7 
10 
11 
12 #include <stdint.h>
13 #include <map>
14 
17 
18 class LArFebRodMapping;
19 
20 
21 
22 // this class provides conversion between HWIdentifier and RESrcID
23 // HWIdentifier is used in LArRawChannel to identify each channel
24 // RESrcID is used for identifying each ROD.
25 //
26 // It also provides conversion from ROC RESrcID to a LArFEB_ID.
27 // LArFEB_ID is currently used as ID for LArRawChannelCollection.
28 // each Collection corresponds to a ROC.
29 //
30 
31 // Revision: July 11, 2002
32 // Modified for the new RE source ID, to be used with eformat package.
33 
34 // Revision: Aug 11, 2006
35 // move code from constructor to initialize() method.
36 // only use the object after initialize() is called.
37 
38 class Hid2RESrcID {
39 
40 public:
41 
43 
46  Hid2RESrcID();
47 
48  StatusCode initialize (const LArFebRodMapping& rodMapping);
49 
50  bool isInitialized() const { return m_initialized;}
51 
54  uint32_t getRodID (const LArFebRodMapping& rodMapping,
55  const HWIdentifier& hid) const;
56 
59  uint32_t getRodIDFromROM (const COLLECTION_ID& hid) const;
60 
63  uint32_t getRobID ( uint32_t rod_id) const;
64 
67  uint32_t getRosID ( uint32_t rob_id) const;
68 
71  uint32_t getDetID ( uint32_t ros_id) const;
72 
73 private:
74  StatusCode initialize (const std::vector<HWIdentifier>& roms);
75 
78  typedef std::map<HWIdentifier, uint32_t> COLL_MAP ;
82 };
83 
84 #endif
LArFebRodMapping
Definition: LArFebRodMapping.h:17
Hid2RESrcID::getRobID
uint32_t getRobID(uint32_t rod_id) const
Make a ROB Source ID from a ROD source ID.
Definition: Hid2RESrcID.cxx:100
Hid2RESrcID::COLL_MAP
std::map< HWIdentifier, uint32_t > COLL_MAP
Definition: Hid2RESrcID.h:78
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
Hid2RESrcID::getRodID
uint32_t getRodID(const LArFebRodMapping &rodMapping, const HWIdentifier &hid) const
make a ROD SrcID for a HWIdentifier
Definition: Hid2RESrcID.cxx:88
Hid2RESrcID::m_initialized
bool m_initialized
Definition: Hid2RESrcID.h:76
RodRobIdMap
This implements just the ROD->ROB conversion part of Hid2RESrcID.
Definition: RodRobIdMap.h:26
HWIdentifier
Definition: HWIdentifier.h:13
LArReadoutModuleService.h
LArReadoutModuleService
Service for creating and interpreting LAr readout modules identifiers.
Definition: LArReadoutModuleService.h:20
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Hid2RESrcID::getRosID
uint32_t getRosID(uint32_t rob_id) const
Make a ROS Source ID from a ROB source ID.
Definition: Hid2RESrcID.cxx:108
Hid2RESrcID::initialize
StatusCode initialize(const LArFebRodMapping &rodMapping)
Definition: Hid2RESrcID.cxx:38
Hid2RESrcID::isInitialized
bool isInitialized() const
Definition: Hid2RESrcID.h:50
Hid2RESrcID
Definition: Hid2RESrcID.h:38
Hid2RESrcID::getRodIDFromROM
uint32_t getRodIDFromROM(const COLLECTION_ID &hid) const
make a ROD SrcID for a COLLECTION_ID
Definition: Hid2RESrcID.cxx:75
LArOnlineID
Definition: LArOnlineID.h:20
Hid2RESrcID::COLLECTION_ID
HWIdentifier COLLECTION_ID
Definition: Hid2RESrcID.h:42
Hid2RESrcID::m_coll2ROD
COLL_MAP m_coll2ROD
Definition: Hid2RESrcID.h:79
Hid2RESrcID::getDetID
uint32_t getDetID(uint32_t ros_id) const
Make a SubDetector ID from ROS source ID.
Definition: Hid2RESrcID.cxx:120
RodRobIdMap.h
ROD->ROB mapping part of Hid2RESrcID.
Hid2RESrcID::m_rodRobIdMap
RodRobIdMap m_rodRobIdMap
Definition: Hid2RESrcID.h:81
checker_macros.h
Define macros for attributes used to control the static checker.
Hid2RESrcID::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition: Hid2RESrcID.h:77
Hid2RESrcID::m_readoutModuleSvc
LArReadoutModuleService m_readoutModuleSvc
Definition: Hid2RESrcID.h:80
Hid2RESrcID::Hid2RESrcID
Hid2RESrcID()
constructor
Definition: Hid2RESrcID.cxx:31
LArOnlineID.h