| Line |  | 
|---|
| 1 | #ifndef MARS_MImgCleanTime | 
|---|
| 2 | #define MARS_MImgCleanTime | 
|---|
| 3 |  | 
|---|
| 4 | #include <stdint.h> | 
|---|
| 5 | #include <list> | 
|---|
| 6 | #include <vector> | 
|---|
| 7 |  | 
|---|
| 8 | #ifndef MARS_MTask | 
|---|
| 9 | #include "MTask.h" | 
|---|
| 10 | #endif | 
|---|
| 11 |  | 
|---|
| 12 | class MGeom; | 
|---|
| 13 | class MGeomCam; | 
|---|
| 14 | class MSignalPix; | 
|---|
| 15 | class MSignalCam; | 
|---|
| 16 |  | 
|---|
| 17 | struct Island | 
|---|
| 18 | { | 
|---|
| 19 | uint16_t count; | 
|---|
| 20 | float size; | 
|---|
| 21 | float min; | 
|---|
| 22 | float max; | 
|---|
| 23 |  | 
|---|
| 24 | Island() : count(0) { } | 
|---|
| 25 | Island(float sz, float tm) : count(1), size(sz), min(tm), max(tm) { } | 
|---|
| 26 |  | 
|---|
| 27 | void operator+=(const Island &i) | 
|---|
| 28 | { | 
|---|
| 29 | count += i.count; | 
|---|
| 30 | size += i.size; | 
|---|
| 31 | if (i.min<min) | 
|---|
| 32 | min = i.min; | 
|---|
| 33 | if (i.max>max) | 
|---|
| 34 | max = i.max; | 
|---|
| 35 | } | 
|---|
| 36 | }; | 
|---|
| 37 |  | 
|---|
| 38 | class MImgCleanTime : public MTask | 
|---|
| 39 | { | 
|---|
| 40 | public: | 
|---|
| 41 | const MGeomCam   *fCam;  //! | 
|---|
| 42 | MSignalCam *fEvt;  //! | 
|---|
| 43 |  | 
|---|
| 44 | UInt_t  fMinCount; | 
|---|
| 45 | Float_t fMinSize; | 
|---|
| 46 | Float_t fDeltaT; | 
|---|
| 47 |  | 
|---|
| 48 | TString fNameSignalCam;  // name of the 'MSignalCam' container | 
|---|
| 49 |  | 
|---|
| 50 | std::vector<Island> fIslands; | 
|---|
| 51 | std::list<std::pair<uint16_t, uint16_t>> fContacts; | 
|---|
| 52 | std::vector<uint16_t> fLut; | 
|---|
| 53 |  | 
|---|
| 54 | Island CalcIsland(MSignalPix &, const MGeom &, const uint16_t &); | 
|---|
| 55 |  | 
|---|
| 56 | // MParContainer | 
|---|
| 57 | Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); | 
|---|
| 58 |  | 
|---|
| 59 | Int_t PreProcess(MParList *pList); | 
|---|
| 60 | Int_t Process(); | 
|---|
| 61 |  | 
|---|
| 62 | public: | 
|---|
| 63 | MImgCleanTime(const char *name=NULL, const char *title=NULL); | 
|---|
| 64 |  | 
|---|
| 65 | //void Print(Option_t *o="") const; | 
|---|
| 66 |  | 
|---|
| 67 | void SetMinCount(UInt_t sz)  { fMinCount=sz; } | 
|---|
| 68 | void SetMinSize(Float_t lvl) { fMinSize=lvl; } | 
|---|
| 69 | void SetDeltaT(Float_t dt)   { fDeltaT=dt; } | 
|---|
| 70 |  | 
|---|
| 71 | void SetNameSignalCam(const char *name) { fNameSignalCam = name; } | 
|---|
| 72 |  | 
|---|
| 73 | ClassDef(MImgCleanTime, 0) // task doing the image cleaning | 
|---|
| 74 | }; | 
|---|
| 75 |  | 
|---|
| 76 | #endif | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.