Project
Loading...
Searching...
No Matches
Spline1D.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
16
17#ifndef ALICEO2_GPUCOMMON_TPCFASTTRANSFORMATION_SPLINE1D_H
18#define ALICEO2_GPUCOMMON_TPCFASTTRANSFORMATION_SPLINE1D_H
19
20#include "Spline1DSpec.h"
21
22namespace o2::gpu
23{
122
136template <typename DataT, int32_t YdimT, class FlatBase>
138 : public Spline1DSpec<DataT, YdimT, SplineUtil::getSpec(YdimT), FlatBase>
139{
140 protected:
142 using ParentSpec = Spline1DSpec<DataT, YdimT, SplineUtil::getSpec(YdimT), FlatBase>;
143
144 public:
145#if !defined(GPUCA_GPUCODE)
146 Spline1DBase() = default;
148 {
149 static_cast<Container*>(this)->cloneFromObject(v, nullptr);
150 }
152 {
153 static_cast<Container*>(this)->cloneFromObject(v, nullptr);
154 return *this;
155 }
156#else
157 Spline1DBase() = delete;
158 Spline1DBase(const Spline1DBase&) = delete;
159#endif
160
161#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE)
162 static Spline1DBase* readFromFile(TFile& inpf, const char* name)
163 {
164 return (Spline1DBase*)Container::readFromFile(inpf, name);
165 }
166#endif
167};
168
170template <typename DataT, int32_t YdimT = 0, class FlatBase = FlatObject>
172
174template <typename DataT, int32_t YdimT>
175class Spline1D<DataT, YdimT, FlatObject> : public Spline1DBase<DataT, YdimT, FlatObject>
176{
177 public:
178#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE)
179 static Spline1D* readFromFile(TFile& inpf, const char* name)
180 {
182 }
183#endif
185};
186
188template <typename DataT, int32_t YdimT>
189class Spline1D<DataT, YdimT, NoFlatObject> : public Spline1DBase<DataT, YdimT, NoFlatObject>
190{
191};
192
193} // namespace o2::gpu
194
195#endif
Definition of Spline1DSpec class.
Spline1DBase(const Spline1DBase &v)
Definition Spline1D.h:147
Spline1DBase & operator=(const Spline1DBase &v)
Definition Spline1D.h:151
static Spline1DBase * readFromFile(TFile &inpf, const char *name)
Definition Spline1D.h:162
static Spline1D * readFromFile(TFile &inpf, const char *name)
Definition Spline1D.h:179
Forward declaration — specializations below select ClassDefNV based on FlatBase.
Definition Spline1D.h:171
static constexpr int32_t getSpec(int32_t nXdim, int32_t nYdim)
Definition SplineUtil.h:31
const GLdouble * v
Definition glcorearb.h:832
GLuint const GLchar * name
Definition glcorearb.h:781