Changeset 1439 in Sophya for trunk/ArchTOIPipe/TestPipes


Ignore:
Timestamp:
Mar 13, 2001, 7:23:14 PM (25 years ago)
Author:
ansari
Message:

Correction bugs, protections, ameliorations - Reza 13/3/2001

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/TestPipes/tstrztoi.cc

    r1437 r1439  
    11#include <unistd.h>
     2#include <stdexcept>
    23#include "toi.h"
    34#include "toiprocessor.h"
     
    105106    //    FITSTOIWriter w("/data/Archeops/rz.fits");
    106107    FITSTOIWriter w(outfile);
    107     w.setOutFlags(true);
    108108    cout << "fits writer created" << endl;
    109109
    110110
    111111    char * colname[5] = {"MJD", "UTC","boloMuV_11","magnFlux","pivot"};
     112    char * toiname[5] = {"MJD", "UTC","bolo11","magneto","pivot"};
    112113    TOI* toitab[5];
    113114    TOI* toi2;
     
    116117      cout << " Using TOIRegularWindow TOI's ... " << endl;
    117118      for(kk=0; kk<5; kk++) {
    118         toitab[kk] = new TOIRegularWindow((string)"t_"+colname[kk]);
     119        toitab[kk] = new TOIRegularWindow(toiname[kk]);
    119120      }
    120121      toi2 = new TOIRegularWindow("t2");
     
    123124      cout << " Using TOISeqBuffered TOI's ... " << endl;
    124125      for(kk=0; kk<5; kk++) {
    125         TOISeqBuffered * toisb = new TOISeqBuffered((string)"t_"+colname[kk], w1);
     126        TOISeqBuffered * toisb = new TOISeqBuffered(toiname[kk], w1);
    126127        toitab[kk] = toisb;
    127128        if (fgdbg) toisb->setDebugLevel(1);
     
    163164
    164165
    165     w.addInput("bolo_filtered", toi2);
     166    w.setOutFlags(true);
     167    w.addInput("bolodrift", toi2);
     168
     169    cout << " ------ FITSReaderTOI::PrintStatus() : ----- " << endl;
     170    r.PrintStatus(cout); 
     171    cout << "----- FITSWriterTOI::PrintStatus() : ----- " << endl;
     172    w.PrintStatus(cout); 
    166173
    167174    PrtTim("starting threads");
     
    170177    else rzp.start();
    171178    w.start();
    172 
    173     r.PrintStatus(cout); 
    174179   
    175     for(int jj=0; jj<3; jj++) {
    176       sleep(2);
    177       cout << *toi;
    178     }
     180    //    for(int jj=0; jj<3; jj++) {
     181    //      sleep(2);
     182    //      cout << *toi;
     183    //    }
    179184
    180185    mgr->joinAll();
    181186    PrtTim("End threads");
     187
     188    //    cout << " ------ FITSReaderTOI::PrintStatus() : ----- " << endl;
     189    //    r.PrintStatus(cout); 
     190    //    cout << "----- FITSWriterTOI::PrintStatus() : ----- " << endl;
     191    //    w.PrintStatus(cout); 
     192
    182193    cout << " ------ toi and toi2 Status information ------- " << endl;
    183194    cout << *toi;
     
    185196  }
    186197  catch (PThrowable & exc) {
    187     cerr << "rztsttoi: Catched Exception \n" << (string)typeid(exc).name()
     198    cerr << "\nrztsttoi: Catched Exception \n" << (string)typeid(exc).name()
    188199         << " - Msg= " << exc.Msg() << endl;
    189200  }
     201  catch (const std::exception & sex) {
     202    cerr << "\nrztsttoi: Catched std::exception \n"
     203         << (string)typeid(sex).name() << endl;
     204  }
    190205  catch (...) {
    191     cerr << "rztsttoi: some other exception was caught ! " << endl;
     206    cerr << "\nrztsttoi: some other exception was caught ! " << endl;
    192207  }
    193208
Note: See TracChangeset for help on using the changeset viewer.