Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TFFTComplexReal.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/fft:$Id$
0002 // Author: Anna Kreshuk   07/4/2006
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TFFTComplexReal
0013 #define ROOT_TFFTComplexReal
0014 
0015 
0016 #include "TVirtualFFT.h"
0017 #include "TString.h"
0018 
0019 class TComplex;
0020 
0021 class TFFTComplexReal: public TVirtualFFT {
0022 
0023  protected:
0024    void     *fIn;        //input array
0025    void     *fOut;       //output array
0026    void     *fPlan;      //fftw plan (the plan how to compute the transform)
0027    Int_t     fNdim;      //number of dimensions
0028    Int_t     fTotalSize; //total size of the transform
0029    Int_t    *fN;         //transform sizes in each dimension
0030    TString   fFlags;     //transform flags
0031 
0032    UInt_t MapFlag(Option_t *flag);
0033 
0034  public:
0035    TFFTComplexReal();
0036    TFFTComplexReal(Int_t n, Bool_t inPlace);
0037    TFFTComplexReal(Int_t ndim, Int_t *n, Bool_t inPlace);
0038    ~TFFTComplexReal() override;
0039 
0040    void       Init( Option_t *flags, Int_t /*sign*/,const Int_t* /*kind*/) override;
0041 
0042    virtual Int_t      GetSize() const {return fTotalSize;}
0043    Int_t     *GetN()    const override {return fN;}
0044    Int_t      GetNdim() const override {return fNdim;}
0045    Option_t  *GetType() const override {return "C2R";}
0046    Int_t      GetSign() const override {return -1;}
0047    Option_t  *GetTransformFlag() const override {return fFlags;}
0048    Bool_t     IsInplace() const override {if (fOut) return kTRUE; else return kFALSE;};
0049 
0050    void       GetPoints(Double_t *data, Bool_t fromInput = kFALSE) const override;
0051    Double_t   GetPointReal(Int_t ipoint, Bool_t fromInput = kFALSE) const override;
0052    Double_t   GetPointReal(const Int_t *ipoint, Bool_t fromInput = kFALSE) const override;
0053    void       GetPointComplex(Int_t ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const override;
0054    void       GetPointComplex(const Int_t *ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const override;
0055    Double_t*  GetPointsReal(Bool_t fromInput=kFALSE) const override;
0056    void       GetPointsComplex(Double_t *re, Double_t *im, Bool_t fromInput = kFALSE) const override ;
0057    void       GetPointsComplex(Double_t *data, Bool_t fromInput = kFALSE) const override ;
0058 
0059    void       SetPoint(Int_t ipoint, Double_t re, Double_t im = 0) override;
0060    void       SetPoint(const Int_t *ipoint, Double_t re, Double_t im = 0) override;
0061    void       SetPoints(const Double_t *data) override;
0062    void       SetPointComplex(Int_t ipoint, TComplex &c) override;
0063    void       SetPointsComplex(const Double_t *re, const Double_t *im) override;
0064    void       Transform() override;
0065 
0066    ClassDefOverride(TFFTComplexReal,0);
0067 };
0068 
0069 #endif