Line | |
---|
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 Has2Bars(bool, int elecOffset=0); // elecOffset : which wired together
|
---|
29 | void ProcessBlock(block_type_sst*);
|
---|
30 |
|
---|
31 | int getRawSignal(int imesure, int idiode); // for last block
|
---|
32 | int getSignal(int imesure, int idiode); // for last block, imesure<0 -> history
|
---|
33 | long getLastBlkNum() {return lastBlkNum;}
|
---|
34 |
|
---|
35 | protected:
|
---|
36 | int diodeRaw[nb_per_block*2][48];
|
---|
37 | int diodeHistLength;
|
---|
38 | int* diodeT; //[>nb_per_block*2]*[nb_photo_diodes];
|
---|
39 | int prcTodo;
|
---|
40 | int starHistLength;
|
---|
41 | bool has2bars;
|
---|
42 | int elecOffset;
|
---|
43 | long lastBlkNum;
|
---|
44 |
|
---|
45 | inline int& diode(int iSamp, int iDiod) {return diodeT[iSamp*nb_photo_diodes+iDiod];}
|
---|
46 |
|
---|
47 | struct star {
|
---|
48 | float z;
|
---|
49 | float m;
|
---|
50 | double t;
|
---|
51 | };
|
---|
52 |
|
---|
53 | vector<star>* stars;
|
---|
54 |
|
---|
55 |
|
---|
56 | void DecodeTMBlock(block_type_sst*, int i, int* diodes); // mesure i -> diodes
|
---|
57 | void RemoveOffset(); // diodeRaw -> diode, avec decalage, 1 echantillon.
|
---|
58 | void FindStars(); // sur les 72 derniers echantillons dans diode.
|
---|
59 | };
|
---|
60 |
|
---|
61 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.