ATLAS Offline Software
Loading...
Searching...
No Matches
TileRodIdHash.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#ifndef TILERECEVENT_TILERODIDHASH_H
6#define TILERECEVENT_TILERODIDHASH_H
7
8
9#include <vector>
10#include <map>
11
18
20
21 public:
22
23 typedef int ID;
25 virtual ~TileRodIdHash() { };
26
28 void initialize(int offset, int runnum );
29
31 void initialize (int offset, const std::vector<ID>& rmod );
32
34 int operator() (const ID& id) const ;
35
37 int max() const;
38
40 ID identifier(int i) const;
41
43 int offset() const ;
44
45 private:
47 int m_size; // total number of IDs
48
50
51 std::map<unsigned int, int> m_lookup ;
52
54 std::vector<ID> m_int2id;
55
57
58};
59
60#endif
61
std::vector< Identifier > ID
std::vector< ID > m_int2id
reverse look up
virtual ~TileRodIdHash()
int offset() const
return offset
int m_size
total number of IDs
std::map< unsigned int, int > m_lookup
test beam flag
int max() const
return maximum number of IDs
int operator()(const ID &id) const
Convert ID to int.
ID identifier(int i) const
reverse conversion
void initialize()