ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonRDO
MuonRDO
TgcL1RdoIdHash.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 MUONRDO_TGCL1RDOIDHASH_H
6
#define MUONRDO_TGCL1RDOIDHASH_H
7
8
#include <map>
9
#include <vector>
10
#include <inttypes.h>
11
12
/*
13
Hash function for TGC RDO Identifier
14
@author Tadashi Maeno
15
based on RpcPadIdHash by Ketevi A. Assamagan
16
*/
17
class
TgcL1RdoIdHash
18
{
19
public
:
20
21
typedef
uint16_t
ID
;
22
23
TgcL1RdoIdHash
();
24
virtual
~TgcL1RdoIdHash
() {}
25
27
int
operator()
(
const
ID
&
id
)
const
;
28
30
int
max
()
const
{
return
m_size
;}
31
33
ID
identifier
(
int
i)
const
;
34
36
uint16_t
subDetectorId
(
int
i)
const
;
37
uint16_t
rodId
(
int
i)
const
;
38
39
// return value definition
40
enum
{
INVALID_ID
= 0xFFFF};
41
42
private
:
44
int
m_size
;
45
48
std::map<ID,int>
m_lookup
;
49
52
std::vector<ID>
m_int2id
;
53
56
std::vector<uint16_t>
m_int2subDetectorId
;
57
std::vector<uint16_t>
m_int2rodId
;
58
};
59
60
#endif
61
TgcL1RdoIdHash::m_int2subDetectorId
std::vector< uint16_t > m_int2subDetectorId
reverse lookup for SubDetectorID and ROD ID
Definition
TgcL1RdoIdHash.h:56
TgcL1RdoIdHash::m_size
int m_size
total number of IDs
Definition
TgcL1RdoIdHash.h:44
TgcL1RdoIdHash::identifier
ID identifier(int i) const
reverse conversion
Definition
TgcL1RdoIdHash.cxx:31
TgcL1RdoIdHash::INVALID_ID
@ INVALID_ID
Definition
TgcL1RdoIdHash.h:40
TgcL1RdoIdHash::~TgcL1RdoIdHash
virtual ~TgcL1RdoIdHash()
Definition
TgcL1RdoIdHash.h:24
TgcL1RdoIdHash::subDetectorId
uint16_t subDetectorId(int i) const
reverse conversion for SubDetectorID and ROD ID
Definition
TgcL1RdoIdHash.cxx:42
TgcL1RdoIdHash::ID
uint16_t ID
Definition
TgcL1RdoIdHash.h:21
TgcL1RdoIdHash::m_int2rodId
std::vector< uint16_t > m_int2rodId
Definition
TgcL1RdoIdHash.h:57
TgcL1RdoIdHash::max
int max() const
return maximum number of IDs
Definition
TgcL1RdoIdHash.h:30
TgcL1RdoIdHash::TgcL1RdoIdHash
TgcL1RdoIdHash()
Definition
TgcL1RdoIdHash.cxx:9
TgcL1RdoIdHash::m_int2id
std::vector< ID > m_int2id
reverse lookup
Definition
TgcL1RdoIdHash.h:52
TgcL1RdoIdHash::operator()
int operator()(const ID &id) const
Convert ID to int.
Definition
TgcL1RdoIdHash.cxx:64
TgcL1RdoIdHash::m_lookup
std::map< ID, int > m_lookup
lookup table
Definition
TgcL1RdoIdHash.h:48
TgcL1RdoIdHash::rodId
uint16_t rodId(int i) const
reverse conversion : ROD ID
Definition
TgcL1RdoIdHash.cxx:53
Generated on
for ATLAS Offline Software by
1.17.0