source: Sophya/trunk/ArchTOIPipe/TestPipes/fits2piotoi.cc@ 4008

Last change on this file since 4008 was 2369, checked in by aubourg, 22 years ago

PIOlib I/O

File size: 748 bytes
Line 
1#include <string>
2#include <iostream>
3
4#include "toi.h"
5#include "toisegment.h"
6#include "toiprocessor.h"
7#include "fitstoirdr.h"
8#include "piotoiwtr.h"
9#include "toimanager.h"
10
11void usage() {
12 cout << "usage: fits2piotoi fits_file toiname group object begin end";
13 exit(-1);
14}
15
16
17int main(int argc, char** argv) {
18 if (argc != 7) usage();
19
20 string fitsfn = argv[1];
21 string toi = argv[2];
22 string group = argv[3];
23 string object = argv[4];
24 int begsn = atoi(argv[5]);
25 int endsn = atoi(argv[6]);
26
27 TOIManager* mgr = TOIManager::getManager();
28
29 FITSTOIReader rdr(fitsfn);
30 PIOTOIWriter wtr(group, object);
31
32 mgr->connect(rdr, toi, wtr, object);
33
34 rdr.setRequestedSample(begsn, endsn);
35
36 mgr->startAll();
37
38 mgr->waitForAll();
39
40}
Note: See TracBrowser for help on using the repository browser.