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

TDSPBlockMap.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 TDSPBLOCKMAP_H
00019 #define TDSPBLOCKMAP_H
00020 
00021 #include <TDSPMatrix.h>
00022 #include <TDSPSignal.h>
00023 #include <TDSPOperator.h>
00024 #include <TDSPBlockOperation.h>
00025 
00032 class TDSPBlockMap : public TDSPOperator, public TDSPBlockOperation  {
00033 
00034  protected:
00035 
00036   // Method
00037 
00038   eMatrixApplyMode fMAMode;        // How to apply the Matrix
00039   eMatrixApplyMode fMAModeInverse; // How to apply the Inverse Matrix
00040 
00041   // My Signals
00042   
00043   TString       Signal_Update;
00044   TString       Signal_InverseUpdate;
00045 
00046   // My Slots
00047 
00048   TString       Slot_Update;
00049   TString       Slot_InverseUpdate;
00050   
00051 
00052   TDSPSignal*   fSignal;  // The Output Signal return by a Apply-Call
00053   TDSPSignal*   fInverseSignal; // The Output Signal return by a InverseApply-Call
00054 
00055   TDSPMatrix*   fMatrix;  // The Matrix to multiply on the input stream
00056   TDSPMatrix*   fPseudoInverseMatrix; // The Matrix to multiply on the return stream
00057 
00058  public: 
00059 
00060   TDSPBlockMap(char *name = NULL);
00061   ~TDSPBlockMap();
00062 
00063   TDSPSignal*   GetSignal() const { return fSignal; };
00064   TDSPSignal*   GetInverseSignal() const { return fInverseSignal;};
00065   void          SetMatrix(TDSPMatrix *m) { fMatrix = m;};
00066   void          SetInverseMatrix(TDSPMatrix *m) { fPseudoInverseMatrix = m;};
00067 
00068   Double_t      TestError(UInt_t num=1); // multiply n random vectors with Matrix and inverse and return the Error
00069 
00070   Int_t         GetBlockLen();
00071 
00072   TDSPMatrix*   GetMatrix() const { return fMatrix;};
00073   TDSPMatrix*   GetInverseMatrix() const { return fPseudoInverseMatrix;};
00074 
00075   TDSPSignal*   Apply(TDSPSignal *input);
00076   TDSPSignal*   InverseApply(TDSPSignal *input);
00077 
00078   void          SetApplyMode(eMatrixApplyMode m)  { fMAMode = m;}; // Set Mode for Apply
00079   void          SetApplyMode(eMatrixApplyMode m1,                  // Set Modes for Apply and InverseApply
00080                  eMatrixApplyMode m2) { fMAMode = m1;fMAModeInverse = m2;};
00081   void          SetInverseApplyMode(eMatrixApplyMode m)  { fMAModeInverse = m;};// Set Mode for InverseApply
00082                  
00083   
00084   eMatrixApplyMode GetApplyMode() const { return fMAMode;};
00085   eMatrixApplyMode GetInverseApplyMode() const { return fMAModeInverse;};
00086   
00087 
00088   // Slots
00089 
00090   TDSPSignal*        Update(TDSPSignal *input); // Calls Apply and Emits "Update(TDSPSignal*)"
00091   TDSPSignal* InverseUpdate(TDSPSignal *input); // Calls InverseApply and Emits "InverseUpdate(TDSPSignal*)"
00092 
00093   ClassDef(TDSPBlockMap,1)
00094 
00095 };
00096 
00097 inline TDSPSignal* TDSPBlockMap::Update(TDSPSignal *input) {
00098   CheckInitialization();
00099   Apply(input);
00100   Emit(Signal_Update,fSignal);
00101   return fSignal;
00102 }
00103 
00104 inline TDSPSignal* TDSPBlockMap::InverseUpdate(TDSPSignal *input) {
00105   CheckInitialization();
00106   InverseApply(input);
00107   Emit(Signal_InverseUpdate,fInverseSignal);
00108   return fInverseSignal;
00109 }
00110 
00111 
00112 
00113 #endif

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