| 1 | #ifndef SSTHANDLER_H
|
|---|
| 2 | #define SSTHANDLER_H
|
|---|
| 3 |
|
|---|
| 4 | #include <vector>
|
|---|
| 5 |
|
|---|
| 6 | #ifndef nb_max_bolo
|
|---|
| 7 | #define _archeops // Acquisition Archeops (avec transputer)
|
|---|
| 8 | #define programme
|
|---|
| 9 | extern "C" {
|
|---|
| 10 | #include "archeops.h"
|
|---|
| 11 | }
|
|---|
| 12 | #endif
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 | class SSTHandler {
|
|---|
| 16 | public:
|
|---|
| 17 | SSTHandler();
|
|---|
| 18 | SSTHandler(SSTHandler const&);
|
|---|
| 19 | SSTHandler& operator = (SSTHandler const&);
|
|---|
| 20 | virtual ~SSTHandler();
|
|---|
| 21 |
|
|---|
| 22 | enum process { rmveOffset = 1,
|
|---|
| 23 | findStars = 2,
|
|---|
| 24 | findPeriod = 4,
|
|---|
| 25 | findAxis = 8 };
|
|---|
| 26 |
|
|---|
| 27 | void NeedProcess(int prcMask);
|
|---|
| 28 | void ProcessBlock(block_type_sst*);
|
|---|
| 29 |
|
|---|
| 30 | static void Has2Bars(bool, int elecOffset=0); // elecOffset : which wired together
|
|---|
| 31 |
|
|---|
| 32 | int getRawSignal(int imesure, int idiode); // for last block
|
|---|
| 33 | int getSignal(int imesure, int idiode); // for last block, imesure<0 -> history
|
|---|
| 34 | int getStarZ(int imesure, int istar); // for last block, imesure<0 -> history
|
|---|
| 35 | int getStarF(int imesure, int istar); // for last block, imesure<0 -> history
|
|---|
| 36 | long getLastBlkNum() {return lastBlkNum;}
|
|---|
| 37 |
|
|---|
| 38 | protected:
|
|---|
| 39 | int diodeRaw[nb_per_block*2][48];
|
|---|
| 40 | int diodeHistLength;
|
|---|
| 41 | int* diodeT; //[>nb_per_block*2]*[nb_photo_diodes];
|
|---|
| 42 | int prcTodo;
|
|---|
| 43 | int starHistLength;
|
|---|
| 44 | long lastBlkNum;
|
|---|
| 45 | int seuil;
|
|---|
| 46 |
|
|---|
| 47 | static bool has2bars;
|
|---|
| 48 | static int elecOffset;
|
|---|
| 49 |
|
|---|
| 50 | inline int& diode(int iSamp, int iDiod) {return diodeT[iSamp*nb_photo_diodes+iDiod];}
|
|---|
| 51 |
|
|---|
| 52 | struct star {
|
|---|
| 53 | float z;
|
|---|
| 54 | float m;
|
|---|
| 55 | double t;
|
|---|
| 56 | };
|
|---|
| 57 |
|
|---|
| 58 | vector<star>* stars;
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 | void DecodeTMBlock(block_type_sst*, int i, int* diodes); // mesure i -> diodes
|
|---|
| 62 | void RemoveOffset(); // diodeRaw -> diode, avec decalage, 1 echantillon.
|
|---|
| 63 | void FindStars(); // sur les 72 derniers echantillons dans diode.
|
|---|
| 64 |
|
|---|
| 65 | static int diodpermut[46]; // diodpermut[i] = channel de la diode i
|
|---|
| 66 | };
|
|---|
| 67 |
|
|---|
| 68 | #endif
|
|---|