ATLAS Offline Software
Loading...
Searching...
No Matches
MdtCsmIdHash.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONDIGITCONATINER_MDTCSMIDHASH_H
6#define MUONDIGITCONATINER_MDTCSMIDHASH_H
7
8#include "Identifier/Identifier.h"
9#include <map>
10#include <vector>
11
12
19
20 public:
21
22 typedef Identifier ID;
23
24 MdtCsmIdHash ();
25 virtual ~MdtCsmIdHash() { };
26
27
29 int operator() (const ID& id) const ;
30
32 int max() const;
33
35 ID identifier(int i) const;
36
38 static int offset() ;
39
40 private:
42 int m_size; // total number of IDs
43
46 std::map<Identifier,int> m_lookup;
47
50 std::vector<ID> m_int2id;
51
52};
53
54#endif
55
std::vector< Identifier > ID
Identifier ID
std::map< Identifier, int > m_lookup
lookup table
int m_size
total number of IDs
virtual ~MdtCsmIdHash()
static int offset()
return offset
std::vector< ID > m_int2id
reverse lookup
int operator()(const ID &id) const
Convert ID to int.
int max() const
return maximum number of IDs
ID identifier(int i) const
reverse conversion