source: Sophya/trunk/Poubelle/archTOI.old/toiiter.h@ 358

Last change on this file since 358 was 358, checked in by ansari, 26 years ago

auxilliary GPS

File size: 4.3 KB
RevLine 
[350]1// toiiter.h
2// Eric Aubourg CEA/DAPNIA/SPP juillet 1999
3
[310]4#ifndef TOIITER_H
5#define TOIITER_H
6
7
8#include <vector>
9#include <set>
[350]10#include <map>
[310]11#include <string>
12#include "archeopsfile.h"
[358]13#include "auxgps.h"
[310]14
15enum TOIKind {
[342]16 sampleNum, // Numero d''echantillon (timer interne transputer)
[315]17 internalTime, // temps transputer depuis debut manip, en secondes.
[350]18 mjd, // UTC (en jours, MJD = JD - 2450000). index=0 : premier bloc GPS. 1: + sioux.
[310]19 boloTens, // tension en microVolts, filtree avec filtre carre indexe par bolometre
20 boloRaw, // tension brute, non filtree indexe par bolometre
[342]21 boloTemp, // Kelvins
[350]22 sstDiode, // signal brut SST, indice = diode, 0-45
23 sstChannel, // signal brut SST, indice = canal, 0-47
[342]24 sstStarZ, // numero de diode d''une eventuelle etoile, i=etoile 0..n
25 sstStarF, // flux d''une eventuelle etoile, <0 si moins de i+1 etoiles
26 gyroRaw, // valeur brute du gyro, index = 0,1,2
27 gpsTime, // temps fourni par GPS
[315]28 longitude, // position ballon
29 latitude, // position ballon
[342]30 altitude, // position ballon
[315]31 tsid, // temps sideral en secondes
[310]32 azimut, // a preciser, reconstruit SST, magneto, autres...
[315]33 alphaAxis, //
34 deltaAxis, //
[342]35 alphaSst, //
36 deltaSst, //
[315]37 alphaBolo, // sur le ciel, indexe par bolometre
38 deltaBolo // sur le ciel, indexe par bolometre
[310]39};
40
[315]41class TOIInterpolator;
[310]42
43class TOIIter {
44public:
[315]45 TOIIter(TOIIter const&); // $CHECK$ prevoir operator = ?
[310]46 ~TOIIter();
47 bool Next();
48
[315]49 bool canGetValue(int column); // data is available for that...
50 double getValue(int column);
51 bool newValue(int column); // a juste change ?
52 bool extendValue(int column); // une valeur plus ancienne, etendue ?
53 bool interpValue(int column); // une valeur interpolee avec valeur future ?
[342]54 bool isTrig(int column);
[310]55 TOIKind getKind(int column);
[315]56 int getIndex(int column); // si plusieurs, exemple, tension bolo 2
[310]57
[315]58 bool canGetTOI(TOIKind kind, int index=0);
59 double getTOI(TOIKind kind, int index=0);
60
61
[342]62 int getBlockSampleIndex(); // numero d''echantillon dans dernier bloc bolo
63 int getSampleIndex(); // numero d''echantillon
[358]64 double getMJD();
[310]65
66 block_type_param* lastParam();
67 block_type_journal* lastJournal();
68 block_type_reglage* lastReglage();
69 block_type_dilution* lastDilution();
70 block_type_gps* lastGPS();
71 block_type_une_periode* lastUnePeriode();
72 block_type_synchro_sol* lastSynchroSol();
73 block_type_pointage_sol* lastPointageSol();
74 block_type_bolo* lastBolo();
75 block_type_gyro* lastGyro();
76 block_type_sst* lastSST();
77 block_type_bolo_comprime* lastBoloComp();
78 block_type_gyro_comprime* lastGyroComp();
79 block_type_sst_comprime* lastSSTComp();
[342]80
81 ArcheopsFile* currentFile() {return file;}
[310]82
83protected:
84 TOIIter();
85 void Init(); // After setting the options, opens the first file.
[350]86 void ScanFiles(); // Parcourt tous les fichiers, cherche le premier echantillon...
[310]87
[350]88 bool NextSample(); // no test of trange
[310]89 bool NextFile();
90
91 ArcheopsFile* file;
[350]92 string directory; // If directory scanning
93 set<string> files; // list of files to be read...
94 map<string, long> file1stSamp; // premier echantillon de chaque fichier
[310]95 set<string>::iterator curFile;
[342]96 bool isOnBoardRecorder;
[310]97
98 int imes;
99
100 double tStart, tEnd;
101
102 double tBlock0; // MJD du bloc numero zero...
[342]103 double perEch; // periode d''echantillonage en secondes
[310]104
105 struct info {
106 TOIKind kind;
107 int index;
108 bool triggering;
109 bool interpolated;
110 };
111
[315]112 int getColTOI(TOIKind kind, int index=0);
113
[310]114 long trigMask;
115
116 vector<info> infos;
117
118 friend class TOISvr;
119
[342]120 // Gestion de l''interpolation, par delegation a un autre iterateur
[315]121 TOIIter* rawIter; // iterateur sans interpolation, qui avance avec retard
122 // en bufferisant les valeurs. S'il existe, on lui delegue
123 // toutes les operations agissant sur le fichier.
124 TOIInterpolator* interp; // interpolateurs pour stocker les valeurs
125 long lastSample; // last interpolated sample
126 long maxLookAhead;
[342]127 bool fetchAhead(); // avance d''une TOI en nourrissant les interpolateurs
[315]128
[358]129 AuxGPS* auxGPS;
130
[310]131 private:
132};
133
134#endif
Note: See TracBrowser for help on using the repository browser.