Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
18 class TComplex;
19 
20 class TFFTRealComplex: 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  TString fFlags; //transform flags
29 
30  UInt_t MapFlag(Option_t *flag);
31 
32  public:
33  TFFTRealComplex();
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 
64  ClassDef(TFFTRealComplex,0);
65 };
66 
67 #endif