source: Sophya/trunk/ArchTOIPipe/Kernel/fitstoirdr.h@ 2336

Last change on this file since 2336 was 2206, checked in by aubourg, 23 years ago

cgr/manager

File size: 2.4 KB
RevLine 
[1365]1// This may look like C code, but it is really -*- C++ -*-
2
[1738]3// ArchTOIPipe (C) CEA/DAPNIA/SPP IN2P3/LAL
4// Eric Aubourg
5// Christophe Magneville
6// Reza Ansari
[2206]7// $Id: fitstoirdr.h,v 1.14 2002-10-07 14:23:02 aubourg Exp $
[1738]8
9
[1365]10#ifndef FITSTOIRDR_H
11#define FITSTOIRDR_H
12
[1793]13#include "config.h"
[1365]14#include "toiprocessor.h"
15#include <string>
[1793]16#include <vector>
[1765]17#include <map>
[1365]18#include "fitsio.h"
[2058]19#include "flagtoidef.h"
[1365]20
21class FITSTOIReader : public TOIProcessor {
22public:
[1994]23 FITSTOIReader(string fn,int buff_sz=1024);
[1365]24 ~FITSTOIReader();
[1480]25
[1994]26 void setImplicitSN(long snStart=0);
[1725]27
[1994]28 void setBufferSize(int buffsz=1024);
29 inline int getBufferSize() { return Buff_Sz; }
30
[1480]31 virtual void addFile(string fn);
32
[2058]33 // Methode rajoutee pour gerer les fichiers de flag de LevelS
34 // Reza 18/6/2002
35 // fn : Nom du fichier FITS,
36 // flags: Indique le nombre de colonne et la correspondence avec les
37 // flags d'ArchTOIPipe flags[0..N-1] ---> 1ere...Neme colonnes
38 virtual void setFlagFile(string fn, vector<FlagToiDef> flags);
39
[1365]40 virtual void init();
[1629]41 virtual void run();
42
43 inline int_8 ProcessedSampleCount() const { return totnscount; }
[2187]44 virtual void printLimits();
[1365]45
46protected:
47 virtual int calcMinOut();
48 virtual int calcMaxOut();
[2187]49
50 // ajout vf 31/07/2002
51 virtual bool checkSampleLimits(long& min, long& max, int pass);
52 virtual void calcSampleLimits(long& min, long& max);
[2206]53 virtual bool checkSampleLimits(int pass) {return TOIProcessor::checkSampleLimits(pass);}
[1365]54
[1480]55 virtual void run1();
[1717]56 virtual void run2();
[1480]57 virtual void openFile(string fn);
58
[1365]59private:
[1480]60 fitsfile* fptr;
61 int fstatus;
62 string fname; // current file
63 long nrows; // current file
64 int firstSn; // current file
[1717]65 int Buff_Sz; // buffer size
[1480]66
[1527]67 int ncols; // including flags. getNOut() is # of tois.
[2187]68
69 // supression de la redefinition vf 23/08/2002
70 //int snBegin; // first file
71 //int snEnd; // last file
[1725]72
73 bool implicitSN;
[1994]74 long implicitSNStart;
[1480]75
76 vector<string> allfn;
[1527]77 map<int,pair<int, bool> > colsinput; // iTOI -> (colonne, hasflag)
78 // le flag est alors en colonne+1
[1480]79
[1629]80 int_8 totnscount; // Nombre total d'echantillon processe
81
[2058]82 // Variables rajoutee pour gerer les fichiers de flag de LevelS (Reza 18/6/2002)
83 bool sepFlagfile;
84 string sepFlagFileName;
85 vector<FlagToiDef> sepFlagCols;
86 fitsfile* fptrflg;
87
[1365]88};
89
90#endif
Note: See TracBrowser for help on using the repository browser.