source: Sophya/trunk/ArchTOIPipe/ProcWSophya/simoffset.h@ 2000

Last change on this file since 2000 was 2000, checked in by ansari, 23 years ago

Corrections diverses et introduction d'une classe de calcul de ligne de
base par ajustement glissant d'un polynome (SimpleOffsetEstimator)
avec son programme test - Reza 14/5/2002

File size: 1.4 KB
Line 
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
8#ifndef SIMOFFSET_H
9#define SIMOFFSET_H
10
11#include "toiprocessor.h"
12#include "tvector.h"
13#include "poly.h"
14
15// ---- Calcul de ligne de base
16// Ajustement polynomial sur des echantillons moyennes
17//
18// Structure generale :
19//
20// -------------------------
21// toi in --> | | ---> out (toi = in_offset)
22// | SimpleOffsetEstimator | ---> offset (toi)
23// | | ---> Autres toi optionnel
24// | |
25// -------------------------
26
27class SimpleOffsetEstimator : public TOIProcessor {
28public:
29 SimpleOffsetEstimator(int mwsz=256, int nptfit=5, int degpol=2);
30 virtual ~SimpleOffsetEstimator();
31
32 virtual void init();
33 virtual void run();
34
35 inline int_8 ProcessedSampleCount() const { return totnscount; }
36
37 virtual void PrintStatus(::ostream & os) ; // const plus tard
38
39 inline void SavePolyNTuple(bool fg=false, string name="") { ntpoly = fg; ntpolyname=name; }
40protected:
41 int_8 totnscount; // Nombre total d'echantillon processe
42 int_8 totnbblock; // Nombre total de blocs
43 int mWSz;
44 int nPtFit;
45 Poly poly;
46 bool ntpoly;
47 string ntpolyname;
48};
49
50#endif
Note: See TracBrowser for help on using the repository browser.