DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
dd4hep::Display Class Reference

The main class of the DDEve display. More...

#include <Display.h>

Inheritance diagram for dd4hep::Display:
dd4hep::EventConsumer

Classes

struct  CalodataContext
 Calorimeter data context for the DDEve event display. More...
 

Public Types

typedef DisplayConfiguration::ViewConfig ViewConfig
 
typedef DisplayConfiguration::Config DataConfig
 
typedef std::set< View * > Views
 
typedef std::set< DisplayConfiguration * > Configurations
 
typedef std::set< PopupMenu * > Menus
 
typedef std::map< std::string, TEveElementList * > Topics
 
typedef std::map< std::string, ViewConfigViewConfigurations
 
typedef std::map< std::string, DataConfigDataConfigurations
 
typedef std::map< std::string, CalodataContextCalodata
 

Public Member Functions

 Display (TEveManager *eve)
 Standard constructor. More...
 
virtual ~Display ()
 Default destructor. More...
 
DetectordetectorDescription () const
 Access to geometry hub. More...
 
TEveManager & manager () const
 Access to the EVE manager. More...
 
const ViewConfigurationsviewConfigurations () const
 Access View configurations. More...
 
void setVisLevel (int new_level)
 Set Vis level in geo manager (either from XML or BEFORE XML file was loaded) More...
 
void setLoadLevel (int new_level)
 Set Eve Geometry load level in manager (either from XML or BEFORE XML file was loaded) More...
 
std::string getEventHandlerName ()
 Get Event Handler Plugin name. More...
 
void setEventHandlerName (const std::string &nam)
 Set Event Handler Plugin name. More...
 
TGClient & client () const
 Access to X-client. More...
 
void ChooseGeometry ()
 Load geometry with panel. More...
 
void LoadXML (const char *xmlFile)
 Load geometry from compact xml file. More...
 
void LoadGeometryRoot (const char *rootFile)
 Load geometry from compact xml file. More...
 
TFile * Open (const char *rootFile) const
 Open ROOT file. More...
 
GenericEventHandlereventHandler () const
 Access to the event reader. More...
 
void MessageBox (PrintLevel level, const std::string &text, const std::string &title="") const
 Open standard message box. More...
 
std::string OpenXmlFileDialog (const std::string &default_dir) const
 Popup XML file chooser. returns chosen file name; empty on cancel. More...
 
std::string OpenEventFileDialog (const std::string &default_dir) const
 Popup ROOT file chooser. returns chosen file name; empty on cancel. More...
 
void LoadGeoChildren (TEveElement *start, int levels, bool redraw)
 Load 'levels' Children into the geometry scene. More...
 
void MakeNodesVisible (TEveElement *e, bool visible, int level)
 Make a set of nodes starting from a top element (in-)visible with a given depth. More...
 
void ImportConfiguration (const DisplayConfiguration &config)
 Import configuration parameters. More...
 
const ViewConfigGetViewConfiguration (const std::string &name) const
 Access a data filter by name. Data filters are used to customize views. More...
 
const DataConfigGetCalodataConfiguration (const std::string &name) const
 Access a data filter by name. Data filters are used to customize views. More...
 
CalodataContextGetCaloHistogram (const std::string &name)
 Access to calo data histograms by name as defined in the configuration. More...
 
virtual void RegisterEvents (View *view)
 Register to the main event scene on new events. More...
 
virtual void UnregisterEvents (View *view)
 Unregister from the main event scene. More...
 
TEveElementListGetGeo ()
 Access / Create global geometry element. More...
 
virtual TEveElementListGetGeoTopic (const std::string &name)
 Access/Create an geometry topic by name. More...
 
virtual TEveElementListGetGeoTopic (const std::string &name) const
 Access/Create an geometry topic by name. Throws exception if the topic does not exist. More...
 
void ImportGeo (TEveElement *el)
 Call to import geometry elements. More...
 
void ImportGeo (const std::string &topic, TEveElement *el)
 Call to import geometry elements by topic. More...
 
virtual TEveElementListGetEveTopic (const std::string &name)
 Access/Create an event topic by name. More...
 
virtual TEveElementListGetEveTopic (const std::string &name) const
 Access/Create an event topic by name. Throws exception if the topic does not exist. More...
 
void ImportEvent (TEveElement *el)
 Call to import top level event elements. More...
 
void ImportEvent (const std::string &topic, TEveElement *el)
 Call to import event elements by topic. More...
 
virtual void OnFileOpen (EventHandler &handler) override
 Consumer overload: open file. More...
 
virtual void OnNewEvent (EventHandler &handler) override
 EventConsumer overload: Consumer event data. More...
 
virtual void BuildMenus (TGMenuBar *menuBar=0)
 Build the DDEve specific menues. Default bar is the ROOT browser's bar. More...
 
virtual void AddMenu (TGMenuBar *menuBar, PopupMenu *menu, int hints=kLHintsNormal)
 Add new menu to the main menu bar. More...
 
 ClassDefOverride (Display, 0)
 
- Public Member Functions inherited from dd4hep::EventConsumer
 EventConsumer ()=default
 Standard constructor. More...
 
virtual ~EventConsumer ()
 Default destructor. More...
 
 ClassDef (EventConsumer, 0)
 

Protected Attributes

TEveManager * m_eve = 0
 Reference to TEve manager. More...
 
Detectorm_detDesc = 0
 Reference to geometry hub. More...
 
GenericEventHandlerm_evtHandler = 0
 Reference to the event reader object. More...
 
TEveElementListm_geoGlobal = 0
 Geometry item element list. More...
 
TEveElementListm_eveGlobal = 0
 Event item element list. More...
 
ViewMenum_viewMenu
 Reference to the view menu. More...
 
DD4hepMenum_dd4Menu
 Reference to the specialized ddeve menu. More...
 
Topics m_geoTopics
 Geometry data topics. More...
 
Topics m_eveTopics
 Event data topics. More...
 
Views m_eveViews
 Container with configured event views. More...
 
Menus m_menus
 Container with top level menues. More...
 
ViewConfigurations m_viewConfigs
 Container with view configurations. More...
 
DataConfigurations m_calodataConfigs
 Container with calorimeter data display configurations. More...
 
DataConfigurations m_collectionsConfigs
 Container with non-calorimeter data display configurations. More...
 
Calodata m_calodata
 Container with calorimeter data (projections) More...
 
int m_visLevel
 TGeoManager visualisation level. More...
 
int m_loadLevel
 Load level for the eve geometry. More...
 
std::string m_eventHandlerName
 Name of the event handler plugin. More...
 

Detailed Description

The main class of the DDEve display.

Definition at line 56 of file Display.h.

Member Typedef Documentation

◆ Calodata

typedef std::map<std::string, CalodataContext> dd4hep::Display::Calodata

Definition at line 82 of file Display.h.

◆ Configurations

Definition at line 61 of file Display.h.

◆ DataConfig

Definition at line 59 of file Display.h.

◆ DataConfigurations

typedef std::map<std::string, DataConfig> dd4hep::Display::DataConfigurations

Definition at line 65 of file Display.h.

◆ Menus

typedef std::set<PopupMenu*> dd4hep::Display::Menus

Definition at line 62 of file Display.h.

◆ Topics

typedef std::map<std::string, TEveElementList*> dd4hep::Display::Topics

Definition at line 63 of file Display.h.

◆ ViewConfig

Definition at line 58 of file Display.h.

◆ ViewConfigurations

typedef std::map<std::string, ViewConfig> dd4hep::Display::ViewConfigurations

Definition at line 64 of file Display.h.

◆ Views

typedef std::set<View*> dd4hep::Display::Views

Definition at line 60 of file Display.h.

Constructor & Destructor Documentation

◆ Display()

Display::Display ( TEveManager *  eve)

Standard constructor.

Definition at line 88 of file Display.cpp.

◆ ~Display()

Display::~Display ( )
virtual

Default destructor.

Definition at line 111 of file Display.cpp.

Member Function Documentation

◆ AddMenu()

void Display::AddMenu ( TGMenuBar *  menuBar,
PopupMenu menu,
int  hints = kLHintsNormal 
)
virtual

Add new menu to the main menu bar.

Definition at line 176 of file Display.cpp.

◆ BuildMenus()

void Display::BuildMenus ( TGMenuBar *  menuBar = 0)
virtual

Build the DDEve specific menues. Default bar is the ROOT browser's bar.

Build the DDEve specific menues.

Definition at line 333 of file Display.cpp.

◆ ChooseGeometry()

void Display::ChooseGeometry ( )

Load geometry with panel.

Definition at line 153 of file Display.cpp.

◆ ClassDefOverride()

dd4hep::Display::ClassDefOverride ( Display  ,
 
)

◆ client()

TGClient & Display::client ( ) const

Access to X-client.

Definition at line 163 of file Display.cpp.

◆ detectorDescription()

Detector & Display::detectorDescription ( ) const

Access to geometry hub.

Definition at line 158 of file Display.cpp.

◆ eventHandler()

GenericEventHandler & Display::eventHandler ( ) const

Access to the event reader.

Definition at line 168 of file Display.cpp.

◆ GetCalodataConfiguration()

const Display::DataConfig * Display::GetCalodataConfiguration ( const std::string &  name) const

Access a data filter by name. Data filters are used to customize views.

Access a data filter by name. Data filters are used to customize calodatas.

Definition at line 253 of file Display.cpp.

◆ GetCaloHistogram()

Display::CalodataContext & Display::GetCaloHistogram ( const std::string &  name)

Access to calo data histograms by name as defined in the configuration.

Definition at line 196 of file Display.cpp.

◆ getEventHandlerName()

std::string dd4hep::Display::getEventHandlerName ( )
inline

Get Event Handler Plugin name.

Definition at line 139 of file Display.h.

◆ GetEveTopic() [1/2]

TEveElementList & Display::GetEveTopic ( const std::string &  name)
virtual

Access/Create an event topic by name.

Access/Create a topic by name.

Definition at line 486 of file Display.cpp.

◆ GetEveTopic() [2/2]

TEveElementList & Display::GetEveTopic ( const std::string &  name) const
virtual

Access/Create an event topic by name. Throws exception if the topic does not exist.

Access/Create a topic by name. Throws exception if the topic does not exist.

Definition at line 498 of file Display.cpp.

◆ GetGeo()

TEveElementList & Display::GetGeo ( )

Access / Create global geometry element.

Definition at line 456 of file Display.cpp.

◆ GetGeoTopic() [1/2]

TEveElementList & Display::GetGeoTopic ( const std::string &  name)
virtual

Access/Create an geometry topic by name.

Access/Create a topic by name.

Definition at line 465 of file Display.cpp.

◆ GetGeoTopic() [2/2]

TEveElementList & Display::GetGeoTopic ( const std::string &  name) const
virtual

Access/Create an geometry topic by name. Throws exception if the topic does not exist.

Access/Create a topic by name. Throws exception if the topic does not exist.

Definition at line 477 of file Display.cpp.

◆ GetViewConfiguration()

const Display::ViewConfig * Display::GetViewConfiguration ( const std::string &  name) const

Access a data filter by name. Data filters are used to customize views.

Definition at line 247 of file Display.cpp.

◆ ImportConfiguration()

void Display::ImportConfiguration ( const DisplayConfiguration config)

Import configuration parameters.

Definition at line 183 of file Display.cpp.

◆ ImportEvent() [1/2]

void Display::ImportEvent ( const std::string &  topic,
TEveElement *  el 
)

Call to import event elements by topic.

Definition at line 517 of file Display.cpp.

◆ ImportEvent() [2/2]

void Display::ImportEvent ( TEveElement *  el)

Call to import top level event elements.

Definition at line 522 of file Display.cpp.

◆ ImportGeo() [1/2]

void Display::ImportGeo ( const std::string &  topic,
TEveElement *  el 
)

Call to import geometry elements by topic.

Definition at line 512 of file Display.cpp.

◆ ImportGeo() [2/2]

void Display::ImportGeo ( TEveElement *  el)

Call to import geometry elements.

Definition at line 507 of file Display.cpp.

◆ LoadGeoChildren()

void Display::LoadGeoChildren ( TEveElement *  start,
int  levels,
bool  redraw 
)

Load 'levels' Children into the geometry scene.

Definition at line 527 of file Display.cpp.

◆ LoadGeometryRoot()

void Display::LoadGeometryRoot ( const char *  rootFile)

Load geometry from compact xml file.

Definition at line 148 of file Display.cpp.

◆ LoadXML()

void Display::LoadXML ( const char *  xmlFile)

Load geometry from compact xml file.

Definition at line 131 of file Display.cpp.

◆ MakeNodesVisible()

void Display::MakeNodesVisible ( TEveElement *  e,
bool  visible,
int  level 
)

Make a set of nodes starting from a top element (in-)visible with a given depth.

Definition at line 591 of file Display.cpp.

◆ manager()

TEveManager& dd4hep::Display::manager ( ) const
inline

Access to the EVE manager.

Definition at line 131 of file Display.h.

◆ MessageBox()

void Display::MessageBox ( PrintLevel  level,
const std::string &  text,
const std::string &  title = "" 
) const

Open standard message box.

Definition at line 272 of file Display.cpp.

◆ OnFileOpen()

void Display::OnFileOpen ( EventHandler handler)
overridevirtual

Consumer overload: open file.

Consumer event data.

Implements dd4hep::EventConsumer.

Definition at line 355 of file Display.cpp.

◆ OnNewEvent()

void Display::OnNewEvent ( EventHandler handler)
overridevirtual

EventConsumer overload: Consumer event data.

Consumer event data.

We absolutely want to import the particles as the last elements, otherwise they end up under the hits and are close to invisible

Implements dd4hep::EventConsumer.

Definition at line 359 of file Display.cpp.

◆ Open()

TFile * Display::Open ( const char *  rootFile) const

Open ROOT file.

Definition at line 348 of file Display.cpp.

◆ OpenEventFileDialog()

std::string Display::OpenEventFileDialog ( const std::string &  default_dir) const

Popup ROOT file chooser. returns chosen file name; empty on cancel.

Definition at line 313 of file Display.cpp.

◆ OpenXmlFileDialog()

std::string Display::OpenXmlFileDialog ( const std::string &  default_dir) const

Popup XML file chooser. returns chosen file name; empty on cancel.

Definition at line 292 of file Display.cpp.

◆ RegisterEvents()

void Display::RegisterEvents ( View view)
virtual

Register to the main event scene on new events.

Definition at line 259 of file Display.cpp.

◆ setEventHandlerName()

void dd4hep::Display::setEventHandlerName ( const std::string &  nam)
inline

Set Event Handler Plugin name.

Definition at line 141 of file Display.h.

◆ setLoadLevel()

void dd4hep::Display::setLoadLevel ( int  new_level)
inline

Set Eve Geometry load level in manager (either from XML or BEFORE XML file was loaded)

Definition at line 137 of file Display.h.

◆ setVisLevel()

void dd4hep::Display::setVisLevel ( int  new_level)
inline

Set Vis level in geo manager (either from XML or BEFORE XML file was loaded)

Definition at line 135 of file Display.h.

◆ UnregisterEvents()

void Display::UnregisterEvents ( View view)
virtual

Unregister from the main event scene.

Definition at line 264 of file Display.cpp.

◆ viewConfigurations()

const ViewConfigurations& dd4hep::Display::viewConfigurations ( ) const
inline

Access View configurations.

Definition at line 133 of file Display.h.

Member Data Documentation

◆ m_calodata

Calodata dd4hep::Display::m_calodata
protected

Container with calorimeter data (projections)

Definition at line 114 of file Display.h.

◆ m_calodataConfigs

DataConfigurations dd4hep::Display::m_calodataConfigs
protected

Container with calorimeter data display configurations.

Definition at line 110 of file Display.h.

◆ m_collectionsConfigs

DataConfigurations dd4hep::Display::m_collectionsConfigs
protected

Container with non-calorimeter data display configurations.

Definition at line 112 of file Display.h.

◆ m_dd4Menu

DD4hepMenu* dd4hep::Display::m_dd4Menu
protected

Reference to the specialized ddeve menu.

Definition at line 98 of file Display.h.

◆ m_detDesc

Detector* dd4hep::Display::m_detDesc = 0
protected

Reference to geometry hub.

Definition at line 88 of file Display.h.

◆ m_eve

TEveManager* dd4hep::Display::m_eve = 0
protected

Reference to TEve manager.

Definition at line 86 of file Display.h.

◆ m_eveGlobal

TEveElementList* dd4hep::Display::m_eveGlobal = 0
protected

Event item element list.

Definition at line 94 of file Display.h.

◆ m_eventHandlerName

std::string dd4hep::Display::m_eventHandlerName
protected

Name of the event handler plugin.

Definition at line 120 of file Display.h.

◆ m_eveTopics

Topics dd4hep::Display::m_eveTopics
protected

Event data topics.

Definition at line 102 of file Display.h.

◆ m_eveViews

Views dd4hep::Display::m_eveViews
protected

Container with configured event views.

Definition at line 104 of file Display.h.

◆ m_evtHandler

GenericEventHandler* dd4hep::Display::m_evtHandler = 0
protected

Reference to the event reader object.

Definition at line 90 of file Display.h.

◆ m_geoGlobal

TEveElementList* dd4hep::Display::m_geoGlobal = 0
protected

Geometry item element list.

Definition at line 92 of file Display.h.

◆ m_geoTopics

Topics dd4hep::Display::m_geoTopics
protected

Geometry data topics.

Definition at line 100 of file Display.h.

◆ m_loadLevel

int dd4hep::Display::m_loadLevel
protected

Load level for the eve geometry.

Definition at line 118 of file Display.h.

◆ m_menus

Menus dd4hep::Display::m_menus
protected

Container with top level menues.

Definition at line 106 of file Display.h.

◆ m_viewConfigs

ViewConfigurations dd4hep::Display::m_viewConfigs
protected

Container with view configurations.

Definition at line 108 of file Display.h.

◆ m_viewMenu

ViewMenu* dd4hep::Display::m_viewMenu
protected

Reference to the view menu.

Definition at line 96 of file Display.h.

◆ m_visLevel

int dd4hep::Display::m_visLevel
protected

TGeoManager visualisation level.

Definition at line 116 of file Display.h.


The documentation for this class was generated from the following files: