ATLAS Offline Software
TileFragHash.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 #ifndef TileFragHash_H
7 #define TileFragHash_H
8 
9 class TileHWID;
10 
11 #include <vector>
12 #include <string>
13 
24 class TileFragHash {
25 
26  public:
27 
28  typedef int ID;
29  TileFragHash ();
30  virtual ~TileFragHash() { };
31 
33  enum TYPE {Beam=255, Default=0, Digitizer=0,
37 
38  void initialize(const TileHWID * tileHWID, TYPE type=Default );
39 
41  int operator() (const ID& id) const { return hash(id); }
42 
44  int hash (const ID& id) const;
45 
47  ID identifier(int i) const;
48 
50  int max() const {return m_size;}
51 
53  int offset() const {return m_offset;}
54 
56  TYPE type() const {return m_type;}
57 
58 
60  static std::string typeToString (TYPE type);
61 
62 
63 private:
65  int m_size; // total number of IDs
66  int m_offset; // different offset for different types of collections
68 
70  static const int m_table_size = 0x500;
72 
73  std::vector<ID> m_int2id;
74 
75 };
76 
77 #endif
TileFragHash::m_lookup
int m_lookup[m_table_size]
Definition: TileFragHash.h:71
TileFragHash::m_offset
int m_offset
Definition: TileFragHash.h:66
TileFragHash::max
int max() const
return maximum number of IDs
Definition: TileFragHash.h:50
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
TileFragHash::operator()
int operator()(const ID &id) const
Convert ID to int.
Definition: TileFragHash.h:41
TileFragHash::m_table_size
static const int m_table_size
lookup table
Definition: TileFragHash.h:70
TileFragHash::FitFilter
@ FitFilter
Definition: TileFragHash.h:35
TileFragHash::TYPE
TYPE
initialize
Definition: TileFragHash.h:33
TileFragHash
Hash table for Tile fragments (==drawers ==collections in StoreGate)
Definition: TileFragHash.h:24
TileFragHash::Digitizer
@ Digitizer
Definition: TileFragHash.h:33
TileFragHash::m_int2id
std::vector< ID > m_int2id
Definition: TileFragHash.h:73
TileFragHash::OptFilterDsp
@ OptFilterDsp
Definition: TileFragHash.h:34
TileFragHash::OptFilterDspCompressed
@ OptFilterDspCompressed
Definition: TileFragHash.h:34
TileFragHash::hash
int hash(const ID &id) const
Convert ID to int (same as the converter, but easier to call from python)
Definition: TileFragHash.cxx:74
TileFragHash::TileFragHash
TileFragHash()
Definition: TileFragHash.cxx:15
TileFragHash::OptFilterOffline
@ OptFilterOffline
Definition: TileFragHash.h:34
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition: TileHWID.h:49
TileFragHash::typeToString
static std::string typeToString(TYPE type)
Printable representation of a type.
Definition: TileFragHash.cxx:85
lumiFormat.i
int i
Definition: lumiFormat.py:85
TileFragHash::~TileFragHash
virtual ~TileFragHash()
Definition: TileFragHash.h:30
TileFragHash::m_size
int m_size
total number of IDs
Definition: TileFragHash.h:65
TileFragHash::ID
int ID
Definition: TileFragHash.h:28
TileFragHash::initialize
void initialize(const TileHWID *tileHWID, TYPE type=Default)
Definition: TileFragHash.cxx:23
TileFragHash::Beam
@ Beam
Definition: TileFragHash.h:33
TileFragHash::offset
int offset() const
return offset
Definition: TileFragHash.h:53
TileFragHash::m_type
TYPE m_type
Definition: TileFragHash.h:67
TileFragHash::MF
@ MF
Definition: TileFragHash.h:35
TileFragHash::WienerFilterOffline
@ WienerFilterOffline
Definition: TileFragHash.h:36
TileFragHash::type
TYPE type() const
return hash type
Definition: TileFragHash.h:56
TileFragHash::FlatFilter
@ FlatFilter
Definition: TileFragHash.h:35
TileFragHash::ManyAmps
@ ManyAmps
Definition: TileFragHash.h:35
TileFragHash::FitFilterCool
@ FitFilterCool
Definition: TileFragHash.h:35
TileFragHash::identifier
ID identifier(int i) const
reverse conversion
Definition: TileFragHash.cxx:67
Default