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