Project
Loading...
Searching...
No Matches
GPUO2InterfaceQA.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 GPUO2INTERFACEQA_H
16#define GPUO2INTERFACEQA_H
17
18// Some defines denoting that we are compiling for O2
19#ifndef GPUCA_TPC_GEOMETRY_O2
20#define GPUCA_TPC_GEOMETRY_O2
21#endif
22#ifndef GPUCA_O2_INTERFACE
23#define GPUCA_O2_INTERFACE
24#endif
25
26#include <memory>
27#include <vector>
28
29class TH1F;
30class TH1D;
31class TH2F;
32class TGraphAsymmErrors;
33class TObjArray;
34
35namespace o2
36{
37class MCCompLabel;
38namespace tpc
39{
40class TrackTPC;
41struct ClusterNativeAccess;
42} // namespace tpc
43} // namespace o2
44
45namespace o2::gpu
46{
47class GPUQA;
48struct GPUParam;
49struct GPUO2InterfaceConfiguration;
50struct GPUSettingsGRP;
52{
53 public:
54 GPUO2InterfaceQA(const GPUO2InterfaceConfiguration* config = nullptr);
56
57 int32_t initializeForProcessing(int32_t tasks); // only needed for processing, not for postprocessing
58
59 void runQA(const std::vector<o2::tpc::TrackTPC>* tracksExternal, const std::vector<o2::MCCompLabel>* tracksExtMC, const o2::tpc::ClusterNativeAccess* clNative);
60 int32_t postprocess(TObjArray& out);
61 void updateGRP(GPUSettingsGRP* grp);
62
63 // Input might be modified, so we assume non-const. If it is const, a copy should be created before.
64 int32_t postprocessExternal(std::vector<TH1F>& in1, std::vector<TH2F>& in2, std::vector<TH1D>& in3, std::vector<TGraphAsymmErrors>& in4, TObjArray& out, int32_t tasks);
65
66 void getHists(const std::vector<TH1F>*& h1, const std::vector<TH2F>*& h2, const std::vector<TH1D>*& h3, const std::vector<TGraphAsymmErrors>*& h4);
67 void resetHists();
68 void cleanup();
69
70 private:
71 std::unique_ptr<GPUQA> mQA;
72 std::unique_ptr<GPUParam> mParam;
73};
74} // namespace o2::gpu
75
76#endif
void updateGRP(GPUSettingsGRP *grp)
void runQA(const std::vector< o2::tpc::TrackTPC > *tracksExternal, const std::vector< o2::MCCompLabel > *tracksExtMC, const o2::tpc::ClusterNativeAccess *clNative)
int32_t postprocess(TObjArray &out)
void getHists(const std::vector< TH1F > *&h1, const std::vector< TH2F > *&h2, const std::vector< TH1D > *&h3, const std::vector< TGraphAsymmErrors > *&h4)
int32_t postprocessExternal(std::vector< TH1F > &in1, std::vector< TH2F > &in2, std::vector< TH1D > &in3, std::vector< TGraphAsymmErrors > &in4, TObjArray &out, int32_t tasks)
int32_t initializeForProcessing(int32_t tasks)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...