Project
Loading...
Searching...
No Matches
LookUp.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
20
21#ifndef ALICEO2_ITS3_LOOKUP_H
22#define ALICEO2_ITS3_LOOKUP_H
23
25
26namespace o2::its3
27{
28class LookUp
29{
30 public:
31 LookUp() = default;
32 LookUp(std::string fileName);
33 static int groupFinder(int nRow, int nCol);
34 int findGroupID(int nRow, int nCol, bool IB, const unsigned char patt[itsmft::ClusterPattern::MaxPatternBytes]) const;
35 int getTopologiesOverThreshold(bool IB) const { return (IB) ? mTopologiesOverThresholdIB : mTopologiesOverThresholdOB; }
36 void loadDictionary(std::string fileName);
37 void setDictionary(const TopologyDictionary* dict);
38 auto getDictionary() const { return mDictionary; }
39 bool isGroup(int id, bool IB) const { return mDictionary.isGroup(id, IB); }
40 int size(bool IB) const { return mDictionary.getSize(IB); }
41 auto getPattern(int id, bool IB) const { return mDictionary.getPattern(id, IB); }
42
43 private:
44 TopologyDictionary mDictionary;
45 int mTopologiesOverThresholdIB{0};
46 int mTopologiesOverThresholdOB{0};
47
48 ClassDefNV(LookUp, 3);
49};
50} // namespace o2::its3
51
52#endif
Definition of the BuildTopologyDictionary class for ITS3.
LookUp()=default
int getTopologiesOverThreshold(bool IB) const
Definition LookUp.h:35
bool isGroup(int id, bool IB) const
Definition LookUp.h:39
void loadDictionary(std::string fileName)
Definition LookUp.cxx:31
static int groupFinder(int nRow, int nCol)
Definition LookUp.cxx:47
auto getDictionary() const
Definition LookUp.h:38
int size(bool IB) const
Definition LookUp.h:40
void setDictionary(const TopologyDictionary *dict)
Definition LookUp.cxx:38
int findGroupID(int nRow, int nCol, bool IB, const unsigned char patt[itsmft::ClusterPattern::MaxPatternBytes]) const
Definition LookUp.cxx:66
auto getPattern(int id, bool IB) const
Definition LookUp.h:41
const itsmft::ClusterPattern & getPattern(int n, bool IB=true) const
Returns the pattern of the topology.
int getSize(bool IB) const
Returns the number of elements in the dicionary;.
bool isGroup(int n, bool IB=true) const
Returns true if the element corresponds to a group of rare topologies.
static constexpr int MaxPatternBytes