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

Last change on this file since 770 was 715, checked in by tbretz, 24 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 TClonesArray;
23
24class MCerPhotEvt;
25class MGeomCam;
26
27class MCamDisplay : public TObject
28{
29 private:
30 Bool_t fAutoScale; // indicating the autoscale function
31
32 UInt_t fNumPixels;
33 TClonesArray *fPixels ;
34
35 Float_t fMinPhe; // The minimal number of Phe
36 Float_t fMaxPhe; // The maximum number of Phe
37
38 TClonesArray *fLegend;
39 TClonesArray *fLegText;
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 void SetPixColor(MCerPhotPix &pix)
45 {
46 (*this)[pix.GetPixId()].SetFillColor( GetColor(pix.GetNumPhotons()));
47 }
48
49public:
50
51 MCamDisplay (MGeomCam *geom);
52
53 ~MCamDisplay ();
54
55 void Init();
56
57 void Draw(Option_t *option = "" );
58
59 void DrawPhotNum( MCerPhotEvt *event);
60 void DrawPhotErr( MCerPhotEvt *event);
61
62 void Reset();
63
64 MHexagon &operator[](int i) { return *((MHexagon*)fPixels->At(i)); }
65
66 Int_t GetColor( Float_t wert );
67
68 void UpdateLegend();
69
70 void SetAutoScale (Bool_t input = kTRUE )
71 {
72 fAutoScale = input;
73 }
74
75 ClassDef(MCamDisplay, 0) // Display the magic camera
76};
77
78#endif
Note: See TracBrowser for help on using the repository browser.