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

Last change on this file since 1326 was 1325, checked in by tbretz, 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 Bool_t fIsAllocated;
41
42 TBox *GetBox(Int_t i) { return (TBox*) fLegend->At(i); }
43 TText *GetText(Int_t i) { return (TText*)fLegText->At(i); }
44
45 MHexagon &operator[](int i) { return *((MHexagon*)fPixels->At(i)); }
46
47 void SetPixColor(const MCerPhotPix &pix, const Int_t i);
48 Int_t GetColor(Float_t wert);
49
50 void UpdateLegend();
51 void Paint(Option_t *option="");
52
53public:
54 MCamDisplay(MGeomCam *geom);
55 ~MCamDisplay();
56
57 void SetAutoScale(Bool_t input=kTRUE) { fAutoScale = input; }
58 void DrawPhotNum(const MCerPhotEvt *event);
59
60 void Reset();
61 void Draw(Option_t *option="");
62 void SavePrimitive(ofstream &out, Option_t *);
63
64 ClassDef(MCamDisplay, 0) // Displays the magic camera
65};
66
67#endif
Note: See TracBrowser for help on using the repository browser.