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 TMATLAB_H 00019 #define TMATLAB_H 00020 00021 //#ifndef ROOT_Varargs 00022 #include <Varargs.h> 00023 //#endif 00024 00025 00026 #include <Riostream.h> 00027 00028 00029 00030 00031 // If this code is in tdsp .... 00032 00033 #include <TQQObject.h> 00034 #include <TDSPVector.h> 00035 00036 #include <TmxArray.h> 00037 00042 class TMatlab : public TQQObject { 00043 protected: 00044 void *fEngine; 00045 char *fOutputBuffer; 00046 Int_t fEvalReturn; // the Error Return Code of the last evaluation 00047 public: 00048 00049 friend istream &operator>>(istream&,TMatlab&); 00050 //friend ostream &operator<<(ostream&,TMatlab&); 00051 //friend istream &operator>>(istream&,TMatlab*); 00052 //friend ostream &operator<<(ostream&,TMatlab*); 00053 00054 00055 TMatlab(); 00056 ~TMatlab(); 00057 00058 static TMatlab* GlobalEngine(); 00059 00060 // Evalutions 00061 // 00062 Bool_t Eval(const char* va_(fmt), ...); 00063 Bool_t EvalString(const char* va_(fmt), ... ); 00064 Int_t OutputBuffer(char* buffer = NULL, Int_t buflen = 2048); 00065 00066 // put/get arrays 00067 00068 Int_t Put(TmxArray *); 00069 TmxArray* Get(const char *name, TmxArray *a = NULL); 00070 00071 ClassDef(TMatlab,1) 00072 00073 }; 00074 00075 extern TMatlab* gMatlab; 00076 00077 #endif
1.3.2