-
Notifications
You must be signed in to change notification settings - Fork 496
Expand file tree
/
Copy pathGPUO2InterfaceQA.cxx
More file actions
77 lines (65 loc) · 2.38 KB
/
GPUO2InterfaceQA.cxx
File metadata and controls
77 lines (65 loc) · 2.38 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
67
68
69
70
71
72
73
74
75
76
77
// 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 GPUO2InterfaceQA.cxx
/// \author David Rohr
#include "TGraphAsymmErrors.h"
#include "GPUParam.h"
#include "GPUQA.h"
#include "GPUO2InterfaceConfiguration.h"
#include "GPUO2InterfaceQA.h"
using namespace o2::gpu;
using namespace o2::tpc;
GPUO2InterfaceQA::GPUO2InterfaceQA(const GPUO2InterfaceConfiguration* config)
{
mParam.reset(new GPUParam);
mParam->SetDefaults(&config->configGRP, &config->configReconstruction, &config->configProcessing, nullptr);
mQA.reset(new GPUQA(nullptr, &config->configQA, mParam.get()));
}
GPUO2InterfaceQA::~GPUO2InterfaceQA() = default;
int32_t GPUO2InterfaceQA::initializeForProcessing(int32_t tasks)
{
return mQA->InitQA(tasks);
}
void GPUO2InterfaceQA::runQA(const std::vector<o2::tpc::TrackTPC>* tracksExternal, const std::vector<o2::MCCompLabel>* tracksExtMC, const o2::tpc::ClusterNativeAccess* clNative)
{
mQA->RunQA(false, tracksExternal, tracksExtMC, clNative);
}
int32_t GPUO2InterfaceQA::postprocess(TObjArray& out)
{
return mQA->DrawQAHistograms(&out);
}
int32_t GPUO2InterfaceQA::postprocessExternal(std::vector<TH1F>& in1, std::vector<TH2F>& in2, std::vector<TH1D>& in3, std::vector<TGraphAsymmErrors>& in4, TObjArray& out, int32_t tasks)
{
if (mQA->loadHistograms(in1, in2, in3, in4, tasks)) {
return 1;
}
return mQA->DrawQAHistograms(&out);
}
void GPUO2InterfaceQA::cleanup()
{
mQA->DrawQAHistogramsCleanup();
}
void GPUO2InterfaceQA::getHists(const std::vector<TH1F>*& h1, const std::vector<TH2F>*& h2, const std::vector<TH1D>*& h3, const std::vector<TGraphAsymmErrors>*& h4)
{
h1 = &mQA->getHistograms1D();
h2 = &mQA->getHistograms2D();
h3 = &mQA->getHistograms1Dd();
h4 = &mQA->getGraphs();
}
void GPUO2InterfaceQA::resetHists()
{
mQA->resetHists();
}
void GPUO2InterfaceQA::updateGRP(GPUSettingsGRP* grp)
{
mParam->UpdateSettings(grp, nullptr);
mQA->UpdateParam(mParam.get());
}