source: Sophya/trunk/ArchTOIPipe/Kernel/fitstoiwtr.h@ 1996

Last change on this file since 1996 was 1785, checked in by cecile, 24 years ago

Includes the possibility to write FITS files without SampleNum column
ex: FITSTOIWriter wtoi(outfile); wtoi.setImplicitSN();

File size: 1.1 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2
3// ArchTOIPipe (C) CEA/DAPNIA/SPP IN2P3/LAL
4// Eric Aubourg
5// Christophe Magneville
6// Reza Ansari
7// $Id: fitstoiwtr.h,v 1.11 2001-11-22 16:54:54 cecile Exp $
8
9
10#ifndef FITSTOIWTR_H
11#define FITSTOIWTR_H
12
13#include "toi.h"
14#include "toiprocessor.h"
15#include <string>
16#include <map>
17#include "fitsio.h"
18
19
20class FITSTOIWriter : public TOIProcessor {
21public:
22 FITSTOIWriter(string fn);
23 ~FITSTOIWriter();
24
25 void setImplicitSN();
26 virtual void afterinit();
27
28 virtual void addInput(string name, TOI* toi)
29 {addInput(name,toi,false);}
30 virtual void addInput(string name, TOI* toi, bool withFlag);
31
32 virtual void run();
33
34 inline int_8 ProcessedSampleCount() const { return totnscount; }
35
36private:
37 bool implicitSN;
38 string fname;
39 fitsfile *fptr;
40 int fstatus;
41 vector<TOI*> fwinputs;
42 int nCols;
43 map<int,pair<int, bool> > colsinput; // iTOI -> (colonne, hasflag)
44 // le flag est alors en colonne+1
45
46 int_8 totnscount; // Nombre total d'echantillon processe
47};
48
49#endif
Note: See TracBrowser for help on using the repository browser.