00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef EKGPLOTTER_H
00023 #define EKGPLOTTER_H
00024
00025 #include <iostream>
00026 #include <string>
00027 #include <time.h>
00028 #include "EKGbuffer.h"
00029 #include "EKGtools.h"
00030 #include "calibrate.h"
00031 using namespace std;
00032
00033
00044 class EKGplotter
00045 {
00046 public:
00048 EKGplotter( const EKGbuffer & b ) : ts(50), vs(20), B(b) {}
00053 void toPostscript( ostream & o );
00060 void toRaw( ostream & o );
00062 float ts;
00064 float vs;
00066 string name;
00073 static int timesteps_on_paper( float TS )
00074 { return static_cast<int>(265 / TS / EKG_TimeStep); }
00075 private:
00077 const EKGbuffer B;
00083 static void writestrings( const char ** const s, int & i, ostream & o );
00088 void writedata( EKGbuffer b, int n, ostream & o );
00089
00090 void writeavr( EKGbuffer b, ostream & o );
00091
00092 void writeavl( EKGbuffer b, ostream & o );
00093
00094 void writeavf( EKGbuffer b, ostream & o );
00095 };
00096
00097 #endif
00098