Project
Loading...
Searching...
No Matches
GPUDisplayROOT.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#ifndef GPUCA_NO_ROOT
16#include "Rtypes.h" // Include ROOT header first, to use ROOT and disable replacements
17#endif
18
19#include "GPUDisplay.h"
20#include "GPULogging.h"
21#include "GPUConstantMem.h"
22#include "GPUChainTracking.h"
23using namespace o2::gpu;
24
25#ifndef GPUCA_NO_ROOT
26#include "Rtypes.h" // Include ROOT header first, to use ROOT and disable replacements
27#include "TROOT.h"
28#include "TSystem.h"
29#include "TMethodCall.h"
30
31int32_t GPUDisplay::buildTrackFilter()
32{
33 if (!mCfgH.trackFilter) {
34 return 0;
35 }
36 if (mUpdateTrackFilter) {
37 std::string name = "displayTrackFilter/";
38 name += mConfig.filterMacros[mCfgH.trackFilter - 1];
39 gROOT->Reset();
40 if (gROOT->LoadMacro(name.c_str())) {
41 GPUError("Error loading trackFilter macro %s", name.c_str());
42 return 1;
43 }
44 }
45 TMethodCall call;
46 call.InitWithPrototype("gpuDisplayTrackFilter", "std::vector<bool>*, const o2::gpu::GPUTrackingInOutPointers*, const o2::gpu::GPUConstantMem*");
47 const void* args[3];
48 std::vector<bool>* arg0 = &mTrackFilter;
49 args[0] = &arg0;
50 args[1] = &mIOPtrs;
51 const GPUConstantMem* arg2 = mChain ? mChain->GetProcessors() : nullptr;
52 args[2] = &arg2;
53
54 call.Execute(nullptr, args, sizeof(args) / sizeof(args[0]), nullptr);
55 return 0;
56}
57
58#else
59
60int32_t GPUDisplay::buildTrackFilter()
61{
62}
63
64#endif
const GPUConstantMem * GetProcessors() const
Definition GPUChain.h:68
GLuint const GLchar * name
Definition glcorearb.h:781