ATLAS Offline Software
Loading...
Searching...
No Matches
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
24class CaloLVL1_ID;
25
26#include <vector>
27
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
std::vector< Identifier > ID
Helper class for offline TT identifiers.
Definition CaloLVL1_ID.h:66
int operator()(const ID &id) const
Convert ID to int.
static const int m_table_size
lookup table
int m_lookup[m_table_size]
int m_size
total number of IDs
virtual ~TileTTL1Hash()
ID identifier(int i) const
reverse conversion
int max() const
return maximum number of IDs
std::vector< ID > m_int2id
void initialize()