[1733] | 1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
[1737] | 2 | #ifndef KTOIBAD_H
|
---|
| 3 | #define KTOIBAD_H
|
---|
[1733] | 4 |
|
---|
| 5 | #include "toiprocessor.h"
|
---|
| 6 | #include "flagtoidef.h"
|
---|
| 7 | #include "slinparbuff.h"
|
---|
| 8 |
|
---|
[1736] | 9 | //////////////////////////////////////////////////////
|
---|
| 10 | //-- Pour flagguer les samples hors dynamique
|
---|
| 11 | // toi BoloIn ---> |FlagOutOfRange| ---> toi BoloOut
|
---|
| 12 | //////////////////////////////////////////////////////
|
---|
| 13 | class FlagOutOfRange : public TOIProcessor {
|
---|
| 14 | public:
|
---|
| 15 | FlagOutOfRange(r_8 vmin,r_8 vmax,uint_8 flag=FlgToiOut);
|
---|
| 16 | virtual ~FlagOutOfRange();
|
---|
| 17 |
|
---|
| 18 | virtual void init(void);
|
---|
| 19 | virtual void run(void);
|
---|
| 20 |
|
---|
| 21 | //! Print
|
---|
[1762] | 22 | void Print(::ostream & os);
|
---|
[1736] | 23 | inline void Print(void) {Print(cout);}
|
---|
| 24 |
|
---|
| 25 | protected:
|
---|
| 26 | uint_8 flgBad;
|
---|
| 27 | r_8 VMin,VMax;
|
---|
| 28 | };
|
---|
| 29 |
|
---|
| 30 | //////////////////////////////////////////////////////
|
---|
[1733] | 31 | //-- Pour rechercher les glitches
|
---|
[1736] | 32 | // toi BoloIn ---> |FlagGlitch| ---> toi BoloOut
|
---|
| 33 | //////////////////////////////////////////////////////
|
---|
[1733] | 34 | class FlagGlitch : public TOIProcessor {
|
---|
| 35 | public:
|
---|
| 36 | FlagGlitch(uint_4 lg,uint_4 lm,r_8 nsg);
|
---|
| 37 | virtual ~FlagGlitch();
|
---|
| 38 |
|
---|
| 39 | virtual void init(void);
|
---|
| 40 | virtual void run(void);
|
---|
| 41 |
|
---|
| 42 | //! Ne pas traiter les sample deja flaggues par la valeur flag
|
---|
[1737] | 43 | inline void DoNotLookAt(uint_8 flag=FlgToiAll) {flgNotLookAt = flag;}
|
---|
[1733] | 44 | //! Flagguer les glitches avec la valeur flag
|
---|
| 45 | inline void SetFlag(uint_8 flag=FlgToiSpike) {flgGlitch = flag;}
|
---|
| 46 | //! Frequency to update SLinParBuff buffer
|
---|
[1737] | 47 | inline void SetBuffUpd(uint_4 bupd=1000) {BuffUpdate = bupd;}
|
---|
[1733] | 48 | //! Print
|
---|
[1762] | 49 | void Print(::ostream & os);
|
---|
[1733] | 50 | inline void Print(void) {Print(cout);}
|
---|
| 51 | //! Debugging print lp=ab
|
---|
| 52 | // a>0 ntuple entre snb,sne
|
---|
| 53 | // b>0 print general
|
---|
| 54 | // >1 print debug entre snb,sne
|
---|
| 55 | inline void SetDebug(int_4 lp,int_4 snb,int_4 sne)
|
---|
| 56 | {mLP=(lp>=0)?lp:0; mLPsnb=snb; mLPsne=sne;}
|
---|
| 57 |
|
---|
| 58 | protected:
|
---|
| 59 | int_4 mLP,mLPsnb,mLPsne;
|
---|
| 60 | uint_8 flgNotLookAt,flgGlitch;
|
---|
| 61 | r_8 NSCut;
|
---|
| 62 | uint_4 BuffUpdate;
|
---|
| 63 | uint_4 LGlitch,LSide;
|
---|
| 64 | };
|
---|
| 65 |
|
---|
[1736] | 66 | //////////////////////////////////////////////////////
|
---|
[1735] | 67 | //-- Pour flagguer les samples autour de samples deja flaggues
|
---|
[1736] | 68 | // Permet aussi de flagguer les samples ayant de mauvaises valeurs.
|
---|
| 69 | // toi BoloIn ---> |FlagAroundFlag| ---> toi BoloOut
|
---|
| 70 | //////////////////////////////////////////////////////
|
---|
| 71 | class FlagAroundFlag : public TOIProcessor {
|
---|
[1735] | 72 | public:
|
---|
[1736] | 73 | FlagAroundFlag(uint_4 lm,uint_8 flgs=FlgToiAll);
|
---|
| 74 | virtual ~FlagAroundFlag();
|
---|
[1735] | 75 |
|
---|
| 76 | virtual void init(void);
|
---|
| 77 | virtual void run(void);
|
---|
| 78 |
|
---|
| 79 | //! Flagguer les samples avec la valeur flag
|
---|
| 80 | inline void SetFlag(uint_8 flag=FlgToiAround) {flgAround = flag;}
|
---|
| 81 | //! Flagguer autour des samples ayant la valeur flag
|
---|
| 82 | inline void SetFlagAroundFlag(uint_8 flag=FlgToiAll) {flgSample = flag;}
|
---|
[1736] | 83 | //! Flagguer les samples hors limite
|
---|
| 84 | inline void SetLimits(r_8 vmin=1.,r_8 vmax=-1.,uint_8 flag=FlgToiOut)
|
---|
| 85 | {VMin=vmin; VMax=vmax; flgBad = flag;}
|
---|
[1735] | 86 | //! Print
|
---|
[1762] | 87 | void Print(::ostream & os);
|
---|
[1735] | 88 | inline void Print(void) {Print(cout);}
|
---|
| 89 |
|
---|
| 90 | protected:
|
---|
[1736] | 91 | uint_8 flgSample,flgAround,flgBad;
|
---|
[1735] | 92 | uint_4 LSide;
|
---|
[1736] | 93 | r_8 VMin,VMax;
|
---|
[1735] | 94 | };
|
---|
| 95 |
|
---|
[1733] | 96 | #endif
|
---|