| 1 | // This may look like C code, but it is really -*- C++ -*-
|
|---|
| 2 |
|
|---|
| 3 | // ArchTOIPipe (C) CEA/DAPNIA/SPP IN2P3/LAL
|
|---|
| 4 | // Eric Aubourg
|
|---|
| 5 | // Christophe Magneville
|
|---|
| 6 | // Reza Ansari
|
|---|
| 7 | // $Id: toiregwindow.h,v 1.5 2001-11-14 14:49:05 aubourg Exp $
|
|---|
| 8 |
|
|---|
| 9 | #ifndef TOI_REGWINDOW_H
|
|---|
| 10 | #define TOI_REGWINDOW_H
|
|---|
| 11 |
|
|---|
| 12 | #include "config.h"
|
|---|
| 13 |
|
|---|
| 14 | #include <pthread.h>
|
|---|
| 15 | #include <vector>
|
|---|
| 16 | using namespace std;
|
|---|
| 17 | #include "toi.h"
|
|---|
| 18 |
|
|---|
| 19 | // Classe de TOI avec une fenetre glissante, et echantillonnage regulier.
|
|---|
| 20 | // Pour le moment au moins,
|
|---|
| 21 | // il faut que les providers fassent arriver les donnees par samplenum croissant.
|
|---|
| 22 | class TOIRegularWindow : public TOIRegular {
|
|---|
| 23 | public:
|
|---|
| 24 | TOIRegularWindow();
|
|---|
| 25 | TOIRegularWindow(string nm);
|
|---|
| 26 | virtual ~TOIRegularWindow();
|
|---|
| 27 |
|
|---|
| 28 | virtual DataStatus isDataAvailNL(int iStart, int iEnd);
|
|---|
| 29 | virtual DataStatus isDataAvailNL(int i); // override required
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 | //protected:
|
|---|
| 33 | vector<double> data;
|
|---|
| 34 | vector<long> flags;
|
|---|
| 35 | long i0;
|
|---|
| 36 | double defaultValue;
|
|---|
| 37 |
|
|---|
| 38 | #ifdef WITH_SOPHYA
|
|---|
| 39 | /* l'interface va etre modifiee, NE PAS UTILISER
|
|---|
| 40 | virtual Array doGetData(int iStart, int iEnd);
|
|---|
| 41 | virtual TArray<int_4> doGetFlag(int iStart, int iEnd);
|
|---|
| 42 | l'interface va etre modifiee, NE PAS UTILISER */
|
|---|
| 43 | #endif
|
|---|
| 44 | virtual void doGetData(int i, double & val, uint_8 & flg);
|
|---|
| 45 |
|
|---|
| 46 | virtual void doPutData(int i, double value, uint_8 flag=0);
|
|---|
| 47 | virtual void doWontNeedBefore(int i);
|
|---|
| 48 |
|
|---|
| 49 | virtual int nextDataAvail(int iAfter);
|
|---|
| 50 | virtual bool hasSomeData();
|
|---|
| 51 | };
|
|---|
| 52 |
|
|---|
| 53 | #endif
|
|---|