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