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