Project
Loading...
Searching...
No Matches
HardwareClusterDecoder.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
15#ifndef ALICEO2_TPC_HARDWARECLUSTERDECODER_H_
16#define ALICEO2_TPC_HARDWARECLUSTERDECODER_H_
17
18#include <vector>
19#include <functional>
23
24namespace o2
25{
26namespace tpc
27{
28class ClusterHardwareContainer;
29class MCCompLabel;
30namespace dataformats
31{
32template <typename TruthElement>
34template <typename TruthElement>
36}
37
63{
64 public:
67
69 using OutputAllocator = std::function<char*(size_t)>;
70
80 int decodeClusters(std::vector<std::pair<const o2::tpc::ClusterHardwareContainer*, std::size_t>>& inputClusters,
81 OutputAllocator outputAllocator,
82 const std::vector<o2::dataformats::ConstMCTruthContainerView<o2::MCCompLabel>>* inMCLabels = nullptr,
84
90
91 private:
92 std::unique_ptr<DigitalCurrentClusterIntegrator> mIntegrator;
93};
94
95} // namespace tpc
96} // namespace o2
97#endif
Helper class to read the binary format of TPC ClusterNative.
Class of a TPC cluster in TPC-native coordinates (row, time)
Decoder to convert TPC ClusterHardware to ClusterNative.
int nClusters
A container to hold and manage MC truth information/labels.
Class to convert a list of input buffers containing TPC clusters of type ClusterHardware to type Clus...
static void sortClustersAndMC(ClusterNative *clusters, size_t nClusters, o2::dataformats::MCTruthContainer< o2::MCCompLabel > &mcTruth)
Sort clusters and MC labels in place ClusterNative defines the smaller-than relation used in the sort...
std::function< char *(size_t)> OutputAllocator
Allocator function object to provide the output buffer.
int decodeClusters(std::vector< std::pair< const o2::tpc::ClusterHardwareContainer *, std::size_t > > &inputClusters, OutputAllocator outputAllocator, const std::vector< o2::dataformats::ConstMCTruthContainerView< o2::MCCompLabel > > *inMCLabels=nullptr, o2::dataformats::MCTruthContainer< o2::MCCompLabel > *outMCLabels=nullptr)
Decode clusters provided in raw pages The function uses an allocator object to request a raw char buf...
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::vector< Cluster > clusters