Diana Software
QFFTWPlan.hh
Go to the documentation of this file.
1 
2 #ifndef __Q_FFTW_PLAN_HH__
3 #define __Q_FFTW_PLAN_HH__
4 
5 #include "QFFT.hh"
6 #include "QFFTW3.hh"
7 #include "QVector.hh"
8 #include "QVectorC.hh"
9 
10 #if defined(_HAVE_FFTW3_) && !defined(__CINT__) && !defined(__CLING__)
11 #include <fftw3.h>
12 #endif
13 
15 
16 
34 public:
35 
37  QFFTWRealComplexPlan(QVector &realData,QVectorC &complexData,QFFT::FFTDirection direction);
39  // QFFTWRealComplexPlan(size_t size,QVector &realData,QVectorC &complexData,QFFT::FFTDirection direction);
41  QFFTWRealComplexPlan(QVector &realComplexData,QFFT::FFTDirection direction);
43  // QFFTWRealComplexPlan(size_t size,QVector &realComplexData,QFFT::FFTDirection direction);
45  virtual ~QFFTWRealComplexPlan();
47  size_t GetSize() const { return fSize; }
49  virtual void Execute();
51  QVector &GetRealData() { return fRealData; }
53  const QVector &GetRealData() const { return fRealData; }
57  const QVectorC &GetComplexData() const { return fComplexData; }
59  static QFFTWRealComplexPlan CreateForwardPlan(QVector &realData,QVectorC &complexData);
61  static QFFTWRealComplexPlan CreateBackwardPlan(QVectorC &complexData,QVector &realData);
63  // static QFFTWRealComplexPlan CreateForwardPlan(size_t size,QVector &realData,QVectorC &complexData);
65  // static QFFTWRealComplexPlan CreateBackwardPlan(size_t size,QVectorC &complexData,QVector &realData);
66 
67 protected:
69  void Build(QFFT::FFTDirection direction);
71  int fSize;
76 
77 #if defined(_HAVE_FFTW3_) && !defined(__CINT__) && !defined(__CLING__)
79  fftw_plan fFFTPlan;
80 
81 #endif
82 };
83 
84 
86 
87 
88 #endif
#define Q_END_NAMESPACE
Definition: QDiana.hh:22
#define Q_BEGIN_NAMESPACE
Definition: QDiana.hh:20
Interface to FFTW's FFT plans.
Definition: QFFTWPlan.hh:33
static QFFTWRealComplexPlan CreateBackwardPlan(QVectorC &complexData, QVector &realData)
Static method to create a backward plan.
Definition: QFFTWPlan.cc:56
QVector & GetRealData()
Get the real data vector.
Definition: QFFTWPlan.hh:51
const QVector & GetRealData() const
Get the real data vector.
Definition: QFFTWPlan.hh:53
QVectorC & GetComplexData()
Get the complex data vector.
Definition: QFFTWPlan.hh:55
virtual void Execute()
Execute the plan.
Definition: QFFTWPlan.cc:46
QVectorC fComplexData
The complex data, but does not own the memory vector.
Definition: QFFTWPlan.hh:75
void Build(QFFT::FFTDirection direction)
Static method to create a forward plan.
Definition: QFFTWPlan.cc:68
const QVectorC & GetComplexData() const
Get the complex data vector.
Definition: QFFTWPlan.hh:57
static QFFTWRealComplexPlan CreateForwardPlan(QVector &realData, QVectorC &complexData)
Static method to create a forward plan.
Definition: QFFTWPlan.cc:52
QFFTWRealComplexPlan(QVector &realData, QVectorC &complexData, QFFT::FFTDirection direction)
Construct a plan from a QVector and QVectorC.
QVector fRealData
The real data, but does not own the memory vector.
Definition: QFFTWPlan.hh:73
int fSize
The size of the plan.
Definition: QFFTWPlan.hh:71
size_t GetSize() const
Return the size of the plan.
Definition: QFFTWPlan.hh:47
virtual ~QFFTWRealComplexPlan()
Construct a plan for an in place FFT, but resize it.
Definition: QFFTWPlan.cc:40
QFFTWRealComplexPlan(QVector &realComplexData, QFFT::FFTDirection direction)
Construct a plan from a QVector and QVectorC and resize them.
FFTDirection
Definition: QFFT.hh:46
Interface for complex vectors in Diana analysis.
Definition: QVectorC.hh:25
Interface for vectors in Diana analysis.
Definition: QVector.hh:30