DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
 

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,
ViewConfig
ViewConfigurations
 
typedef std::map< std::string,
DataConfig
DataConfigurations
 
typedef std::map< std::string,
CalodataContext
Calodata
 

Public Member Functions

 Display (TEveManager *eve)
 Standard constructor. More...
 
virtual ~Display ()
 Default destructor. More...
 
Geometry::LCDDlcdd () 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...
 
void setEventHandlerName (std::string eventHandlerName)
 Set Event Handler Plugin name. More...
 
std::string getEventHandlerName ()
 Get 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 OnNewEvent (EventHandler *handler)
 EventConsumer overload: Consumer event data. More...
 
virtual void BuildMenus (TGMenuBar *bar=0)
 Build the DDEve specific menues. Default bar is the ROOT browser's bar. More...
 
virtual void AddMenu (TGMenuBar *bar, PopupMenu *menu, int hints=kLHintsNormal)
 Add new menu to the main menu bar. More...
 
 ClassDef (Display, 0)
 
- Public Member Functions inherited from DD4hep::EventConsumer
 EventConsumer ()
 Standard constructor. More...
 
virtual ~EventConsumer ()
 Default destructor. More...
 
virtual void OnFileOpen (EventHandler *)
 Consumer file open callback. More...
 
 ClassDef (EventConsumer, 0)
 

Protected Attributes

TEveManager * m_eve
 Reference to TEve manager. More...
 
Geometry::LCDDm_lcdd
 Reference to geometry hub. More...
 
GenericEventHandlerm_evtHandler
 Reference to the event reader object. More...
 
TEveElementListm_geoGlobal
 
TEveElementListm_eveGlobal
 
ViewMenum_viewMenu
 
DD4hepMenum_dd4Menu
 
Topics m_geoTopics
 
Topics m_eveTopics
 
Views m_eveViews
 
Menus m_menus
 
ViewConfigurations m_viewConfigs
 
DataConfigurations m_calodataConfigs
 
DataConfigurations m_collectionsConfigs
 
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 57 of file Display.h.

Member Typedef Documentation

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

Definition at line 78 of file Display.h.

Definition at line 62 of file Display.h.

Definition at line 60 of file Display.h.

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

Definition at line 66 of file Display.h.

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

Definition at line 63 of file Display.h.

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

Definition at line 64 of file Display.h.

Definition at line 59 of file Display.h.

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

Definition at line 65 of file Display.h.

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

Definition at line 61 of file Display.h.

Constructor & Destructor Documentation

Display::Display ( TEveManager *  eve)
Display::~Display ( )
virtual

Member Function Documentation

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

Add new menu to the main menu bar.

Definition at line 197 of file Display.cpp.

References DD4hep::PopupMenu::Build(), m_eve, and m_menus.

Referenced by BuildMenus().

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

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

Build the DDEve specific menues.

Definition at line 354 of file Display.cpp.

References AddMenu(), m_dd4Menu, m_eve, m_viewConfigs, and m_viewMenu.

Referenced by Display(), and LoadXML().

void Display::ChooseGeometry ( )

Load geometry with panel.

Definition at line 174 of file Display.cpp.

References m_dd4Menu, and DD4hep::DD4hepMenu::OnLoadXML().

Referenced by ClassImp().

DD4hep::Display::ClassDef ( Display  ,
 
)
TGClient & Display::client ( ) const

Access to X-client.

Definition at line 184 of file Display.cpp.

Referenced by MessageBox(), OpenEventFileDialog(), and OpenXmlFileDialog().

GenericEventHandler & Display::eventHandler ( ) const

Access to the event reader.

Definition at line 189 of file Display.cpp.

References m_evtHandler.

Referenced by ClassImp(), GetCaloHistogram(), and OnNewEvent().

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 274 of file Display.cpp.

References m_calodataConfigs.

Display::CalodataContext & Display::GetCaloHistogram ( const std::string &  name)
std::string DD4hep::Display::getEventHandlerName ( )
inline

Get Event Handler Plugin name.

Definition at line 125 of file Display.h.

References m_eventHandlerName.

Referenced by ClassImp().

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

Access/Create an event topic by name.

Access/Create a topic by name.

Definition at line 492 of file Display.cpp.

References m_eveTopics, and manager().

Referenced by ImportEvent().

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 504 of file Display.cpp.

References m_eveTopics.

TEveElementList & Display::GetGeo ( )

Access / Create global geometry element.

Definition at line 462 of file Display.cpp.

References m_geoGlobal, and manager().

Referenced by GetGeoTopic(), and ImportGeo().

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

Access/Create an geometry topic by name.

Access/Create a topic by name.

Definition at line 471 of file Display.cpp.

References GetGeo(), and m_geoTopics.

Referenced by DD4hep::View::ConfigureGeometryFromGlobal(), DD4hep::View::GetGlobalGeometry(), ImportGeo(), and LoadGeoChildren().

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 483 of file Display.cpp.

References m_geoTopics.

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 268 of file Display.cpp.

References m_viewConfigs.

Referenced by DD4hep::View::View().

void Display::ImportConfiguration ( const DisplayConfiguration config)
void Display::ImportEvent ( TEveElement *  el)

Call to import top level event elements.

Definition at line 528 of file Display.cpp.

References manager().

Referenced by OnNewEvent().

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

Call to import event elements by topic.

Definition at line 523 of file Display.cpp.

References GetEveTopic().

void Display::ImportGeo ( TEveElement *  el)

Call to import geometry elements.

Definition at line 513 of file Display.cpp.

References GetGeo().

Referenced by GetCaloHistogram().

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

Call to import geometry elements by topic.

Definition at line 518 of file Display.cpp.

References GetGeoTopic().

Geometry::LCDD & Display::lcdd ( ) const
void Display::LoadGeoChildren ( TEveElement *  start,
int  levels,
bool  redraw 
)
void Display::LoadGeometryRoot ( const char *  rootFile)

Load geometry from compact xml file.

Definition at line 169 of file Display.cpp.

void Display::LoadXML ( const char *  xmlFile)
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 597 of file Display.cpp.

References DD4hep::Utilities::GetName(), DD4hep::INFO, DD4hep::Utilities::MakeNodesVisible(), manager(), and DD4hep::printout().

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

Open standard message box.

Definition at line 293 of file Display.cpp.

References client(), DD4hep::DEBUG, DD4hep::ERROR, DD4hep::FATAL, DD4hep::INFO, DD4hep::VERBOSE, and DD4hep::WARNING.

Referenced by ClassImp(), and LoadGeoChildren().

void Display::OnNewEvent ( EventHandler handler)
virtual
TFile * Display::Open ( const char *  rootFile) const

Open ROOT file.

Definition at line 369 of file Display.cpp.

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

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

Definition at line 334 of file Display.cpp.

References client().

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

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

Definition at line 313 of file Display.cpp.

References client().

void Display::RegisterEvents ( View view)
virtual

Register to the main event scene on new events.

Definition at line 280 of file Display.cpp.

References m_eveViews.

void DD4hep::Display::setEventHandlerName ( std::string  eventHandlerName)
inline

Set Event Handler Plugin name.

Definition at line 123 of file Display.h.

References m_eventHandlerName.

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 121 of file Display.h.

References m_loadLevel.

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 119 of file Display.h.

References m_visLevel.

void Display::UnregisterEvents ( View view)
virtual

Unregister from the main event scene.

Definition at line 285 of file Display.cpp.

References m_eveViews.

Referenced by DD4hep::View::~View().

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

Access View configurations.

Definition at line 117 of file Display.h.

References m_viewConfigs.

Referenced by DD4hep::MultiView::Build().

Member Data Documentation

Calodata DD4hep::Display::m_calodata
protected

Container with calorimeter data (projections)

Definition at line 99 of file Display.h.

Referenced by GetCaloHistogram(), and OnNewEvent().

DataConfigurations DD4hep::Display::m_calodataConfigs
protected

Definition at line 96 of file Display.h.

Referenced by GetCalodataConfiguration(), GetCaloHistogram(), and ImportConfiguration().

DataConfigurations DD4hep::Display::m_collectionsConfigs
protected

Definition at line 97 of file Display.h.

Referenced by ImportConfiguration(), and OnNewEvent().

DD4hepMenu* DD4hep::Display::m_dd4Menu
protected

Definition at line 90 of file Display.h.

Referenced by BuildMenus(), ChooseGeometry(), LoadXML(), and ~Display().

TEveManager* DD4hep::Display::m_eve
protected

Reference to TEve manager.

Definition at line 82 of file Display.h.

Referenced by AddMenu(), BuildMenus(), Display(), LoadXML(), manager(), and ~Display().

TEveElementList* DD4hep::Display::m_eveGlobal
protected

Definition at line 88 of file Display.h.

Referenced by ~Display().

std::string DD4hep::Display::m_eventHandlerName
protected

Name of the event handler plugin.

Definition at line 105 of file Display.h.

Referenced by getEventHandlerName(), and setEventHandlerName().

Topics DD4hep::Display::m_eveTopics
protected

Definition at line 92 of file Display.h.

Referenced by GetEveTopic().

Views DD4hep::Display::m_eveViews
protected

Definition at line 93 of file Display.h.

Referenced by OnNewEvent(), RegisterEvents(), and UnregisterEvents().

GenericEventHandler* DD4hep::Display::m_evtHandler
protected

Reference to the event reader object.

Definition at line 86 of file Display.h.

Referenced by Display(), eventHandler(), and ~Display().

TEveElementList* DD4hep::Display::m_geoGlobal
protected

Definition at line 87 of file Display.h.

Referenced by GetGeo(), and ~Display().

Topics DD4hep::Display::m_geoTopics
protected

Definition at line 91 of file Display.h.

Referenced by GetGeoTopic(), and LoadXML().

Geometry::LCDD* DD4hep::Display::m_lcdd
protected

Reference to geometry hub.

Definition at line 84 of file Display.h.

Referenced by Display(), lcdd(), LoadGeoChildren(), LoadXML(), and ~Display().

int DD4hep::Display::m_loadLevel
protected

Load level for the eve geometry.

Definition at line 103 of file Display.h.

Referenced by LoadXML(), and setLoadLevel().

Menus DD4hep::Display::m_menus
protected

Definition at line 94 of file Display.h.

Referenced by AddMenu().

ViewConfigurations DD4hep::Display::m_viewConfigs
protected
ViewMenu* DD4hep::Display::m_viewMenu
protected

Definition at line 89 of file Display.h.

Referenced by BuildMenus(), and ~Display().

int DD4hep::Display::m_visLevel
protected

TGeoManager visualisation level.

Definition at line 101 of file Display.h.

Referenced by LoadXML(), and setVisLevel().


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