Project
Loading...
Searching...
No Matches
GPUO2InterfaceQA.cxx
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#include "TGraphAsymmErrors.h"
16#include "GPUParam.h"
17#include "GPUQA.h"
19#include "GPUO2InterfaceQA.h"
20
21using namespace o2::gpu;
22using namespace o2::tpc;
23
25{
26 mParam.reset(new GPUParam);
27 mParam->SetDefaults(&config->configGRP, &config->configReconstruction, &config->configProcessing, nullptr);
28 mQA.reset(new GPUQA(nullptr, &config->configQA, mParam.get()));
29}
30
32
34{
35 return mQA->InitQA(tasks);
36}
37
38void GPUO2InterfaceQA::runQA(const std::vector<o2::tpc::TrackTPC>* tracksExternal, const std::vector<o2::MCCompLabel>* tracksExtMC, const o2::tpc::ClusterNativeAccess* clNative)
39{
40 mQA->RunQA(false, tracksExternal, tracksExtMC, clNative);
41}
42int32_t GPUO2InterfaceQA::postprocess(TObjArray& out)
43{
44 return mQA->DrawQAHistograms(&out);
45}
46
47int32_t GPUO2InterfaceQA::postprocessExternal(std::vector<TH1F>& in1, std::vector<TH2F>& in2, std::vector<TH1D>& in3, std::vector<TGraphAsymmErrors>& in4, TObjArray& out, int32_t tasks)
48{
49 if (mQA->loadHistograms(in1, in2, in3, in4, tasks)) {
50 return 1;
51 }
52 return mQA->DrawQAHistograms(&out);
53}
54
56{
57 mQA->DrawQAHistogramsCleanup();
58}
59
60void GPUO2InterfaceQA::getHists(const std::vector<TH1F>*& h1, const std::vector<TH2F>*& h2, const std::vector<TH1D>*& h3, const std::vector<TGraphAsymmErrors>*& h4)
61{
62 h1 = &mQA->getHistograms1D();
63 h2 = &mQA->getHistograms2D();
64 h3 = &mQA->getHistograms1Dd();
65 h4 = &mQA->getGraphs();
66}
67
69{
70 mQA->resetHists();
71}
72
74{
75 mParam->UpdateSettings(grp, nullptr);
76 mQA->UpdateParam(mParam.get());
77}
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)
GPUO2InterfaceQA(const GPUO2InterfaceConfiguration *config=nullptr)
int32_t initializeForProcessing(int32_t tasks)
Global TPC definitions and constants.
Definition SimTraits.h:167