Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

TDSPFilter.h

Go to the documentation of this file.
00001 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef TDSPFILTER_H
00019 #define TDSPFILTER_H
00020 
00021 #include <TDSPRating.h>
00022 #include <TDSPSignal.h>
00023 
00028 class TDSPFilter  : virtual public TDSPRating  {
00029 
00030  protected:
00031   
00032   Double_t    fNorm;            // the Norm of the filter 
00033   Bool_t      fNormalized;      // is the Filter already normalized ?
00034   
00035  public: 
00036 
00037   TDSPVector        *fFIR;
00038   TDSPVector        *fIIR;
00039 
00040   Double_t           GetNorm() const { return fNorm;};       // Return the Norm of the Filter
00041   void               SetNorm(Double_t n) { fNorm = n;};      // Set the Norm of the Filter
00042   void               Normalize();                            // Normalize the Filter
00043   Bool_t             IsNormalized() const { return fNormalized;}; // Is the Filter already normalized ?
00044 
00045   TDSPFilter();
00046   virtual ~TDSPFilter();
00047 
00048   
00049   TDSPVector* GetFIR() const { return fFIR; };
00050   TDSPVector* GetIIR() const { return fIIR; };
00051 
00052   void FIR(TDSPVector *fir) {fFIR = fir;fNormalized=kFALSE;};// specify the FIR Filter (vector of coefficients)
00053   void IIR(TDSPVector *iir) {fIIR = iir;};// specify the IIR Filter (vector of coefficients)
00054 
00055   TDSPVector *filter(TDSPVector *input, TDSPVector *output=NULL) { // Filter the input Signal with specified FIR/IIR-filters
00056     return ::filter(input,output,fFIR,fIIR);
00057   }
00058 
00059   TDSPVector *filter(TDSPFifo *input, TDSPVector *output=NULL) {   // Filter the content of the input Fifo with specified FIR/IIR-filters
00060     return ::filter(input,output,fFIR,fIIR);
00061   }
00062 
00063   TComplex   filter(TDSPFifo *input, TDSPFifo *output) {   // Filter the content of the input Fifo with specified FIR/IIR-filters
00064     return ::filter(input,output,fFIR,fIIR);
00065   }
00066 
00067   ClassDef(TDSPFilter,1)
00068 
00069 };
00070 
00071 #endif

Generated on Fri Apr 23 16:23:43 2004 by doxygen 1.3.2