Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TFFTComplexReal.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_TFFTComplexReal
13 #define ROOT_TFFTComplexReal
14 
15 
16 #include "TVirtualFFT.h"
17 #include "TString.h"
18 
19 class TComplex;
20 
21 class TFFTComplexReal: public TVirtualFFT {
22 
23  protected:
24  void *fIn; //input array
25  void *fOut; //output array
26  void *fPlan; //fftw plan (the plan how to compute the transform)
27  Int_t fNdim; //number of dimensions
28  Int_t fTotalSize; //total size of the transform
29  Int_t *fN; //transform sizes in each dimension
30  TString fFlags; //transform flags
31 
32  UInt_t MapFlag(Option_t *flag);
33 
34  public:
35  TFFTComplexReal();
36  TFFTComplexReal(Int_t n, Bool_t inPlace);
37  TFFTComplexReal(Int_t ndim, Int_t *n, Bool_t inPlace);
38  virtual ~TFFTComplexReal();
39 
40  virtual void Init( Option_t *flags, Int_t /*sign*/,const Int_t* /*kind*/);
41 
42  virtual Int_t GetSize() const {return fTotalSize;}
43  virtual Int_t *GetN() const {return fN;}
44  virtual Int_t GetNdim() const {return fNdim;}
45  virtual Option_t *GetType() const {return "C2R";}
46  virtual Int_t GetSign() const {return -1;}
47  virtual Option_t *GetTransformFlag() const {return fFlags;}
48  virtual Bool_t IsInplace() const {if (fOut) return kTRUE; else return kFALSE;};
49 
50  virtual void GetPoints(Double_t *data, Bool_t fromInput = kFALSE) const;
51  virtual Double_t GetPointReal(Int_t ipoint, Bool_t fromInput = kFALSE) const;
52  virtual Double_t GetPointReal(const Int_t *ipoint, Bool_t fromInput = kFALSE) const;
53  virtual void GetPointComplex(Int_t ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const;
54  virtual void GetPointComplex(const Int_t *ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const;
55  virtual Double_t* GetPointsReal(Bool_t fromInput=kFALSE) const;
56  virtual void GetPointsComplex(Double_t *re, Double_t *im, Bool_t fromInput = kFALSE) const ;
57  virtual void GetPointsComplex(Double_t *data, Bool_t fromInput = kFALSE) const ;
58 
59  virtual void SetPoint(Int_t ipoint, Double_t re, Double_t im = 0);
60  virtual void SetPoint(const Int_t *ipoint, Double_t re, Double_t im = 0);
61  virtual void SetPoints(const Double_t *data);
62  virtual void SetPointComplex(Int_t ipoint, TComplex &c);
63  virtual void SetPointsComplex(const Double_t *re, const Double_t *im);
64  virtual void Transform();
65 
66  ClassDef(TFFTComplexReal,0);
67 };
68 
69 #endif