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

Last change on this file since 1183 was 1023, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 1.7 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 Bool_t fAutoScale; // indicating the autoscale function
24
25 UInt_t fNumPixels; // number of pixels in the present geometry
26 Float_t fRange; // the range in millimeters of the present geometry
27
28 Float_t fMinPhe; // The minimal number of Phe
29 Float_t fMaxPhe; // The maximum number of Phe
30
31 TClonesArray *fPixels; // array of all hexagons
32 TClonesArray *fLegend; // array of all color bars
33 TClonesArray *fLegText; // array of all texts
34
35 UInt_t fW; // Width of canvas
36 UInt_t fH; // Height of canvas
37 TVirtualPad *fDrawingPad; // pad in which we are drawing
38
39 TBox *GetBox(Int_t i) { return (TBox*) fLegend->At(i); }
40 TText *GetText(Int_t i) { return (TText*)fLegText->At(i); }
41
42 MHexagon &operator[](int i) { return *((MHexagon*)fPixels->At(i)); }
43
44 void SetPixColor(const MCerPhotPix &pix);
45 Int_t GetColor(Float_t wert);
46
47 void UpdateLegend();
48 void Paint(Option_t *option="");
49
50public:
51 MCamDisplay(MGeomCam *geom);
52 ~MCamDisplay();
53
54 void SetAutoScale(Bool_t input=kTRUE) { fAutoScale = input; }
55 void DrawPhotNum(const MCerPhotEvt *event);
56
57 void Reset();
58 void Draw(Option_t *option="");
59 void SavePrimitive(ofstream &out, Option_t *);
60
61 ClassDef(MCamDisplay, 0) // Displays the magic camera
62};
63
64#endif
Note: See TracBrowser for help on using the repository browser.