| 1 | // archfileset.h
 | 
|---|
| 2 | // Eric Aubourg         CEA/DAPNIA/SPP   septembre 1999
 | 
|---|
| 3 | 
 | 
|---|
| 4 | #ifndef ARCHFILESET_H
 | 
|---|
| 5 | #define ARCHFILESET_H
 | 
|---|
| 6 | 
 | 
|---|
| 7 | #include "archeopsfile.h"
 | 
|---|
| 8 | 
 | 
|---|
| 9 | #include <set>
 | 
|---|
| 10 | #include <map>
 | 
|---|
| 11 | 
 | 
|---|
| 12 | using namespace std;
 | 
|---|
| 13 | 
 | 
|---|
| 14 | class TOILowLevProducer;
 | 
|---|
| 15 | 
 | 
|---|
| 16 | class ArchFileSet {
 | 
|---|
| 17 | public:
 | 
|---|
| 18 |   ArchFileSet();
 | 
|---|
| 19 |   ArchFileSet(ArchFileSet const&);
 | 
|---|
| 20 |   ~ArchFileSet();
 | 
|---|
| 21 |   
 | 
|---|
| 22 |   void addFile(string);
 | 
|---|
| 23 |   void addDirectory(string);
 | 
|---|
| 24 |   void setSNumRange(long start, long end);
 | 
|---|
| 25 |   void setMJDRange(double start, double end);
 | 
|---|
| 26 |   void init(); // Opens the first file.
 | 
|---|
| 27 |   bool next();
 | 
|---|
| 28 |   
 | 
|---|
| 29 |   block_type_param*         lastParam();  
 | 
|---|
| 30 |   block_type_journal*       lastJournal();
 | 
|---|
| 31 |   block_type_reglage*       lastReglage();
 | 
|---|
| 32 |   block_type_dilution*      lastDilution();
 | 
|---|
| 33 |   block_type_gps*           lastGPS();
 | 
|---|
| 34 |   block_type_une_periode*   lastUnePeriode();
 | 
|---|
| 35 |   block_type_synchro_sol*   lastSynchroSol();
 | 
|---|
| 36 |   block_type_pointage_sol*  lastPointageSol();
 | 
|---|
| 37 |   block_type_bolo*          lastBolo();   
 | 
|---|
| 38 |   block_type_gyro*          lastGyro();
 | 
|---|
| 39 |   block_type_sst*           lastSST();
 | 
|---|
| 40 |   block_type_bolo_comprime* lastBoloComp();   
 | 
|---|
| 41 |   block_type_gyro_comprime* lastGyroComp();
 | 
|---|
| 42 |   block_type_sst_comprime*  lastSSTComp();
 | 
|---|
| 43 |   
 | 
|---|
| 44 |   void   registerProducer(TOILowLevProducer*, int blk_kind);
 | 
|---|
| 45 |   long   getSampleIndex();             // numero d''echantillon 
 | 
|---|
| 46 |   double getMJD();            
 | 
|---|
| 47 | 
 | 
|---|
| 48 | protected:
 | 
|---|
| 49 |   set<string> filenames;
 | 
|---|
| 50 |   set<string> directories;
 | 
|---|
| 51 |   map<string, long> file1stSamp; // premier echantillon de chaque fichier
 | 
|---|
| 52 |   set<string>::iterator curFile;
 | 
|---|
| 53 |   ArcheopsFile* file;
 | 
|---|
| 54 |             
 | 
|---|
| 55 |   void scanFiles(); // Parcourt tous les fichiers, cherche le premier echantillon...
 | 
|---|
| 56 |   long nextSample(); // no test of trange
 | 
|---|
| 57 |   bool nextFile();
 | 
|---|
| 58 |   long sStart, sEnd;      // samplenum
 | 
|---|
| 59 |   double mjdStart, mjdEnd;    
 | 
|---|
| 60 |   long trigMask;
 | 
|---|
| 61 |   bool initDone;
 | 
|---|
| 62 |   bool endFound;
 | 
|---|
| 63 | };
 | 
|---|
| 64 | 
 | 
|---|
| 65 | #endif
 | 
|---|