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

TDSPBlockFifo Class Reference

#include <TDSPBlockFifo.h>

Inheritance diagram for TDSPBlockFifo:

TDSPOutput1 TDSPFifo TDSPOperator TQQObject

Detailed Description

2-Dim FIFO implementation
Author:
Peter Jung
The FIFO of order M is designed in that way that you have not only M past values avaiable but the current too !!

Definition at line 32 of file TDSPBlockFifo.h.

Public Member Functions

 TDSPBlockFifo (char *name=NULL)
 ~TDSPBlockFifo ()
TComplexGetBlock (Int_t i=0)
void SetDepth (Int_t depth)
void SetSize (Int_t width, Int_t depth)
Int_t GetWidth ()
TDSPSignalShift (TDSPSignal *input=NULL, TDSPSignal *output=NULL)
TDSPSignalUpdate (TDSPSignal *input)

Protected Attributes

Int_t fWidth

Friends

class TDSPFifoFilter


Constructor & Destructor Documentation

TDSPBlockFifo::TDSPBlockFifo char *  name = NULL  ) 
 

TDSPBlockFifo::~TDSPBlockFifo  ) 
 


Member Function Documentation

TComplex* TDSPBlockFifo::GetBlock Int_t  i = 0  )  [inline]
 

Definition at line 45 of file TDSPBlockFifo.h.

References TDSPFifo::fBlock, and fWidth.

00045 { return &fBlock[i*fWidth];};

Int_t TDSPBlockFifo::GetWidth  )  [inline]
 

Definition at line 49 of file TDSPBlockFifo.h.

References fWidth.

00049 { return fWidth;};

void TDSPBlockFifo::SetDepth Int_t  depth  ) 
 

Reimplemented from TDSPFifo.

void TDSPBlockFifo::SetSize Int_t  width,
Int_t  depth
 

TDSPSignal * TDSPBlockFifo::Shift TDSPSignal input = NULL,
TDSPSignal output = NULL
[inline]
 

Definition at line 65 of file TDSPBlockFifo.h.

References TDSPFifo::Fill(), TDSPFifo::fIndex, fWidth, TDSPFifo::GetBlock(), TDSPVector::GetLen(), TDSPVector::GetVec(), TDSPFifo::Next(), TDSPVector::SetVec(), and TDSPFifo::WasFull().

Referenced by Update().

00065                                                                              {
00066 
00067   register  Int_t i;
00068 
00069   Int_t     iLen = 0;
00070   TComplex *ivec = NULL;
00071 
00072   if (input) {
00073     iLen = input->GetLen();
00074     ivec = input->GetVec();
00075 
00076     // Use only fWidth values of the input Signal
00077     //
00078     if (iLen>fWidth) iLen = fWidth;
00079     
00080   }
00081 
00083   //
00084   // Copy
00085   //
00086   TComplex *ovec = GetBlock(fIndex);
00087   
00088 
00089   for(i=0;   i<iLen;  i++) ovec[i] = ivec[i];
00090   for(   ;i<fWidth;i++)    ovec[i] = 0;
00091 
00092   // Increase the Index cyclic
00093   //
00094   Next();
00095   
00096   // Update the Fill Status
00097   //
00098   Fill();
00099   
00100   // Checking Fill Status of the Fifo
00101   //
00102   if (WasFull()) {
00103     
00104     // Set the Output Signal (if given)
00105     //
00106     if (output) output->SetVec(GetBlock(fIndex),fWidth);
00107     
00108   } else
00109     output = NULL;
00110 
00111 
00112   return output;
00113 
00114 }

TDSPSignal* TDSPBlockFifo::Update TDSPSignal input  )  [inline, virtual]
 

Reimplemented from TDSPOutput1.

Definition at line 55 of file TDSPBlockFifo.h.

References TDSPOperator::Emit(), TDSPOutput1::GetSignal(), and Shift().

00055                                         {
00056     TDSPSignal *output=Shift(input,GetSignal());
00057     Emit("Update(TDSPSignal*)",output);
00058     return output;
00059   }


Friends And Related Function Documentation

friend class TDSPFifoFilter [friend]
 

Definition at line 34 of file TDSPBlockFifo.h.


Field Documentation

Int_t TDSPBlockFifo::fWidth [protected]
 

Definition at line 38 of file TDSPBlockFifo.h.

Referenced by GetBlock(), GetWidth(), and Shift().


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