-
Notifications
You must be signed in to change notification settings - Fork 508
Expand file tree
/
Copy pathGPUReconstructionConvert.h
More file actions
66 lines (57 loc) · 2.5 KB
/
Copy pathGPUReconstructionConvert.h
File metadata and controls
66 lines (57 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
/// \file GPUReconstructionConvert.h
/// \author David Rohr
#ifndef GPURECONSTRUCTIONCONVERT_H
#define GPURECONSTRUCTIONCONVERT_H
#include <memory>
#include <functional>
#include <vector>
#include "GPUDef.h"
#include "DataFormatsTPC/Constants.h"
namespace o2
{
struct InteractionRecord;
namespace tpc
{
struct ClusterNative;
struct ClusterNativeAccess;
class Digit;
} // namespace tpc
namespace raw
{
class RawFileWriter;
} // namespace raw
} // namespace o2
struct AliHLTTPCRawCluster;
namespace o2::gpu
{
struct GPUParam;
struct GPUTPCClusterData;
class TPCFastTransformPOD;
struct GPUTrackingInOutDigits;
struct GPUTrackingInOutZS;
class GPUReconstructionConvert
{
public:
constexpr static uint32_t NSECTORS = o2::tpc::constants::MAXSECTOR;
static void ConvertRun2RawToNative(o2::tpc::ClusterNativeAccess& native, std::unique_ptr<o2::tpc::ClusterNative[]>& nativeBuffer, const AliHLTTPCRawCluster** rawClusters, uint32_t* nRawClusters);
template <class S>
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 void RunZSEncoderCreateMeta(const uint64_t* buffer, const uint32_t* sizes, void** ptrs, GPUTrackingInOutZS* out);
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 int32_t GetMaxTimeBin(const GPUTrackingInOutDigits& digits);
static int32_t GetMaxTimeBin(const GPUTrackingInOutZS& zspages);
static std::function<void(std::vector<o2::tpc::Digit>&, const void*, uint32_t, uint32_t)> GetDecoder(int32_t version, const GPUParam* param);
};
} // namespace o2::gpu
#endif