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

Last change on this file since 965 was 963, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 1.5 KB
Line 
1#ifndef MCAMDISPLAY_H
2#define MCAMDISPLAY_H
3
4#ifndef MAGIC_H
5#include "MAGIC.h"
6#endif
7#ifndef MHEXAGON_H
8#include "MHexagon.h"
9#endif
10#ifndef MCERPHOTPIX_H
11#include "MCerPhotPix.h"
12#endif
13#ifndef MCERPHOTEVT_H
14#include "MCerPhotEvt.h"
15#endif
16#ifndef ROOT_TClonesArray
17#include <TClonesArray.h>
18#endif
19
20class TBox;
21class TText;
22class TVirtualPad;
23class TClonesArray;
24
25class MCerPhotEvt;
26class MGeomCam;
27
28class MCamDisplay : public TObject
29{
30private:
31 Bool_t fAutoScale; // indicating the autoscale function
32
33 UInt_t fNumPixels;
34 TClonesArray *fPixels;
35
36 Float_t fMinPhe; // The minimal number of Phe
37 Float_t fMaxPhe; // The maximum number of Phe
38
39 TClonesArray *fLegend;
40 TClonesArray *fLegText;
41
42 TVirtualPad *fDrawingPad;
43
44 TBox *GetBox(Int_t i) { return (TBox*) fLegend->At(i); }
45 TText *GetText(Int_t i) { return (TText*)fLegText->At(i); }
46
47 void SetPixColor(MCerPhotPix &pix)
48 {
49 (*this)[pix.GetPixId()].SetFillColor( GetColor(pix.GetNumPhotons()));
50 }
51
52 MHexagon &operator[](int i) { return *((MHexagon*)fPixels->At(i)); }
53
54 Int_t GetColor(Float_t wert);
55
56 void UpdateLegend();
57
58public:
59 MCamDisplay(MGeomCam *geom);
60 ~MCamDisplay();
61
62 void Draw(Option_t *option = "");
63
64 void DrawPhotNum(const MCerPhotEvt *event);
65 void DrawPhotErr(const MCerPhotEvt *event);
66
67 void Reset();
68
69 void SetAutoScale(Bool_t input = kTRUE)
70 {
71 fAutoScale = input;
72 }
73
74 ClassDef(MCamDisplay, 0) // Displays the magic camera
75};
76
77#endif
Note: See TracBrowser for help on using the repository browser.