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