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
Line 
1// toiiter.h
2// Eric Aubourg CEA/DAPNIA/SPP juillet 1999
3
4#ifndef TOIITER_H
5#define TOIITER_H
6
7
8#include <vector>
9#include <set>
10#include <map>
11#include <string>
12#include "archeopsfile.h"
13#include "auxgps.h"
14
15enum TOIKind {
16 sampleNum, // Numero d''echantillon (timer interne transputer)
17 internalTime, // temps transputer depuis debut manip, en secondes.
18 mjd, // UTC (en jours, MJD = JD - 2450000). index=0 : premier bloc GPS. 1: + sioux.
19 boloTens, // tension en microVolts, filtree avec filtre carre indexe par bolometre
20 boloRaw, // tension brute, non filtree indexe par bolometre
21 boloTemp, // Kelvins
22 sstDiode, // signal brut SST, indice = diode, 0-45
23 sstChannel, // signal brut SST, indice = canal, 0-47
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
28 longitude, // position ballon
29 latitude, // position ballon
30 altitude, // position ballon
31 tsid, // temps sideral en secondes
32 azimut, // a preciser, reconstruit SST, magneto, autres...
33 alphaAxis, //
34 deltaAxis, //
35 alphaSst, //
36 deltaSst, //
37 alphaBolo, // sur le ciel, indexe par bolometre
38 deltaBolo // sur le ciel, indexe par bolometre
39};
40
41class TOIInterpolator;
42
43class TOIIter {
44public:
45 TOIIter(TOIIter const&); // $CHECK$ prevoir operator = ?
46 ~TOIIter();
47 bool Next();
48
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 ?
54 bool isTrig(int column);
55 TOIKind getKind(int column);
56 int getIndex(int column); // si plusieurs, exemple, tension bolo 2
57
58 bool canGetTOI(TOIKind kind, int index=0);
59 double getTOI(TOIKind kind, int index=0);
60
61
62 int getBlockSampleIndex(); // numero d''echantillon dans dernier bloc bolo
63 int getSampleIndex(); // numero d''echantillon
64 double getMJD();
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();
80
81 ArcheopsFile* currentFile() {return file;}
82
83protected:
84 TOIIter();
85 void Init(); // After setting the options, opens the first file.
86 void ScanFiles(); // Parcourt tous les fichiers, cherche le premier echantillon...
87
88 bool NextSample(); // no test of trange
89 bool NextFile();
90
91 ArcheopsFile* file;
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
95 set<string>::iterator curFile;
96 bool isOnBoardRecorder;
97
98 int imes;
99
100 double tStart, tEnd;
101
102 double tBlock0; // MJD du bloc numero zero...
103 double perEch; // periode d''echantillonage en secondes
104
105 struct info {
106 TOIKind kind;
107 int index;
108 bool triggering;
109 bool interpolated;
110 };
111
112 int getColTOI(TOIKind kind, int index=0);
113
114 long trigMask;
115
116 vector<info> infos;
117
118 friend class TOISvr;
119
120 // Gestion de l''interpolation, par delegation a un autre iterateur
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;
127 bool fetchAhead(); // avance d''une TOI en nourrissant les interpolateurs
128
129 AuxGPS* auxGPS;
130
131 private:
132};
133
134#endif
Note: See TracBrowser for help on using the repository browser.