ATLAS Offline Software
TileTTL1Hash.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //****************************************************************************
6 // Filename : TileTTL1Hash.h
7 // Author : jose.maneira@cern.ch
8 // Created : Nov 2005
9 //
10 // DESCRIPTION
11 //
12 // Provides hash (integer) conversion for TileTTL1 identifiers
13 //
14 // BUGS:
15 //
16 // History:
17 //
18 //
19 //****************************************************************************
20 
21 #ifndef TileTTL1Hash_H
22 #define TileTTL1Hash_H
23 
24 class CaloLVL1_ID;
25 
26 #include <vector>
27 
38 class TileTTL1Hash {
39 
40  public:
41 
42  typedef int ID;
43  TileTTL1Hash ();
44  virtual ~TileTTL1Hash() { };
45 
46  void initialize(const CaloLVL1_ID * caloLVL1_ID);
47 
49  int operator() (const ID& id) const ;
50 
52  ID identifier(int i) const;
53 
55  int max() const {return m_size;}
56 
57 
58  private:
60  int m_size; // total number of IDs
61 
63  static const int m_table_size = 7000;
65 
66  std::vector<ID> m_int2id;
67 
68 };
69 
70 #endif
TileTTL1Hash::ID
int ID
Definition: TileTTL1Hash.h:42
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
TileTTL1Hash::m_lookup
int m_lookup[m_table_size]
Definition: TileTTL1Hash.h:64
TileTTL1Hash::m_size
int m_size
total number of IDs
Definition: TileTTL1Hash.h:60
TileTTL1Hash::identifier
ID identifier(int i) const
reverse conversion
Definition: TileTTL1Hash.cxx:64
TileTTL1Hash::~TileTTL1Hash
virtual ~TileTTL1Hash()
Definition: TileTTL1Hash.h:44
TileTTL1Hash::initialize
void initialize(const CaloLVL1_ID *caloLVL1_ID)
Definition: TileTTL1Hash.cxx:37
TileTTL1Hash::TileTTL1Hash
TileTTL1Hash()
Definition: TileTTL1Hash.cxx:31
lumiFormat.i
int i
Definition: lumiFormat.py:92
CaloLVL1_ID
Helper class for offline TT identifiers.
Definition: CaloLVL1_ID.h:66
TileTTL1Hash::max
int max() const
return maximum number of IDs
Definition: TileTTL1Hash.h:55
TileTTL1Hash::m_int2id
std::vector< ID > m_int2id
Definition: TileTTL1Hash.h:66
TileTTL1Hash
Hash table for TileTTL1 identifiers
Definition: TileTTL1Hash.h:38
TileTTL1Hash::m_table_size
static const int m_table_size
lookup table
Definition: TileTTL1Hash.h:63
TileTTL1Hash::operator()
int operator()(const ID &id) const
Convert ID to int.
Definition: TileTTL1Hash.cxx:71