#include #include #include #include #include "sopnamsp.h" #include "histinit.h" #include "datatable.h" #include "fitshdtable.h" void test_fdtable() ; int main(int narg, char *arg[]) { SophyaInit(); try { test_fdtable(); } catch(PThrowable exc ) { cerr << "tnt-main() , Catched exception: \n" << exc.Msg() << endl; } catch(std::exception ex) { cerr << "tnt-main() , Catched exception ! " << (string)(ex.what()) << endl; } catch(...) { cerr << "tnt-main() , Catched ... ! " << endl; } } void test_fdtable() { int NL = 600; cout << "======= test_fdtable: simple DataTable+FITS test ======= " << endl; { cout << "1/ Creating DataTable / Writing to FITS " << endl; DataTable dt(64); dt.AddIntegerColumn("line"); dt.AddDoubleColumn("x"); dt.AddFloatColumn("f_sin"); dt.AddDoubleColumn("f_x2"); MuTyV rec[10]; cout << " Filling ... (NLines=" << NL << ")" << endl; for(int k = 0; k> dtr; cout << dtr; cout << "2.b/ dtr.LineHeaderToString() dtr.LineToString(k) : " << endl; cout << dtr.LineHeaderToString() ; for(int k = 0; k> dtra; cout << dtra; } cout << "============ FIN test_fdtable ======== ======= " << endl; }