source: trunk/MagicSoft/Mars/mgui/MCamDisplay.h@ 1204

Last change on this file since 1204 was 1203, checked in by rkb, 23 years ago
*** empty log message ***
File size: 1.8 KB
Line 
1#ifndef MARS_MCamDisplay
2#define MARS_MCamDisplay
3
4#ifndef MARS_MAGIC
5#include "MAGIC.h"
6#endif
7#ifndef ROOT_TClonesArray
8#include <TClonesArray.h>
9#endif
10
11class TBox;
12class TText;
13class TVirtualPad;
14
15class MGeomCam;
16class MHexagon;
17class MCerPhotEvt;
18class MCerPhotPix;
19
20class MCamDisplay : public TObject
21{
22private:
23 MGeomCam *fGeomCam; // pointer to camera geometry
24
25 Bool_t fAutoScale; // indicating the autoscale function
26
27 UInt_t fNumPixels; // number of pixels in the present geometry
28 Float_t fRange; // the range in millimeters of the present geometry
29
30 Float_t fMinPhe; // The minimal number of Phe
31 Float_t fMaxPhe; // The maximum number of Phe
32
33 TClonesArray *fPixels; // array of all hexagons
34 TClonesArray *fLegend; // array of all color bars
35 TClonesArray *fLegText; // array of all texts
36
37 UInt_t fW; // Width of canvas
38 UInt_t fH; // Height of canvas
39 TVirtualPad *fDrawingPad; // pad in which we are drawing
40
41 TBox *GetBox(Int_t i) { return (TBox*) fLegend->At(i); }
42 TText *GetText(Int_t i) { return (TText*)fLegText->At(i); }
43
44 MHexagon &operator[](int i) { return *((MHexagon*)fPixels->At(i)); }
45
46 void SetPixColor(const MCerPhotPix &pix, const Int_t i);
47 Int_t GetColor(Float_t wert);
48
49 void UpdateLegend();
50 void Paint(Option_t *option="");
51
52public:
53 MCamDisplay(MGeomCam *geom);
54 ~MCamDisplay();
55
56 void SetAutoScale(Bool_t input=kTRUE) { fAutoScale = input; }
57 void DrawPhotNum(const MCerPhotEvt *event);
58
59 void Reset();
60 void Draw(Option_t *option="");
61 void SavePrimitive(ofstream &out, Option_t *);
62
63 ClassDef(MCamDisplay, 0) // Displays the magic camera
64};
65
66#endif
Note: See TracBrowser for help on using the repository browser.