Project
Loading...
Searching...
No Matches
MCLabelAccumulator.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 O2_GPU_MC_LABEL_ACCUMULATOR_H
16#define O2_GPU_MC_LABEL_ACCUMULATOR_H
17
18#include "clusterFinderDefs.h"
19#include "CfArray2D.h"
20#include <bitset>
21#include <vector>
22
23namespace o2
24{
25class MCCompLabel;
26namespace dataformats
27{
28class MCCompLabel;
29template <typename T>
30class ConstMCTruthContainerView;
32} // namespace dataformats
33} // namespace o2
34
35namespace o2::gpu
36{
37
38class GPUTPCClusterFinder;
39struct GPUTPCClusterMCInterimArray;
40
42{
43
44 public:
46 ~MCLabelAccumulator(); // Explicit destructor to allow forward declaring MCCompLabel with std::vector
47
48 void collect(const CfChargePos& pos, float q);
49
50 void collectTail(tpccf::Row row, tpccf::Pad pad, uint16_t tailStart, uint16_t tailEnd);
51
52 bool engaged() const { return mLabels != nullptr && mOutput != nullptr; }
53
54 void commit(tpccf::Row row, uint32_t indexInRow, uint32_t maxElemsPerBucket);
55
56 private:
58 const o2::dataformats::ConstMCLabelContainerView* mLabels = nullptr;
59 GPUTPCClusterMCInterimArray* mOutput = nullptr;
60
61 std::bitset<64> mMaybeHasLabel;
62 std::vector<o2::MCCompLabel> mClusterLabels;
63};
64
65} // namespace o2::gpu
66
67#endif
uint16_t pos
Definition RawData.h:3
void collect(const CfChargePos &pos, float q)
void collectTail(tpccf::Row row, tpccf::Pad pad, uint16_t tailStart, uint16_t tailEnd)
GLintptr GLsizeiptr GLboolean commit
Definition glcorearb.h:3613
o2::dataformats::ConstMCTruthContainerView< o2::MCCompLabel > ConstMCLabelContainerView
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::vector< int > row