1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
2 | #ifndef TOI2MAP_H
|
---|
3 | #define TOI2MAP_H
|
---|
4 |
|
---|
5 | #include "toiprocessor.h"
|
---|
6 | #include "flagtoidef.h"
|
---|
7 | #include "slinparbuff.h"
|
---|
8 |
|
---|
9 | //-- Pour rechercher les glitches
|
---|
10 | // toi BoloIn ---> |FlagGlitch | ---> toi BoloOut
|
---|
11 | class FlagGlitch : public TOIProcessor {
|
---|
12 | public:
|
---|
13 | FlagGlitch(uint_4 lg,uint_4 lm,r_8 nsg);
|
---|
14 | virtual ~FlagGlitch();
|
---|
15 |
|
---|
16 | virtual void init(void);
|
---|
17 | virtual void run(void);
|
---|
18 |
|
---|
19 | //! Ne pas traiter les sample deja flaggues par la valeur flag
|
---|
20 | inline void DoNotLookAt(uint_8 flag=0) {flgNotLookAt = flag;}
|
---|
21 | //! Flagguer les glitches avec la valeur flag
|
---|
22 | inline void SetFlag(uint_8 flag=FlgToiSpike) {flgGlitch = flag;}
|
---|
23 | //! Frequency to update SLinParBuff buffer
|
---|
24 | void SetBuffUpd(uint_4 bupd=1000) {BuffUpdate = bupd;}
|
---|
25 | //! Print
|
---|
26 | void Print(ostream & os);
|
---|
27 | inline void Print(void) {Print(cout);}
|
---|
28 | //! Debugging print lp=ab
|
---|
29 | // a>0 ntuple entre snb,sne
|
---|
30 | // b>0 print general
|
---|
31 | // >1 print debug entre snb,sne
|
---|
32 | inline void SetDebug(int_4 lp,int_4 snb,int_4 sne)
|
---|
33 | {mLP=(lp>=0)?lp:0; mLPsnb=snb; mLPsne=sne;}
|
---|
34 |
|
---|
35 | protected:
|
---|
36 | int_4 mLP,mLPsnb,mLPsne;
|
---|
37 | uint_8 flgNotLookAt,flgGlitch;
|
---|
38 | r_8 NSCut;
|
---|
39 | uint_4 BuffUpdate;
|
---|
40 | uint_4 LGlitch,LSide;
|
---|
41 | SLinParBuff* Slpb[2];
|
---|
42 | };
|
---|
43 |
|
---|
44 | //-- Pour flagguer les samples autour de samples deja flaggues
|
---|
45 | // toi BoloIn ---> |FlagAround | ---> toi BoloOut
|
---|
46 | class FlagAround : public TOIProcessor {
|
---|
47 | public:
|
---|
48 | FlagAround(uint_4 lm,uint_8 flgs=FlgToiAll);
|
---|
49 | virtual ~FlagAround();
|
---|
50 |
|
---|
51 | virtual void init(void);
|
---|
52 | virtual void run(void);
|
---|
53 |
|
---|
54 | //! Flagguer les samples avec la valeur flag
|
---|
55 | inline void SetFlag(uint_8 flag=FlgToiAround) {flgAround = flag;}
|
---|
56 | //! Flagguer autour des samples ayant la valeur flag
|
---|
57 | inline void SetFlagAroundFlag(uint_8 flag=FlgToiAll) {flgSample = flag;}
|
---|
58 | //! Print
|
---|
59 | void Print(ostream & os);
|
---|
60 | inline void Print(void) {Print(cout);}
|
---|
61 |
|
---|
62 | protected:
|
---|
63 | uint_8 flgSample,flgAround;
|
---|
64 | uint_4 LSide;
|
---|
65 | };
|
---|
66 |
|
---|
67 | #endif
|
---|