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
22
23#ifndef ALICEO2_ITSMFT_LOOKUP_H
24#define ALICEO2_ITSMFT_LOOKUP_H
25#include <array>
28
29namespace o2
30{
31namespace itsmft
32{
33class LookUp
34{
35 public:
36 LookUp();
37 LookUp(std::string fileName);
38 static int groupFinder(int nRow, int nCol);
39 int findGroupID(int nRow, int nCol, const unsigned char patt[ClusterPattern::MaxPatternBytes]) const;
40 int getTopologiesOverThreshold() const { return mTopologiesOverThreshold; }
41 void loadDictionary(std::string fileName);
42 void setDictionary(const TopologyDictionary* dict);
43 bool isGroup(int id) const { return mDictionary.isGroup(id); }
44 int size() const { return mDictionary.getSize(); }
45 auto getPattern(int id) const { return mDictionary.getPattern(id); }
46 auto getDictionaty() const { return mDictionary; }
47
48 private:
49 TopologyDictionary mDictionary;
50 int mTopologiesOverThreshold;
51
52 ClassDefNV(LookUp, 3);
53};
54} // namespace itsmft
55} // namespace o2
56
57#endif
Definition of the ClusterTopology class.
Definition of the ClusterTopology class.
static constexpr int MaxPatternBytes
int size() const
Definition LookUp.h:44
int getTopologiesOverThreshold() const
Definition LookUp.h:40
auto getDictionaty() const
Definition LookUp.h:46
void setDictionary(const TopologyDictionary *dict)
Definition LookUp.cxx:42
auto getPattern(int id) const
Definition LookUp.h:45
int findGroupID(int nRow, int nCol, const unsigned char patt[ClusterPattern::MaxPatternBytes]) const
Definition LookUp.cxx:69
static int groupFinder(int nRow, int nCol)
Definition LookUp.cxx:50
bool isGroup(int id) const
Definition LookUp.h:43
void loadDictionary(std::string fileName)
Definition LookUp.cxx:36
int getSize() const
Returns the number of elements in the dicionary;.
const ClusterPattern & getPattern(int n) const
Returns the pattern of the topology.
bool isGroup(int n) const
Returns true if the element corresponds to a group of rare topologies.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...