Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:55:22

0001 //==========================================================================
0002 //  AIDA Detector description implementation 
0003 //--------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 // Author     : M.Frank
0011 //
0012 //==========================================================================
0013 #ifndef DDEVE_VIEWMENU_H
0014 #define DDEVE_VIEWMENU_H
0015 
0016 // Framework include files
0017 #include "DDEve/Display.h"
0018 #include "DDEve/PopupMenu.h"
0019 
0020 // Forward declarations
0021 class TGMenuBar;
0022 class TGMenuEntry;
0023 
0024 /// Namespace for the AIDA detector description toolkit
0025 namespace dd4hep {
0026 
0027   // Forward declarations
0028   class View;
0029 
0030   /// class ViewMenu  ViewMenu.h DDEve/ViewMenu.h
0031   /*
0032    *  \author  M.Frank
0033    *  \version 1.0
0034    *  \ingroup DD4HEP_EVE
0035    */
0036   class ViewMenu : public PopupMenu {
0037   public:
0038 
0039   protected:
0040     /// Reference to display manager
0041     Display* m_display;
0042     /// Menu title
0043     std::string m_title;
0044   public:
0045     /// Standard constructor
0046     ViewMenu(Display* eve, const std::string& title);
0047     /// Default destructor
0048     virtual ~ViewMenu();
0049 
0050     /// Add the menu to the menu bar
0051     virtual void Build(TGMenuBar* menuBar, int hints=kLHintsNormal)  override;
0052 
0053     /// Import Geometry data and build the view
0054     void BuildView(View *view)  const;
0055     /// Menu callback: Create a generic view using the user data
0056     void CreateView(TGMenuEntry* e, void* ud);
0057 
0058     /// Create a generic view of a given type with title
0059     View* CreateView(const std::string& type,const std::string& title);
0060     /// Specialization: Create a new 3D view
0061     View* CreateView3D(const std::string& title);
0062     /// Specialization: Create a new R-Z view
0063     View* CreateRhoZProjection(const std::string& title);
0064     /// Specialization: Create a new R-Phi view
0065     View* CreateRhoPhiProjection(const std::string& title);
0066 
0067     /// ROOT implementation macro
0068     ClassDefOverride(ViewMenu,0);
0069   };
0070 }      /* End namespace dd4hep    */
0071 #endif // DDEVE_VIEWMENU_H
0072