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