Project
Loading...
Searching...
No Matches
GPUReconstructionConvert.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
14
15#ifndef GPURECONSTRUCTIONCONVERT_H
16#define GPURECONSTRUCTIONCONVERT_H
17
18#include <memory>
19#include <functional>
20#include <vector>
21#include "GPUDef.h"
23
24namespace o2
25{
26struct InteractionRecord;
27namespace tpc
28{
29struct ClusterNative;
30struct ClusterNativeAccess;
31class Digit;
32} // namespace tpc
33namespace raw
34{
35class RawFileWriter;
36} // namespace raw
37} // namespace o2
38
40
41namespace o2::gpu
42{
43struct GPUParam;
44struct GPUTPCClusterData;
45class TPCFastTransformPOD;
46struct GPUTrackingInOutDigits;
47struct GPUTrackingInOutZS;
48
50{
51 public:
52 constexpr static uint32_t NSECTORS = o2::tpc::constants::MAXSECTOR;
53 static void ConvertNativeToClusterData(o2::tpc::ClusterNativeAccess* native, std::unique_ptr<GPUTPCClusterData[]>* clusters, uint32_t* nClusters, const TPCFastTransformPOD* transform, int32_t continuousMaxTimeBin = 0);
54 static void ConvertRun2RawToNative(o2::tpc::ClusterNativeAccess& native, std::unique_ptr<o2::tpc::ClusterNative[]>& nativeBuffer, const AliHLTTPCRawCluster** rawClusters, uint32_t* nRawClusters);
55 template <class S>
56 static void RunZSEncoder(const S& in, std::unique_ptr<uint64_t[]>* outBuffer, uint32_t* outSizes, o2::raw::RawFileWriter* raw, const o2::InteractionRecord* ir, const GPUParam& param, int32_t version, bool verify, float threshold = 0.f, bool padding = false, std::function<void(std::vector<o2::tpc::Digit>&)> digitsFilter = nullptr);
57 static void RunZSEncoderCreateMeta(const uint64_t* buffer, const uint32_t* sizes, void** ptrs, GPUTrackingInOutZS* out);
58 static void RunZSFilter(std::unique_ptr<o2::tpc::Digit[]>* buffers, const o2::tpc::Digit* const* ptrs, size_t* nsb, const size_t* ns, const GPUParam& param, bool zs12bit, float threshold);
59 static int32_t GetMaxTimeBin(const o2::tpc::ClusterNativeAccess& native);
60 static int32_t GetMaxTimeBin(const GPUTrackingInOutDigits& digits);
61 static int32_t GetMaxTimeBin(const GPUTrackingInOutZS& zspages);
62 static std::function<void(std::vector<o2::tpc::Digit>&, const void*, uint32_t, uint32_t)> GetDecoder(int32_t version, const GPUParam* param);
63};
64
65} // namespace o2::gpu
66
67#endif
uint16_t padding
o2::raw::RawFileWriter * raw
uint32_t version
Definition RawData.h:8
int nClusters
static void RunZSEncoder(const S &in, std::unique_ptr< uint64_t[]> *outBuffer, uint32_t *outSizes, o2::raw::RawFileWriter *raw, const o2::InteractionRecord *ir, const GPUParam &param, int32_t version, bool verify, float threshold=0.f, bool padding=false, std::function< void(std::vector< o2::tpc::Digit > &)> digitsFilter=nullptr)
static std::function< void(std::vector< o2::tpc::Digit > &, const void *, uint32_t, uint32_t)> GetDecoder(int32_t version, const GPUParam *param)
static void RunZSFilter(std::unique_ptr< o2::tpc::Digit[]> *buffers, const o2::tpc::Digit *const *ptrs, size_t *nsb, const size_t *ns, const GPUParam &param, bool zs12bit, float threshold)
static int32_t GetMaxTimeBin(const o2::tpc::ClusterNativeAccess &native)
static void RunZSEncoderCreateMeta(const uint64_t *buffer, const uint32_t *sizes, void **ptrs, GPUTrackingInOutZS *out)
static void ConvertRun2RawToNative(o2::tpc::ClusterNativeAccess &native, std::unique_ptr< o2::tpc::ClusterNative[]> &nativeBuffer, const AliHLTTPCRawCluster **rawClusters, uint32_t *nRawClusters)
static void ConvertNativeToClusterData(o2::tpc::ClusterNativeAccess *native, std::unique_ptr< GPUTPCClusterData[]> *clusters, uint32_t *nClusters, const TPCFastTransformPOD *transform, int32_t continuousMaxTimeBin=0)
GLuint buffer
Definition glcorearb.h:655
GLuint GLsizei const GLuint const GLintptr const GLsizeiptr * sizes
Definition glcorearb.h:2595
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLenum GLfloat param
Definition glcorearb.h:271
const GLuint * buffers
Definition glcorearb.h:656
o2::cpv::Digit Digit
constexpr int MAXSECTOR
Definition Constants.h:28
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
o2::InteractionRecord ir(0, 0)
std::vector< Cluster > clusters
std::vector< Digit > digits