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

TDSPOutput1.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 TDSPOUTPUT1_H
00019 #define TDSPOUTPUT1_H
00020 
00021 
00028 #include <TString.h>
00029 #include <Riostream.h>
00030 #include "TDSPSignal.h"
00031 #include "TDSPOperator.h"
00032 
00033 #define kTDSPOUTPUT_CAN_OVERWRITE 0x1
00034 
00035 class TDSPOutput1 : public TDSPOperator {
00036 
00037   friend istream &operator>>(istream&,TDSPOutput1&);
00038   friend ostream &operator<<(ostream&,TDSPOutput1&);
00039   friend istream &operator>>(istream&,TDSPOutput1*);
00040   friend ostream &operator<<(ostream&,TDSPOutput1*);
00041 
00042 
00043  protected:
00044 
00045   Bool_t      fIsActive; // Active / InActive
00046   UInt_t      fBits; // Some Option Bits
00047   
00048   // The Output Signal
00049   TDSPSignal *fSignal; 
00050 
00051   // The Signal to communicate to other object
00052   // and send them that there is data in fSignal
00053 
00054   TString Signal_NewData; 
00055   TString Slot_Update;    
00056 
00057  public: 
00058 
00059   TDSPOutput1(char *name = NULL);
00060   ~TDSPOutput1();
00061 
00062   virtual void Print();
00063 
00064   // Overwriting the output ?
00065 
00066   void   SetCanOverwrite() { fBits &= kTDSPOUTPUT_CAN_OVERWRITE;}; // Set - overwrite of the output is possible
00067   void   ClearCanOverwrite() { fBits &= (!kTDSPOUTPUT_CAN_OVERWRITE);}; // Clear - overwrite of the output is not possible
00068   Bool_t CanOverWrite() { return fBits&(!kTDSPOUTPUT_CAN_OVERWRITE);}; // overwriting of the output possible ?
00069 
00070   // Connect Methods
00071   //
00072   Bool_t Connect(const char *signal,
00073          TNamed     *receiver,
00074          const char *slot) { 
00075     return TDSPOperator::Connect(signal,receiver,slot); 
00076   }
00077   
00078   Bool_t Connect(TQQObject  *receiver,
00079          const char *slot = NULL) {
00080     if (!slot) slot=Slot_Update;
00081     return TDSPOperator::Connect(Signal_NewData.Data(),receiver,slot);
00082   }
00083    
00084   Bool_t Connect(const char *signal,
00085          TQQObject  *receiver,
00086          const char *slot = NULL) {
00087     if (!slot) slot=Slot_Update;
00088     return TDSPOperator::Connect(signal,receiver,slot);
00089   }
00090 
00091   // This is the Standard Slot - pipes the data through
00092 
00093   virtual TDSPSignal* Update(TDSPSignal* input) // *SIGNAL*
00094     {
00095       fSignal->SetVec(input->GetVec());
00096       fSignal->SetLen(input->GetLen());
00097       Emit(Signal_NewData,fSignal);
00098       return fSignal;
00099     }
00100   void Browse(TBrowser *b = NULL);
00101   TDSPSignal* GetSignal() const { return fSignal;};
00102   void        SetSignal(TDSPSignal *s) { fSignal = s;};
00103   
00104   void        Activate() { fIsActive = kTRUE;}; // *MENU*
00105   void        Deactivate() { fIsActive = kFALSE;};  // *MENU*
00106   
00107   ClassDef(TDSPOutput1,1)
00108   
00109 };
00110 
00111 #endif

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