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

Last change on this file since 974 was 974, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 1.6 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 Int_t fRange;
35
36 TClonesArray *fPixels;
37
38 Float_t fMinPhe; // The minimal number of Phe
39 Float_t fMaxPhe; // The maximum number of Phe
40
41 TClonesArray *fLegend;
42 TClonesArray *fLegText;
43
44 TVirtualPad *fDrawingPad;
45
46 TBox *GetBox(Int_t i) { return (TBox*) fLegend->At(i); }
47 TText *GetText(Int_t i) { return (TText*)fLegText->At(i); }
48
49 void SetPixColor(const MCerPhotPix &pix)
50 {
51 (*this)[pix.GetPixId()].SetFillColor( GetColor(pix.GetNumPhotons()));
52 }
53
54 MHexagon &operator[](int i) { return *((MHexagon*)fPixels->At(i)); }
55
56 Int_t GetColor(Float_t wert);
57
58 void UpdateLegend();
59
60public:
61 MCamDisplay(MGeomCam *geom);
62 ~MCamDisplay();
63
64 void Draw(Option_t *option = "");
65
66 void DrawPhotNum(const MCerPhotEvt *event);
67 void DrawPhotErr(const MCerPhotEvt *event);
68
69 void Reset();
70
71 void SetAutoScale(Bool_t input = kTRUE)
72 {
73 fAutoScale = input;
74 }
75
76 ClassDef(MCamDisplay, 0) // Displays the magic camera
77};
78
79#endif
Note: See TracBrowser for help on using the repository browser.