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