]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpDEVisu.h
New GUI class for drawing detection element segmentation
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpDEVisu.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4
5 /// \ingroup graphics
6 /// \class  AliMpDEVisu
7 /// \brief GUI for drawing detection element segmentation
8 ///
9 /// \author Ch. Finck
10
11 #ifndef ALI_MP_DE_VISU_H
12 #define ALI_MP_DE_VISU_H
13
14 #include <TGFrame.h>
15 #include "AliMpPlaneType.h"
16
17 class TObject;
18 class TString;
19 class TList;
20 class TArrayI;
21 class TRootEmbeddedCanvas;
22 class TGComboBox;
23 class TGMainFrame;
24 class TGWindow;
25 class AliMpVPainter;
26 class TGNumberEntry;
27 class TGCheckButton;
28 class TGTextView;
29 class AliMpSlat;
30 class AliMpSector;
31 class AliMpVSegmentation;
32 class AliMpDDLStore;
33 class TGTextEntry;
34
35 class AliMpDEVisu : public TGFrame {
36
37
38 public:
39     AliMpDEVisu(UInt_t w = 1200, UInt_t h = 600);
40     virtual ~AliMpDEVisu();
41
42
43     void   UpdateComboDE();
44     Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
45     void   DrawDE();
46     void   DrawManuMotif(Bool_t popup = kFALSE);
47     void   DrawQuadrant(Option_t* option, Bool_t popup = kFALSE);
48     void   DrawSlat(Option_t* option, Bool_t popup = kFALSE);
49
50     void   ResetManu();
51     void   UpdateNameView();
52     void   PopUpManuMotif(AliMpSlat* slat);
53     void   PopUpManuMotif(AliMpSector* sector);
54     void   InfoDE();
55     void   DeletePopUp();
56     void   SaveLogMessage();
57     void   ClearLogMessage();
58
59     void   HandleMovement(Int_t eventType, Int_t eventX, Int_t eventY, TObject* select);
60
61 private:
62
63     const TGWindow*    fkMainWindow; //!< main window
64     TGMainFrame*       fMain;        //!< main frame
65     TRootEmbeddedCanvas* fEcanvas;   //!< canvas for detection elt
66
67     TGComboBox*    fChamberCombo;    //!< chamber botton 
68     TGComboBox*    fDECombo;         //!< DE botton
69     TGNumberEntry* fNumberEntry;     //!< manu id button
70     TGCheckButton* fPlaneButton;     //!< check button for NB plane, defaultwise B plane
71     TGTextView*    fNameDEView;      //!< name of the DE
72     TGTextView*    fLogMessage;      //!< log message
73     TGTextEntry*   fLogFile;         //!< text entry for log file name
74     TList          fTrashList;       //!< list of transient windows to delete
75
76     TArrayI        fDEComboIdx;      //!< array for index vs DE id
77
78     AliMp::PlaneType fCurrentPlane;   //!< current plane type
79     Int_t            fCurrentDetElem; //!< current DE
80     TString          fCurrentDEName;  //!< current DE name
81
82     const AliMpVSegmentation* fSegmentation; //!< segmentation instance
83     AliMpDDLStore*            fDDLStore;     //!< DDL Store
84
85     enum {kChamberCombo, kDECombo, kPlaneType, kDEName, kManuEntries, kLogMessage};
86
87
88     AliMpDEVisu(const AliMpDEVisu& src);
89     AliMpDEVisu& operator=(const AliMpDEVisu& src);
90
91     ClassDef(AliMpDEVisu,1)
92 };
93 #endif