]>
Commit | Line | Data |
---|---|---|
1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
4 | ||
5 | /// \ingroup mpgraphics | |
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 | ||
16 | #include "AliMpPlaneType.h" | |
17 | ||
18 | #include <TArrayI.h> | |
19 | #include <TObjArray.h> | |
20 | ||
21 | class TObject; | |
22 | class TString; | |
23 | class TRootEmbeddedCanvas; | |
24 | class TGComboBox; | |
25 | class TGMainFrame; | |
26 | class TGWindow; | |
27 | class AliMpVPainter; | |
28 | class TGNumberEntry; | |
29 | class TGCheckButton; | |
30 | class TGTextView; | |
31 | class AliMpSlat; | |
32 | class AliMpSector; | |
33 | class AliMpVSegmentation; | |
34 | class AliMpDDLStore; | |
35 | class AliMpManuStore; | |
36 | class TGTextEntry; | |
37 | class AliMpMotifPosition; | |
38 | ||
39 | class AliMpDEVisu : public TGFrame | |
40 | { | |
41 | ||
42 | public: | |
43 | AliMpDEVisu(UInt_t w = 1200, UInt_t h = 600); | |
44 | virtual ~AliMpDEVisu(); | |
45 | ||
46 | ||
47 | void UpdateComboCH(); | |
48 | void UpdateComboDE(); | |
49 | Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); | |
50 | void DrawDE(Bool_t info = kTRUE); | |
51 | void NextDE(); | |
52 | void DrawManuMotif(Bool_t popup = kFALSE); | |
53 | void DrawQuadrant(Option_t* option, Bool_t popup = kFALSE); | |
54 | void DrawSlat(Option_t* option, Bool_t popup = kFALSE); | |
55 | ||
56 | void ResetManu(); | |
57 | void UpdateNameView(Bool_t firstTime = kFALSE); | |
58 | void PopUpManuMotif(AliMpSlat* slat); | |
59 | void PopUpManuMotif(AliMpSector* sector); | |
60 | void PopUpZoom(Int_t ix0, Int_t iy0, Int_t ix1, Int_t iy1); | |
61 | ||
62 | void ClosePopupWindow(Int_t id); | |
63 | void InfoDE(); | |
64 | void InfoManuMotif(AliMpMotifPosition* motifPos); | |
65 | void DeletePopUp(); | |
66 | void SaveLogMessage(); | |
67 | void ClearLogMessage(); | |
68 | ||
69 | void HandleMovement(Int_t eventType, Int_t eventX, Int_t eventY, TObject* select); | |
70 | ||
71 | private: | |
72 | void EventToReal(Int_t eventX, Int_t eventY, Double_t& x, Double_t& y) const; | |
73 | void CreatePopupWindow(Int_t w, Int_t h, const char* title, | |
74 | AliMpVPainter* painter, | |
75 | const char* option); | |
76 | ||
77 | private: | |
78 | /// Not implemented | |
79 | AliMpDEVisu(const AliMpDEVisu& src); | |
80 | /// Not implemented | |
81 | AliMpDEVisu& operator=(const AliMpDEVisu& src); | |
82 | ||
83 | const TGWindow* fkMainWindow; //!< main window | |
84 | TGMainFrame* fMain; //!< main frame | |
85 | TRootEmbeddedCanvas* fEcanvas; //!< canvas for detection elt | |
86 | ||
87 | TGComboBox* fChamberCombo; //!< chamber botton | |
88 | TGComboBox* fDECombo; //!< DE botton | |
89 | TGNumberEntry* fNumberEntry; //!< manu id button | |
90 | TGCheckButton* fPlaneButton; //!< check button for NB plane, defaultwise B plane | |
91 | TGCheckButton* fZoomButton; //!< check button to activate zoom mode, default wise disable | |
92 | TGComboBox* fNameDECombo; //!< name of the DE | |
93 | TGTextView* fLogMessage; //!< log message | |
94 | TGTextEntry* fLogFile; //!< text entry for log file name | |
95 | TObjArray fTrashList; //!< list of transient windows to delete | |
96 | ||
97 | TArrayI fDEComboIdx; //!< array for index vs DE id | |
98 | TString fNameDEComboIdx[156]; //!< array for index vs DE names | |
99 | TArrayI fDEOccurrence; //!< occurrence of DE | |
100 | ||
101 | AliMp::PlaneType fCurrentPlane; //!< current plane type | |
102 | Int_t fCurrentDetElem; //!< current DE | |
103 | TString fCurrentDEName; //!< current DE name | |
104 | ||
105 | const AliMpVSegmentation* fSegmentation; //!< segmentation instance | |
106 | AliMpDDLStore* fDDLStore; //!< DDL Store | |
107 | AliMpManuStore* fManuStore; //!< Manu Store | |
108 | ||
109 | Bool_t fZoomMode; //!< flag for zoom mode on canvas instead of click mode | |
110 | ||
111 | enum {kChamberCombo, kDECombo, kPlaneType, kDEName, kManuEntries, kLogMessage, kZoomMode}; | |
112 | ||
113 | ClassDef(AliMpDEVisu,1) //GUI for drawing detection element segmentation | |
114 | }; | |
115 | #endif | |
116 |