1 | #ifndef MARS_MCamDisplay
|
---|
2 | #define MARS_MCamDisplay
|
---|
3 |
|
---|
4 | #ifndef MARS_MAGIC
|
---|
5 | #include "MAGIC.h"
|
---|
6 | #endif
|
---|
7 | #ifndef ROOT_Gtypes
|
---|
8 | #include <Gtypes.h>
|
---|
9 | #endif
|
---|
10 | #ifndef ROOT_TArrayF
|
---|
11 | #include <TArrayF.h>
|
---|
12 | #endif
|
---|
13 | #ifndef ROOT_TArrayI
|
---|
14 | #include <TArrayI.h>
|
---|
15 | #endif
|
---|
16 | #ifndef ROOT_TClonesArray
|
---|
17 | #include <TClonesArray.h>
|
---|
18 | #endif
|
---|
19 |
|
---|
20 |
|
---|
21 | class TBox;
|
---|
22 | class TText;
|
---|
23 | class TArrow;
|
---|
24 |
|
---|
25 | class MGeomCam;
|
---|
26 | class MHexagon;
|
---|
27 | class MRflEvtData;
|
---|
28 | class MCurrents;
|
---|
29 | class MCerPhotEvt;
|
---|
30 | class MCerPhotPix;
|
---|
31 | class MImgCleanStd;
|
---|
32 | class MPedestalPix;
|
---|
33 | class MPedestalCam;
|
---|
34 |
|
---|
35 | class MCamDisplay : public TObject
|
---|
36 | {
|
---|
37 | private:
|
---|
38 | MGeomCam *fGeomCam; // pointer to camera geometry
|
---|
39 |
|
---|
40 | Bool_t fAutoScale; // indicating the autoscale function
|
---|
41 |
|
---|
42 | UInt_t fNumPixels; // number of pixels in the present geometry
|
---|
43 | Float_t fRange; // the range in millimeters of the present geometry
|
---|
44 |
|
---|
45 | TArrayI fColors;
|
---|
46 |
|
---|
47 | TArrow *fArrowX; // Coordinate System
|
---|
48 | TArrow *fArrowY; // Coordinate System
|
---|
49 |
|
---|
50 | TText *fLegRadius; // Coordinate System
|
---|
51 | TText *fLegDegree; // Coordinate System
|
---|
52 |
|
---|
53 | TClonesArray *fPixels; // array of all hexagons
|
---|
54 | TClonesArray *fLegend; // array of all color bars
|
---|
55 | TClonesArray *fLegText; // array of all texts
|
---|
56 | TClonesArray *fPhotons; // array of reflector photons
|
---|
57 |
|
---|
58 | TArrayF fData;
|
---|
59 | Float_t fMinimum;
|
---|
60 | Float_t fMaximum;
|
---|
61 |
|
---|
62 | TBox *GetBox(Int_t i) { return (TBox*) fLegend->At(i); }
|
---|
63 |
|
---|
64 | MHexagon &operator[](int i) { return *((MHexagon*)fPixels->At(i)); }
|
---|
65 |
|
---|
66 | Int_t GetColor(Float_t val, Float_t min, Float_t max, Bool_t islog);
|
---|
67 |
|
---|
68 | void Update(Bool_t islog);
|
---|
69 | void UpdateLegend(Float_t min, Float_t max, Bool_t islog);
|
---|
70 | void SetRange();
|
---|
71 | void SetPalette();
|
---|
72 |
|
---|
73 | enum {
|
---|
74 | kIsUsed = BIT(14)
|
---|
75 | };
|
---|
76 |
|
---|
77 | public:
|
---|
78 | MCamDisplay();
|
---|
79 | MCamDisplay(MGeomCam *geom);
|
---|
80 | ~MCamDisplay();
|
---|
81 |
|
---|
82 | void SetAutoScale(Bool_t input=kTRUE) { fAutoScale = input; }
|
---|
83 | void FillPhotNum(const MCerPhotEvt &event);
|
---|
84 | void FillRatio(const MCerPhotEvt &event);
|
---|
85 | void FillLevels(const MCerPhotEvt &event, Float_t lvl1, Float_t lvl2);
|
---|
86 | void FillErrorPhot(const MCerPhotEvt &event);
|
---|
87 | void FillLevels(const MCerPhotEvt &event, const MImgCleanStd &clean);
|
---|
88 | void FillPedestals(const MPedestalCam &event);
|
---|
89 | void FillRflEvent(const MRflEvtData &event);
|
---|
90 | void FillCurrents(const MCurrents &event);
|
---|
91 | void ShowRflEvent(const MRflEvtData *event=NULL, EMarkerStyle m=kFullDotMedium);
|
---|
92 |
|
---|
93 | void DrawPixelNumbers();
|
---|
94 |
|
---|
95 | void Paint(Option_t *option="");
|
---|
96 | void Reset();
|
---|
97 | void Draw(Option_t *option="");
|
---|
98 | void SavePrimitive(ofstream &out, Option_t *);
|
---|
99 | Int_t DistancetoPrimitive(Int_t px, Int_t py);
|
---|
100 | char *GetObjectInfo(Int_t px, Int_t py) const;
|
---|
101 | //virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
|
---|
102 |
|
---|
103 | void SetPalette(Int_t ncolors, Int_t *colors);
|
---|
104 |
|
---|
105 | void SetPrettyPalette(); // *MENU*
|
---|
106 | void SetDeepBlueSeaPalette(); // *MENU*
|
---|
107 | void SetInvDeepBlueSeaPalette(); // *MENU*
|
---|
108 |
|
---|
109 | void SetPix(const Int_t pixnum, const Int_t color, Float_t min, Float_t max); // New function added by M.Lopez in 31-01-03
|
---|
110 |
|
---|
111 | void SetMinimum(Float_t m) { fMinimum = m; }
|
---|
112 | void SetMaximum(Float_t m) { fMaximum = m; }
|
---|
113 |
|
---|
114 | ClassDef(MCamDisplay, 0) // Displays the magic camera
|
---|
115 | };
|
---|
116 |
|
---|
117 | #endif
|
---|