source: Sophya/trunk/Poubelle/archTOI.old/ssthandler.h@ 393

Last change on this file since 393 was 350, checked in by ansari, 26 years ago

Gestion TRANGE, MJD0, PERECH....

File size: 1.8 KB
Line 
1// ssthandler.h
2// Eric Aubourg CEA/DAPNIA/SPP juillet 1999
3
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
12extern "C" {
13#include "archeops.h"
14}
15#endif
16
17
18class SSTHandler {
19public:
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*);
32
33 static void Has2Bars(bool, int elecOffset=0); // elecOffset : which wired together
34
35 int getRawSignal(int imesure, int idiode); // for last block
36 int getSignal(int imesure, int idiode); // for last block, imesure<0 -> history
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
39 long getLastBlkNum() {return lastBlkNum;}
40
41protected:
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;
48 int seuil;
49
50 static bool has2bars;
51 static int elecOffset;
52
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.
67
68 static int diodpermut[46]; // diodpermut[i] = channel de la diode i
69};
70
71#endif
Note: See TracBrowser for help on using the repository browser.