]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONTriggerGUIbdmap.h
new QA plot (nunmber of clusters/track/species) by AlexW
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerGUIbdmap.h
1 #ifndef ALIMUONTRIGGERGUIBDMAP_H
2 #define ALIMUONTRIGGERGUIBDMAP_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /// \ingroup evaluation
8 /// \class AliMUONTriggerGUIbdmap
9 /// \brief Trigger GUI utility class: single board map of the strips/digits
10 //  Author Bogdan Vulpescu, LPC Clermont-Ferrand
11
12 #include <TGFrame.h>
13
14 class TCanvas;
15 class TGCheckButton;
16 class TGTextEdit;
17 class TPolyLine;
18 class TBox;
19 class TPaveText;
20 class TObjArray;
21 class TH1F;
22 class TLatex;
23 class TGTableLayout;
24 class TGLabel;
25
26 class AliMUONTriggerGUIboard;
27 class AliMUONTriggerGUI;
28 class AliMUONTriggerCircuit;
29 class AliMUONTriggerCrateStore;
30 class AliMUONMCDataInterface;
31 class AliLoader;
32
33 class AliMUONTriggerGUIbdmap : public TGFrame
34 {
35
36 public:
37
38   AliMUONTriggerGUIbdmap(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h);
39   virtual ~AliMUONTriggerGUIbdmap();
40   
41   /// set the name of the board gui window
42   void SetName(const Char_t *name)         { fMain->SetWindowName(name); };
43   /// set the board associated to this instance
44   void SetBoard(AliMUONTriggerGUIboard *b) { fBoard = b; };  
45   /// set the board associated to this instance, from boards array and id
46   void SetBoard(TObjArray *boards, Int_t id) { 
47     fBoards = boards;
48     fBoard  = (AliMUONTriggerGUIboard*)boards->UncheckedAt(id); }
49   /// set the current muon loader
50   void SetLoader(AliLoader *loader)        { fLoader = loader; };
51   /// set the MC data interface
52   void SetMCDataInterface(AliMUONMCDataInterface *mc) { fMCDataInterface = mc; };
53   /// set the trigger boards manager
54   void SetCrateManager(AliMUONTriggerCrateStore *crates) { fCrateManager = crates; };
55
56   void Show();
57
58   void DrawStrips(Bool_t bx, Bool_t by);
59   void DrawDigits(Bool_t bx, Bool_t by);
60   void DrawClear();
61   void EditStrips(Int_t event, Int_t x, Int_t y, TObject *sel);
62
63   void Init();
64   void HandleButtons(Int_t id = -1);
65   void HandleEditButton();
66   void CloseWindow();
67   void DoClose();
68   void DoDigits();
69   void ResetDigits();
70   void LocalTriggerInfo();
71
72 private:
73   /// Not implemented
74   AliMUONTriggerGUIbdmap (const AliMUONTriggerGUIbdmap& bdmap);
75   /// Not implemented
76   AliMUONTriggerGUIbdmap& operator=(const AliMUONTriggerGUIbdmap& bdmap);
77
78
79   enum { kNBoards = 234, kNMT = 4, kNS = 16 };  ///< constants
80
81   TGTransientFrame     *fMain;             ///< Main board frame
82   TCanvas              *fCanvas[kNMT];     ///< MT canvases
83   TGTextEdit           *fLocTrigE;         ///< Window local trigger info
84
85   AliMUONTriggerGUIboard  *fBoard;           ///< Current board object
86   AliLoader               *fLoader;          ///< The MUON loader
87   AliMUONMCDataInterface  *fMCDataInterface; ///< MC data interface
88
89   TGCheckButton        *fXStrips;          ///< Draw x-strips and digits
90   TGCheckButton        *fYStrips;          ///< Draw y-strips and digits
91   TGCheckButton        *fEditStrips;       ///< Set/unset the strips
92
93   TPolyLine            *fXDigPL[kNMT][kNS];     ///< X-strip polyline 
94   TPolyLine            *fYDigPL[kNMT][kNS];     ///< Y-strip polyline
95   TBox                 *fXDigBox[kNMT][kNS];    ///< X-digit box
96   TBox                 *fYDigBox[kNMT][kNS];    ///< Y-digit box
97   TPaveText            *fXLabelL[kNMT][kNS];    ///< X-strip labels left
98   TPaveText            *fXLabelR[kNMT][kNS];    ///< X-strip labels right
99   TPaveText            *fYLabelL[kNMT][kNS];    ///< Y-strip labels left
100   TPaveText            *fYLabelR[kNMT][kNS];    ///< Y-strip labels right
101
102   Float_t               fXWidth[kNMT];     ///< Board x-width
103   Float_t               fYWidth[kNMT];     ///< Board y-width
104   Float_t               fXCenter[kNMT];    ///< Board x-center
105   Float_t               fYCenter[kNMT];    ///< Board y-center
106   
107   Bool_t                fXOn;              ///< x-strips/digits on canvas ?
108   Bool_t                fYOn;              ///< y-strips/digits on canvas ?
109   Bool_t                fLabelX;           ///< x-labels exist
110   Bool_t                fLabelY;           ///< y-labels exist
111   Bool_t                fIsEditable;       ///< allows set/unset the strips
112
113   UInt_t                fCanvasSize;       ///< Size of the canvas
114   Int_t                 fNStripX;          ///< Number of x-strips on board
115   Int_t                 fNStripY;          ///< Number of y-strips on board
116
117   TObjArray            *fBoards;           ///< Array with all boards
118
119   AliMUONCalibrationData *fCalibrationData;  ///< Pointer to calibration data
120   AliMUONTriggerCrateStore *fCrateManager;   ///< trigger boards manager
121
122   ClassDef(AliMUONTriggerGUIbdmap,1)       // board gui class
123
124 };
125
126 #endif