[315] | 1 |
|
---|
| 2 | #include <iostream.h>
|
---|
| 3 | #include <fstream.h>
|
---|
| 4 | #include <iomanip.h>
|
---|
| 5 |
|
---|
| 6 | #include "archeopsfile.h"
|
---|
[342] | 7 | #include "archtoi.h"
|
---|
[315] | 8 | #include "toisvr.h"
|
---|
| 9 |
|
---|
| 10 | using namespace std; //introduces namespace std
|
---|
| 11 |
|
---|
| 12 | int main()
|
---|
| 13 | {
|
---|
[342] | 14 |
|
---|
| 15 | ArchTOI toi("test.toi");
|
---|
| 16 | toi.run("test.data");
|
---|
| 17 | return(0);
|
---|
| 18 |
|
---|
[315] | 19 | TOISvr svr;
|
---|
| 20 | //svr.SetFile("h99_04_29-15h36m22");
|
---|
[342] | 21 | //svr.SetFile("Stock:ARCHEOPS:DATA:arch_24:arch-99_06_08:h99_06_08-11h49m15");
|
---|
| 22 | svr.SetFile("Stock:ARCHEOPS:DATA:arch_26:arch-99_06_28:h99_06_28-11h23m41");
|
---|
| 23 | //svr.SetFile("/home/manip/mnt/planck/aubourg/h99_06_08-11h49m15");
|
---|
| 24 | //svr.SetDirectory("Stock:ARCHEOPS:DATA:arch_24:arch-99_06_08:");
|
---|
| 25 | //svr.SetDirectory("Stock:ARCHEOPS:DATA:arch_24");
|
---|
[315] | 26 | svr.AddInfo(sampleNum);
|
---|
| 27 | svr.AddInfo(internalTime);
|
---|
| 28 | svr.AddInfo(utc);
|
---|
| 29 | //svr.AddInfo(longitude);
|
---|
| 30 | svr.AddInfo(longitude, true, true);
|
---|
| 31 | svr.AddInfo(sstSignal,0);
|
---|
[342] | 32 | svr.AddInfo(sstStarZ,0);
|
---|
[315] | 33 | svr.AddInfo(boloTens,1);
|
---|
| 34 | svr.AddInfo(boloTens,2);
|
---|
| 35 |
|
---|
[342] | 36 | SSTHandler::Has2Bars(true,1);
|
---|
| 37 |
|
---|
[315] | 38 | TOIIter iter = svr.DoQuery();
|
---|
| 39 | ofstream of ("test.out");
|
---|
| 40 | while (iter.Next()) {
|
---|
| 41 | //if (iter.getValue(4) != 0 || iter.getValue(5) !=0 )
|
---|
| 42 | /* cout << iter.getValue(0) << " " << iter.getValue(1) << " " <<
|
---|
| 43 | setprecision(12) << iter.getValue(2) << " " <<
|
---|
| 44 | setprecision(7) << iter.getValue(3) << " " <<
|
---|
| 45 | setprecision(4) << iter.getValue(4) << " " <<
|
---|
| 46 | iter.getValue(5) << " " << iter.getValue(6) << "\n";*/
|
---|
[342] | 47 | // cout << iter.getValue(5) << endl;
|
---|
| 48 |
|
---|
[315] | 49 | cout << iter.getTOI(sampleNum) << " " << iter.getTOI(internalTime) << " " <<
|
---|
[342] | 50 | setprecision(12) << iter.getTOI(utc) << " " <<
|
---|
| 51 | setprecision(7) << iter.getTOI(longitude) << " " <<
|
---|
| 52 | setprecision(4) << iter.getTOI(sstSignal) << " " <<
|
---|
| 53 | iter.getTOI(sstStarZ) << " " <<
|
---|
| 54 | iter.getTOI(boloTens,1) << "\n";
|
---|
[315] | 55 | of << iter.getValue(0) << " " << iter.getValue(1) << " " <<
|
---|
| 56 | setprecision(12) << iter.getValue(2) << " " <<
|
---|
[342] | 57 | setprecision(7) << iter.getValue(3) << " " <<
|
---|
| 58 | setprecision(4) << iter.getValue(4) << " " <<
|
---|
| 59 | iter.getValue(5) << " " <<
|
---|
| 60 | iter.getValue(6) << "\n";
|
---|
[315] | 61 | }
|
---|
| 62 |
|
---|
| 63 | /*
|
---|
| 64 | int nblk[20];
|
---|
| 65 | for (int i=0; i<20; i++) nblk[i] = 0;
|
---|
| 66 | cout << "opening" << endl;
|
---|
| 67 | //ArcheopsFile file("Stock:ARCHEOPS:h99_04_29-15h36m22");
|
---|
| 68 | ArcheopsFile file("h99_04_29-15h36m22");
|
---|
| 69 | cout << file.getStartMJD() << endl;
|
---|
| 70 | cout << "reading" << endl;
|
---|
| 71 | while (file.nextBlock()) {
|
---|
| 72 | //cout << file.blockKdName() << " " << file.blockNum() << "\n";
|
---|
| 73 | nblk[file.blockKind()]++;
|
---|
| 74 | }
|
---|
| 75 | cout << "done" << endl;
|
---|
| 76 | for (int i=0; i<20; i++) cout << i <<" " << nblk[i] << endl;
|
---|
| 77 | */
|
---|
| 78 | }
|
---|
| 79 |
|
---|