Project
Loading...
Searching...
No Matches
VertexerTraits.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.
15
16#ifndef O2_ITS_TRACKING_VERTEXER_TRAITS_H_
17#define O2_ITS_TRACKING_VERTEXER_TRAITS_H_
18
19#include <array>
20#include <memory>
21#include <string>
22#include <vector>
23
25#include "ITStracking/Cluster.h"
33
34#include "GPUCommonDef.h"
35#include "GPUCommonMath.h"
36
37#include <oneapi/tbb/task_arena.h>
38
39namespace o2
40{
41class MCCompLabel;
42
43namespace its
44{
45
46template <int NLayers>
48{
51
52 public:
53 VertexerTraits() = default;
54 virtual ~VertexerTraits() = default;
55
56 // virtual vertexer interface
57 virtual void initialise(const TrackingParameters& trackingParams);
58 virtual void computeTracklets(const int iteration);
59 virtual void computeTrackletMatching(const int iteration);
60 virtual void computeVertices(const int iteration);
61 virtual void adoptTimeFrame(TimeFrameN* tf) noexcept { mTimeFrame = tf; }
62 virtual void updateVertexingParameters(const std::vector<VertexingParameters>& vrtPar);
63
64 // truth tracking
66
67 // utils
69 auto getVertexingParameters() const { return mVrtParams; }
70 void setVertexingParameters(std::vector<VertexingParameters>& vertParams) { mVrtParams = vertParams; }
71 void setNThreads(int n, std::shared_ptr<tbb::task_arena>& arena);
72 int getNThreads() { return mTaskArena->max_concurrency(); }
73 virtual bool isGPU() const noexcept { return false; }
74 virtual const char* getName() const noexcept { return "CPU"; }
75 virtual bool usesMemoryPool() const noexcept { return true; }
76 void setMemoryPool(std::shared_ptr<BoundedMemoryResource> pool) { mMemoryPool = pool; }
77
78 protected:
79 std::vector<VertexingParameters> mVrtParams;
81
82 // Frame related quantities
83 TimeFrameN* mTimeFrame = nullptr; // observer ptr
84 private:
85 bool skipROF(int iteration, int rof) const;
86
87 std::shared_ptr<BoundedMemoryResource> mMemoryPool;
88 std::shared_ptr<tbb::task_arena> mTaskArena;
89};
90
91} // namespace its
92} // namespace o2
93#endif
void setNThreads(int n, std::shared_ptr< tbb::task_arena > &arena)
auto getVertexingParameters() const
virtual void computeVertices(const int iteration)
virtual ~VertexerTraits()=default
IndexTableUtilsN mIndexTableUtils
virtual void initialise(const TrackingParameters &trackingParams)
std::vector< VertexingParameters > mVrtParams
void setVertexingParameters(std::vector< VertexingParameters > &vertParams)
virtual void updateVertexingParameters(const std::vector< VertexingParameters > &vrtPar)
virtual void computeTrackletMatching(const int iteration)
virtual bool usesMemoryPool() const noexcept
virtual void computeTracklets(const int iteration)
virtual bool isGPU() const noexcept
virtual const char * getName() const noexcept
void setMemoryPool(std::shared_ptr< BoundedMemoryResource > pool)
virtual void adoptTimeFrame(TimeFrameN *tf) noexcept
GLdouble n
Definition glcorearb.h:1982
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::unique_ptr< GPUReconstructionTimeframe > tf