Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TFFTReal.h
Go to the documentation of this file.
1// @(#)root/fft:$Id$
2// Author: Anna Kreshuk 07/4/2006
3
4/*************************************************************************
5 * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TFFTReal
13#define ROOT_TFFTReal
14
15#include "TVirtualFFT.h"
16#include "TString.h"
17
18class TComplex;
19
20class TFFTReal: public TVirtualFFT{
21 protected:
22 void *fIn; //input array
23 void *fOut; //output array
24 void *fPlan; //fftw plan (the plan how to compute the transform)
25 Int_t fNdim; //number of dimensions
26 Int_t fTotalSize; //total size of the transform
27 Int_t *fN; //transform sizes in each dimension
28 void *fKind; //transform kinds in each dimension
29 TString fFlags; //transform flags
30
31 Int_t MapOptions(const Int_t *kind);
32 UInt_t MapFlag(Option_t *flag);
33
34 public:
35 TFFTReal();
36 TFFTReal(Int_t n, Bool_t inPlace=kFALSE);
37 TFFTReal(Int_t ndim, Int_t *n, Bool_t inPlace=kFALSE);
38 ~TFFTReal() override;
39
40 void Init( Option_t *flags,Int_t sign, const Int_t *kind) override;
41
42 virtual Int_t GetSize() const {return fTotalSize;}
43 Int_t *GetN() const override {return fN;}
44 Int_t GetNdim() const override {return fNdim;}
45 Option_t *GetType() const override;
46 Int_t GetSign() const override {return 0;}
47 Option_t *GetTransformFlag() const override {return fFlags;}
48 Bool_t IsInplace() const override {if (fOut) return kTRUE; else return kFALSE;}
49
50 void GetPoints(Double_t *data, Bool_t fromInput = kFALSE) const override;
51 Double_t GetPointReal(Int_t ipoint, Bool_t fromInput = kFALSE) const override;
52 Double_t GetPointReal(const Int_t *ipoint, Bool_t fromInput = kFALSE) const override;
53 void GetPointComplex(const Int_t *ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const override;
54
55 void GetPointComplex(Int_t ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const override;
56
57 Double_t *GetPointsReal(Bool_t fromInput=kFALSE) const override;
58 void GetPointsComplex(Double_t* /*re*/, Double_t* /*im*/, Bool_t /*fromInput = kFALSE*/) const override{};
59 void GetPointsComplex(Double_t* /*data*/, Bool_t /*fromInput = kFALSE*/) const override {};
60
61 void SetPoint(Int_t ipoint, Double_t re, Double_t im = 0) override;
62 void SetPoint(const Int_t *ipoint, Double_t re, Double_t /*im=0*/) override;
63 void SetPoints(const Double_t *data) override;
64 void SetPointComplex(Int_t /*ipoint*/, TComplex &/*c*/) override{};
65 void SetPointsComplex(const Double_t* /*re*/, const Double_t* /*im*/) override{};
66 void Transform() override;
67
68
70};
71
72#endif
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
double Double_t
Definition RtypesCore.h:59
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
One of the interface classes to the FFTW package, can be used directly or via the TVirtualFFT class.
Definition TFFTReal.h:20
Int_t GetSign() const override
Definition TFFTReal.h:46
Int_t GetNdim() const override
Definition TFFTReal.h:44
Int_t fNdim
Definition TFFTReal.h:25
void SetPointsComplex(const Double_t *, const Double_t *) override
Definition TFFTReal.h:65
void Transform() override
Computes the transform, specified in Init() function.
Definition TFFTReal.cxx:197
void SetPoint(Int_t ipoint, Double_t re, Double_t im=0) override
Definition TFFTReal.cxx:311
void * fPlan
Definition TFFTReal.h:24
UInt_t MapFlag(Option_t *flag)
allowed options:
Definition TFFTReal.cxx:403
Double_t * GetPointsReal(Bool_t fromInput=kFALSE) const override
Returns the output (or input) array we have 4 different cases:
Definition TFFTReal.cxx:296
void SetPointComplex(Int_t, TComplex &) override
Definition TFFTReal.h:64
Int_t fTotalSize
Definition TFFTReal.h:26
void GetPointsComplex(Double_t *, Double_t *, Bool_t) const override
Definition TFFTReal.h:58
Int_t * GetN() const override
Definition TFFTReal.h:43
void SetPoints(const Double_t *data) override
Sets all points.
Definition TFFTReal.cxx:348
void GetPoints(Double_t *data, Bool_t fromInput=kFALSE) const override
Copies the output (or input) points into the provided array, that should be big enough.
Definition TFFTReal.cxx:226
Double_t GetPointReal(Int_t ipoint, Bool_t fromInput=kFALSE) const override
For 1d transformations. Returns point #ipoint
Definition TFFTReal.cxx:236
Int_t * fN
Definition TFFTReal.h:27
Option_t * GetType() const override
Returns the type of the transform.
Definition TFFTReal.cxx:210
TString fFlags
Definition TFFTReal.h:29
Bool_t IsInplace() const override
Definition TFFTReal.h:48
void * fOut
Definition TFFTReal.h:23
void GetPointsComplex(Double_t *, Bool_t) const override
Definition TFFTReal.h:59
TFFTReal()
default
Definition TFFTReal.cxx:69
virtual Int_t GetSize() const
Definition TFFTReal.h:42
void * fIn
Definition TFFTReal.h:22
Int_t MapOptions(const Int_t *kind)
transfers the r2r_kind parameters to fftw type
Definition TFFTReal.cxx:357
void Init(Option_t *flags, Int_t sign, const Int_t *kind) override
Creates the fftw-plan.
Definition TFFTReal.cxx:176
void * fKind
Definition TFFTReal.h:28
Option_t * GetTransformFlag() const override
Definition TFFTReal.h:47
void GetPointComplex(const Int_t *ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const override
Only for input of HC2R and output of R2HC and for 1d.
Definition TFFTReal.cxx:282
~TFFTReal() override
clean-up
Definition TFFTReal.cxx:124
Basic string class.
Definition TString.h:139
TVirtualFFT is an interface class for Fast Fourier Transforms.
Definition TVirtualFFT.h:88
const Int_t n
Definition legend1.C:16