]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpDEVisu.h
The description of changes:
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpDEVisu.h
index 0553140b3f80c8ba40daaf71e88103c2648ba6ab..0920072604cf71ef3a87cd0e729108b1a257c60c 100644 (file)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 
-/// \ingroup graphics
+/// \ingroup mpgraphics
 /// \class  AliMpDEVisu
 /// \brief GUI for drawing detection element segmentation
 ///
 #define ALI_MP_DE_VISU_H
 
 #include <TGFrame.h>
+
 #include "AliMpPlaneType.h"
 
+#include <TArrayI.h>
+#include <TObjArray.h>
+
 class TObject;
 class TString;
-class TList;
-class TArrayI;
 class TRootEmbeddedCanvas;
 class TGComboBox;
 class TGMainFrame;
@@ -30,28 +32,36 @@ class AliMpSlat;
 class AliMpSector;
 class AliMpVSegmentation;
 class AliMpDDLStore;
+class AliMpManuStore;
 class TGTextEntry;
+class AliMpMotifPosition;
 
-class AliMpDEVisu : public TGFrame {
-
+class AliMpDEVisu : public TGFrame 
+{
 
 public:
     AliMpDEVisu(UInt_t w = 1200, UInt_t h = 600);
     virtual ~AliMpDEVisu();
 
 
+    void   UpdateComboCH();
     void   UpdateComboDE();
     Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
-    void   DrawDE();
+    void   DrawDE(Bool_t info = kTRUE);
+    void   NextDE();
     void   DrawManuMotif(Bool_t popup = kFALSE);
     void   DrawQuadrant(Option_t* option, Bool_t popup = kFALSE);
     void   DrawSlat(Option_t* option, Bool_t popup = kFALSE);
 
     void   ResetManu();
-    void   UpdateNameView();
+    void   UpdateNameView(Bool_t firstTime = kFALSE);
     void   PopUpManuMotif(AliMpSlat* slat);
     void   PopUpManuMotif(AliMpSector* sector);
+    void   PopUpZoom(Int_t ix0, Int_t iy0, Int_t ix1, Int_t iy1);
+    
+    void   ClosePopupWindow(Int_t id);
     void   InfoDE();
+    void   InfoManuMotif(AliMpMotifPosition* motifPos);
     void   DeletePopUp();
     void   SaveLogMessage();
     void   ClearLogMessage();
@@ -59,6 +69,16 @@ public:
     void   HandleMovement(Int_t eventType, Int_t eventX, Int_t eventY, TObject* select);
 
 private:
+    void EventToReal(Int_t eventX, Int_t eventY, Double_t& x, Double_t& y) const;
+    void CreatePopupWindow(Int_t w, Int_t h, const char* title,
+                           AliMpVPainter* painter,
+                           const char* option);
+    
+private:
+    /// Not implemented
+    AliMpDEVisu(const AliMpDEVisu& src);
+    /// Not implemented
+    AliMpDEVisu& operator=(const AliMpDEVisu& src);
 
     const TGWindow*    fkMainWindow; //!< main window
     TGMainFrame*       fMain;        //!< main frame
@@ -68,26 +88,29 @@ private:
     TGComboBox*    fDECombo;         //!< DE botton
     TGNumberEntry* fNumberEntry;     //!< manu id button
     TGCheckButton* fPlaneButton;     //!< check button for NB plane, defaultwise B plane
-    TGTextView*    fNameDEView;      //!< name of the DE
+    TGCheckButton* fZoomButton;      //!< check button to activate zoom mode, default wise disable
+    TGComboBox*    fNameDECombo;     //!< name of the DE
     TGTextView*    fLogMessage;      //!< log message
     TGTextEntry*   fLogFile;         //!< text entry for log file name
-    TList          fTrashList;       //!< list of transient windows to delete
+    TObjArray      fTrashList;       //!< list of transient windows to delete
 
     TArrayI        fDEComboIdx;      //!< array for index vs DE id
+    TString        fNameDEComboIdx[156];  //!< array for index vs DE names
+    TArrayI        fDEOccurrence;     //!< occurrence of DE
 
     AliMp::PlaneType fCurrentPlane;   //!< current plane type
     Int_t            fCurrentDetElem; //!< current DE
     TString          fCurrentDEName;  //!< current DE name
 
-    const AliMpVSegmentation* fSegmentation; //!< segmentation instance
-    AliMpDDLStore*            fDDLStore;     //!< DDL Store
+    const AliMpVSegmentation* fkSegmentation; //!< segmentation instance
+    AliMpDDLStore*            fDDLStore;      //!< DDL Store
+    AliMpManuStore*           fManuStore;     //!< Manu Store
 
-    enum {kChamberCombo, kDECombo, kPlaneType, kDEName, kManuEntries, kLogMessage};
+    Bool_t           fZoomMode;        //!< flag for zoom mode on canvas instead of click mode
 
+    enum {kChamberCombo, kDECombo, kPlaneType, kDEName, kManuEntries, kLogMessage, kZoomMode};
 
-    AliMpDEVisu(const AliMpDEVisu& src);
-    AliMpDEVisu& operator=(const AliMpDEVisu& src);
-
-    ClassDef(AliMpDEVisu,1)
+    ClassDef(AliMpDEVisu,1) //GUI for drawing detection element segmentation
 };
 #endif
+