1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
7 /// \brief GUI for drawing detection element segmentation
11 #ifndef ALI_MP_DE_VISU_H
12 #define ALI_MP_DE_VISU_H
16 #include "AliMpPlaneType.h"
19 #include <TObjArray.h>
23 class TRootEmbeddedCanvas;
33 class AliMpVSegmentation;
36 class AliMpMotifPosition;
38 class AliMpDEVisu : public TGFrame
42 AliMpDEVisu(UInt_t w = 1200, UInt_t h = 600);
43 virtual ~AliMpDEVisu();
47 Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
48 void DrawDE(Bool_t info = kTRUE);
50 void DrawManuMotif(Bool_t popup = kFALSE);
51 void DrawQuadrant(Option_t* option, Bool_t popup = kFALSE);
52 void DrawSlat(Option_t* option, Bool_t popup = kFALSE);
55 void UpdateNameView();
56 void PopUpManuMotif(AliMpSlat* slat);
57 void PopUpManuMotif(AliMpSector* sector);
58 void PopUpZoom(Int_t ix0, Int_t iy0, Int_t ix1, Int_t iy1);
60 void ClosePopupWindow(Int_t id);
62 void InfoManuMotif(AliMpMotifPosition* motifPos);
64 void SaveLogMessage();
65 void ClearLogMessage();
67 void HandleMovement(Int_t eventType, Int_t eventX, Int_t eventY, TObject* select);
70 void EventToReal(Int_t eventX, Int_t eventY, Double_t& x, Double_t& y) const;
71 void CreatePopupWindow(Int_t w, Int_t h, const char* title,
72 AliMpVPainter* painter,
77 const TGWindow* fkMainWindow; //!< main window
78 TGMainFrame* fMain; //!< main frame
79 TRootEmbeddedCanvas* fEcanvas; //!< canvas for detection elt
81 TGComboBox* fChamberCombo; //!< chamber botton
82 TGComboBox* fDECombo; //!< DE botton
83 TGNumberEntry* fNumberEntry; //!< manu id button
84 TGCheckButton* fPlaneButton; //!< check button for NB plane, defaultwise B plane
85 TGCheckButton* fZoomButton; //!< check button to activate zoom mode, default wise disable
86 TGTextView* fNameDEView; //!< name of the DE
87 TGTextView* fLogMessage; //!< log message
88 TGTextEntry* fLogFile; //!< text entry for log file name
89 TObjArray fTrashList; //!< list of transient windows to delete
91 TArrayI fDEComboIdx; //!< array for index vs DE id
93 AliMp::PlaneType fCurrentPlane; //!< current plane type
94 Int_t fCurrentDetElem; //!< current DE
95 TString fCurrentDEName; //!< current DE name
97 const AliMpVSegmentation* fSegmentation; //!< segmentation instance
98 AliMpDDLStore* fDDLStore; //!< DDL Store
100 Bool_t fZoomMode; //!< flag for zoom mode on canvas instead of click mode
102 enum {kChamberCombo, kDECombo, kPlaneType, kDEName, kManuEntries, kLogMessage, kZoomMode};
104 AliMpDEVisu(const AliMpDEVisu& src);
105 AliMpDEVisu& operator=(const AliMpDEVisu& src);
107 ClassDef(AliMpDEVisu,1)