Logo ROOT  
Reference Guide
TFFTRealComplex.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_TFFTRealComplex
13#define ROOT_TFFTRealComplex
14
15#include "TVirtualFFT.h"
16#include "TString.h"
17
18class TComplex;
19
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 TString fFlags; //transform flags
29
30 UInt_t MapFlag(Option_t *flag);
31
32 public:
34 TFFTRealComplex(Int_t n, Bool_t inPlace);
35 TFFTRealComplex(Int_t ndim, Int_t *n, Bool_t inPlace);
36 virtual ~TFFTRealComplex();
37
38 virtual void Init( Option_t *flags, Int_t /*sign*/,const Int_t* /*kind*/);
39
40 virtual Int_t GetSize() const {return fTotalSize;}
41 virtual Int_t *GetN() const {return fN;}
42 virtual Int_t GetNdim() const {return fNdim;}
43 virtual Option_t *GetType() const {return "R2C";}
44 virtual Int_t GetSign() const {return 1;}
45 virtual Option_t *GetTransformFlag() const {return fFlags;}
46 virtual Bool_t IsInplace() const {if (fOut) return kTRUE; else return kFALSE;};
47
48 virtual void GetPoints(Double_t *data, Bool_t fromInput = kFALSE) const;
49 virtual Double_t GetPointReal(Int_t ipoint, Bool_t fromInput = kFALSE) const;
50 virtual Double_t GetPointReal(const Int_t *ipoint, Bool_t fromInput = kFALSE) const;
51 virtual void GetPointComplex(Int_t ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const;
52 virtual void GetPointComplex(const Int_t *ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const;
53 virtual Double_t *GetPointsReal(Bool_t fromInput=kFALSE) const;
54 virtual void GetPointsComplex(Double_t *re, Double_t *im, Bool_t fromInput = kFALSE) const ;
55 virtual void GetPointsComplex(Double_t *data, Bool_t fromInput = kFALSE) const ;
56
57 virtual void SetPoint(Int_t ipoint, Double_t re, Double_t im = 0);
58 virtual void SetPoint(const Int_t *ipoint, Double_t re, Double_t im = 0);
59 virtual void SetPoints(const Double_t *data);
60 virtual void SetPointComplex(Int_t ipoint, TComplex &c);
61 virtual void SetPointsComplex(const Double_t *re, const Double_t *im);
62 virtual void Transform();
63
65};
66
67#endif
#define c(i)
Definition: RSha256.hxx:101
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:326
One of the interface classes to the FFTW package, can be used directly or via the TVirtualFFT class.
UInt_t MapFlag(Option_t *flag)
allowed options: "ES" "M" "P" "EX"
virtual Int_t * GetN() const
virtual void SetPoint(Int_t ipoint, Double_t re, Double_t im=0)
Set the point #ipoint.
virtual void SetPoints(const Double_t *data)
Set all input points.
virtual Int_t GetSize() const
virtual Int_t GetSign() const
virtual void Init(Option_t *flags, Int_t, const Int_t *)
Creates the fftw-plan.
virtual Bool_t IsInplace() const
virtual void GetPointComplex(Int_t ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const
Returns the point #ipoint.
virtual Double_t GetPointReal(Int_t ipoint, Bool_t fromInput=kFALSE) const
Returns the real part of the point #ipoint from the output or the point #ipoint from the input.
virtual Option_t * GetType() const
virtual void Transform()
Computes the transform, specified in Init() function.
virtual ~TFFTRealComplex()
Destroys the data arrays and the plan.
virtual void GetPoints(Double_t *data, Bool_t fromInput=kFALSE) const
Fills the array data with the computed transform.
virtual void SetPointComplex(Int_t ipoint, TComplex &c)
Sets the point #ipoint (only the real part of the argument is taken)
virtual Option_t * GetTransformFlag() const
virtual void GetPointsComplex(Double_t *re, Double_t *im, Bool_t fromInput=kFALSE) const
Fills the argument arrays with the real and imaginary parts of the computed transform.
TFFTRealComplex()
default
virtual Double_t * GetPointsReal(Bool_t fromInput=kFALSE) const
Returns the input array// One of the interface classes to the FFTW package, can be used directly or v...
virtual void SetPointsComplex(const Double_t *re, const Double_t *im)
Set all points. Only the real array is used.
virtual Int_t GetNdim() const
Basic string class.
Definition: TString.h:131
TVirtualFFT is an interface class for Fast Fourier Transforms.
Definition: TVirtualFFT.h:88
const Int_t n
Definition: legend1.C:16