ATLAS Offline Software
Loading...
Searching...
No Matches
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
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
39
40public:
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
73private:
74 StatusCode initialize (const std::vector<HWIdentifier>& roms);
75
78 typedef std::map<HWIdentifier, uint32_t> COLL_MAP ;
82};
83
84#endif
ROD->ROB mapping part of Hid2RESrcID.
Define macros for attributes used to control the static checker.
uint32_t getRobID(uint32_t rod_id) const
Make a ROB Source ID from a ROD source ID.
HWIdentifier COLLECTION_ID
Definition Hid2RESrcID.h:42
LArReadoutModuleService m_readoutModuleSvc
Definition Hid2RESrcID.h:80
uint32_t getRodIDFromROM(const COLLECTION_ID &hid) const
make a ROD SrcID for a COLLECTION_ID
uint32_t getRodID(const LArFebRodMapping &rodMapping, const HWIdentifier &hid) const
make a ROD SrcID for a HWIdentifier
COLL_MAP m_coll2ROD
Definition Hid2RESrcID.h:79
Hid2RESrcID()
constructor
uint32_t getRosID(uint32_t rob_id) const
Make a ROS Source ID from a ROB source ID.
bool isInitialized() const
Definition Hid2RESrcID.h:50
const LArOnlineID * m_onlineHelper
Definition Hid2RESrcID.h:77
RodRobIdMap m_rodRobIdMap
Definition Hid2RESrcID.h:81
bool m_initialized
Definition Hid2RESrcID.h:76
uint32_t getDetID(uint32_t ros_id) const
Make a SubDetector ID from ROS source ID.
std::map< HWIdentifier, uint32_t > COLL_MAP
Definition Hid2RESrcID.h:78
Service for creating and interpreting LAr readout modules identifiers.
This implements just the ROD->ROB conversion part of Hid2RESrcID.
Definition RodRobIdMap.h:26
void initialize()