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

TDSPFifo Class Reference

#include <TDSPFifo.h>

Inheritance diagram for TDSPFifo:

TDSPBlockFifo

Public Member Functions

 TDSPFifo (Int_t depth=0)
virtual ~TDSPFifo ()
Int_t GetIndex (Int_t)
Int_t GetDepth () const
Int_t GetFill () const
TComplexGetBlock () const
Bool_t WasFull ()
Bool_t IsFull ()
void Reset ()
TComplexoperator() ()
TComplexoperator() (Int_t i)
TComplexoperator[] (Int_t i)
void Print ()
void Input ()
Int_t GetIndex () const
void Next ()
Int_t Next (Int_t current)
void Back ()
Int_t Back (Int_t current)
TComplexShift (Double_t x)
TComplexShift (TComplex c)
TDSPVectorShift (TDSPVector *input, TDSPVector *output)
void FillFrom (TDSPVector *input)
TDSPVectorFillTo (TDSPVector *output=NULL)
void SetDepth (Int_t depth)
void Set (const TComplex &)
void Set (Double_t)
void Zeros ()
void Ones ()
TComplex Dot (TComplex *fir_vec, Bool_t conj=kTRUE, Int_t l=0)
TComplex Dot (TDSPVector *fir, Bool_t conj=kTRUE)
TComplex Dot (TDSPFifo *fir, Bool_t conj=kTRUE)
TDSPVectorfilter (TDSPVector *out, TDSPVector *fir, TDSPVector *iir=NULL)
TGraph * Graph (Option_t *="complex", TGraph *in=NULL, Double_t dx=1.0, Double_t xoff=0.0)
void Draw (Option_t *="", Double_t dx=1.0, Double_t xoff=0.0)
TDSPFifooperator= (const Double_t x)
TDSPFifooperator= (const TComplex &c)

Static Public Member Functions

void ValuesPerLine (UInt_t p)

Protected Member Functions

void Fill ()
 The Fifo Memory itself.


Protected Attributes

Int_t fDepth
Int_t fIndex
Int_t fFill
TComplexfBlock

Static Protected Attributes

UInt_t fPerLine

Friends

istream & operator>> (istream &, TDSPFifo &)
ostream & operator<< (ostream &, TDSPFifo &)
istream & operator>> (istream &, TDSPFifo *)
ostream & operator<< (ostream &, TDSPFifo *)

Constructor & Destructor Documentation

TDSPFifo::TDSPFifo Int_t  depth = 0  ) 
 

virtual TDSPFifo::~TDSPFifo  )  [virtual]
 


Member Function Documentation

Int_t TDSPFifo::Back Int_t  current  )  [inline]
 

Definition at line 107 of file TDSPFifo.h.

References fDepth.

00107 {return current ? current-1 : fDepth;} // back with extern cyclic Index

void TDSPFifo::Back  )  [inline]
 

Definition at line 106 of file TDSPFifo.h.

References fDepth, and fIndex.

00106 { fIndex= fIndex ? fIndex-1 : fDepth;} // back with intern cyclic Index

TComplex TDSPFifo::Dot TDSPFifo fir,
Bool_t  conj = kTRUE
 

TComplex TDSPFifo::Dot TDSPVector fir,
Bool_t  conj = kTRUE
 

TComplex TDSPFifo::Dot TComplex fir_vec,
Bool_t  conj = kTRUE,
Int_t  l = 0
[inline]
 

Definition at line 217 of file TDSPFifo.h.

References fFill, and operator()().

00217                                                                        {
00218   
00219   TComplex      tmp = 0;
00220 
00221   if (!len) len=fFill;
00222 
00223   if (conj) 
00224     for(register Int_t j=0;j<len;++j) tmp += operator()(-j-1) % fir_vec[j];
00225   else 
00226     for(register Int_t j=0;j<len;++j) tmp += operator()(-j-1) * fir_vec[j];
00227   return tmp;
00228 }

void TDSPFifo::Draw Option_t *  = "",
Double_t  dx = 1.0,
Double_t  xoff = 0.0
 

void TDSPFifo::Fill  )  [inline, protected]
 

The Fifo Memory itself.

Definition at line 190 of file TDSPFifo.h.

References fFill, and WasFull().

Referenced by Shift(), and TDSPBlockFifo::Shift().

00190                            {
00191   if (!WasFull()) fFill++;
00192 }

void TDSPFifo::FillFrom TDSPVector input  ) 
 

TDSPVector* TDSPFifo::FillTo TDSPVector output = NULL  ) 
 

TDSPVector * TDSPFifo::filter TDSPVector out,
TDSPVector fir,
TDSPVector iir = NULL
[inline]
 

Definition at line 157 of file TDSPFifo.h.

References filter().

00159                                      { // Use the fifo-content as a filter input
00160 
00161   return ::filter(this,out,fir,iir);
00162 
00163 }

TComplex* TDSPFifo::GetBlock  )  const [inline]
 

Definition at line 82 of file TDSPFifo.h.

References fBlock.

Referenced by TDSPBlockFifo::Shift().

00082 { return fBlock; }; // return the Block address of the fifo

Int_t TDSPFifo::GetDepth  )  const [inline]
 

Definition at line 80 of file TDSPFifo.h.

References fDepth.

00080 { return fDepth;}; // return the depth of the fifo

Int_t TDSPFifo::GetFill  )  const [inline]
 

Definition at line 81 of file TDSPFifo.h.

References fFill.

00081 { return fFill; }; // return the fill depth of the fifo

Int_t TDSPFifo::GetIndex  )  const [inline]
 

Definition at line 102 of file TDSPFifo.h.

References fIndex.

Referenced by operator()().

00102 { return fIndex; };  // return the actual cyclic index (eq. to GetIndex(0))

Int_t TDSPFifo::GetIndex Int_t   )  [inline]
 

Definition at line 173 of file TDSPFifo.h.

References fFill, fIndex, and Next().

00173                                        {
00174   if (i<0) {
00175     i++;
00176     i%=fFill;
00177     i+=fFill-1;
00178   } else 
00179     i %= fFill;         // can be seen as periodic
00180   i += Next(fIndex);   // index "0" correspond to fIndex+1 (the place of then oldest entry ...)
00181   if (i>fFill) return i-fFill-1;
00182   return i;
00183 }

TGraph* TDSPFifo::Graph Option_t *  = "complex",
TGraph *  in = NULL,
Double_t  dx = 1.0,
Double_t  xoff = 0.0
 

void TDSPFifo::Input  ) 
 

Bool_t TDSPFifo::IsFull  )  [inline]
 

Definition at line 85 of file TDSPFifo.h.

References fDepth, and fFill.

00085 { return fFill==fDepth-1;}; // Is the Fifo full now (for request before shifts)

Int_t TDSPFifo::Next Int_t  current  )  [inline]
 

Definition at line 104 of file TDSPFifo.h.

References fDepth.

00104 {return current++==fDepth ? 0 : current;} // next with extern cyclic Index

void TDSPFifo::Next  )  [inline]
 

Definition at line 103 of file TDSPFifo.h.

References fDepth, and fIndex.

Referenced by GetIndex(), Shift(), and TDSPBlockFifo::Shift().

00103 { if (fIndex++==fDepth) fIndex=0;} // next with intern cyclic Index

void TDSPFifo::Ones  )  [inline]
 

Definition at line 118 of file TDSPFifo.h.

References Set().

00118 { Set(1.0);};                       // Set all values of the fifo to 1

TComplex & TDSPFifo::operator() Int_t  i  )  [inline]
 

Definition at line 185 of file TDSPFifo.h.

References fBlock, and GetIndex().

00185                                              {
00186   return fBlock[GetIndex(i)];
00187 }

TComplex & TDSPFifo::operator()  )  [inline]
 

Definition at line 164 of file TDSPFifo.h.

References fBlock, and fIndex.

Referenced by Dot().

00164                                       {
00165   return fBlock[fIndex];
00166 }

TDSPFifo& TDSPFifo::operator= const TComplex c  )  [inline]
 

Definition at line 133 of file TDSPFifo.h.

References Set().

00133 { Set(c); return *this;};

TDSPFifo& TDSPFifo::operator= const Double_t  x  )  [inline]
 

Definition at line 132 of file TDSPFifo.h.

References Set().

00132 { Set(x); return *this;};

TComplex & TDSPFifo::operator[] Int_t  i  )  [inline]
 

Definition at line 169 of file TDSPFifo.h.

References fBlock.

00169                                              {
00170   return fBlock[i];
00171 }

void TDSPFifo::Print  ) 
 

void TDSPFifo::Reset  ) 
 

void TDSPFifo::Set Double_t   )  [inline]
 

Definition at line 235 of file TDSPFifo.h.

References fBlock, fDepth, fFill, TComplex::fIm, and TComplex::fRe.

00235                                     {
00236   for(register Int_t i=0;i<=fDepth;++i) { fBlock[i].fRe = d; fBlock[i].fIm = 0; };
00237   fFill = fDepth;
00238 }

void TDSPFifo::Set const TComplex  )  [inline]
 

Definition at line 230 of file TDSPFifo.h.

References fBlock, fDepth, and fFill.

Referenced by Ones(), operator=(), and Zeros().

00230                                            {
00231   for(register Int_t i=0;i<=fDepth;++i) fBlock[i] = c;
00232   fFill = fDepth;
00233 }

void TDSPFifo::SetDepth Int_t  depth  ) 
 

Reimplemented in TDSPBlockFifo.

TDSPVector* TDSPFifo::Shift TDSPVector input,
TDSPVector output
 

TComplex & TDSPFifo::Shift TComplex  c  )  [inline]
 

Definition at line 195 of file TDSPFifo.h.

References ComplexZero, Fill(), Next(), and WasFull().

00195                                            {
00196   // Put the new Value on the Top
00197   //
00198   (*this)() = c;
00199 
00200   // Increase the cyclic index
00201   //
00202   Next();
00203   
00204   // Update the Fill Status
00205   //
00206   Fill();
00207   
00208   // Checking Fill Status of the Fifo
00209   //
00210   if (!WasFull())
00211     return ComplexZero;
00212 
00213   // Return the bottom value
00214   return (*this)();
00215 }

TComplex& TDSPFifo::Shift Double_t  x  )  [inline]
 

Definition at line 109 of file TDSPFifo.h.

Referenced by TDSPFifoFilter::filter().

00109 { return Shift(TComplex(x,0)); };

void TDSPFifo::ValuesPerLine UInt_t  p  )  [inline, static]
 

Definition at line 77 of file TDSPFifo.h.

References fPerLine.

00077 { fPerLine = p;}; // How many Values to Print per line (using cout...)

Bool_t TDSPFifo::WasFull  )  [inline]
 

Definition at line 84 of file TDSPFifo.h.

References fDepth, and fFill.

Referenced by Fill(), Shift(), and TDSPBlockFifo::Shift().

00084 {  return fFill>=fDepth;};  // Is and was the Fifo full (for requests after shifts)

void TDSPFifo::Zeros  )  [inline]
 

Definition at line 117 of file TDSPFifo.h.

References Set().

00117 { Set(0.0); };                     // Set all values of the fifo to 0


Friends And Related Function Documentation

ostream& operator<< ostream &  ,
TDSPFifo
[friend]
 

ostream& operator<< ostream &  ,
TDSPFifo
[friend]
 

istream& operator>> istream &  ,
TDSPFifo
[friend]
 

istream& operator>> istream &  ,
TDSPFifo
[friend]
 


Field Documentation

TComplex* TDSPFifo::fBlock [protected]
 

Definition at line 66 of file TDSPFifo.h.

Referenced by GetBlock(), TDSPBlockFifo::GetBlock(), operator()(), operator[](), and Set().

Int_t TDSPFifo::fDepth [protected]
 

Definition at line 62 of file TDSPFifo.h.

Referenced by Back(), GetDepth(), IsFull(), Next(), Set(), and WasFull().

Int_t TDSPFifo::fFill [protected]
 

Definition at line 64 of file TDSPFifo.h.

Referenced by Dot(), Fill(), GetFill(), GetIndex(), IsFull(), Set(), and WasFull().

Int_t TDSPFifo::fIndex [protected]
 

Definition at line 63 of file TDSPFifo.h.

Referenced by Back(), GetIndex(), Next(), operator()(), and TDSPBlockFifo::Shift().

UInt_t TDSPFifo::fPerLine [static, protected]
 

Definition at line 70 of file TDSPFifo.h.

Referenced by ValuesPerLine().


The documentation for this class was generated from the following file:
Generated on Fri Apr 23 16:23:54 2004 by doxygen 1.3.2