![]() |
![]() |
DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep
Rev:Unversioneddirectory
|
The main class of the DDEve display. More...
#include <Display.h>
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::LCDD & | lcdd () const |
Access to geometry hub. More... | |
TEveManager & | manager () const |
Access to the EVE manager. More... | |
const ViewConfigurations & | viewConfigurations () 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... | |
GenericEventHandler & | eventHandler () 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 ViewConfig * | GetViewConfiguration (const std::string &name) const |
Access a data filter by name. Data filters are used to customize views. More... | |
const DataConfig * | GetCalodataConfiguration (const std::string &name) const |
Access a data filter by name. Data filters are used to customize views. More... | |
CalodataContext & | GetCaloHistogram (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... | |
TEveElementList & | GetGeo () |
Access / Create global geometry element. More... | |
virtual TEveElementList & | GetGeoTopic (const std::string &name) |
Access/Create an geometry topic by name. More... | |
virtual TEveElementList & | GetGeoTopic (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 TEveElementList & | GetEveTopic (const std::string &name) |
Access/Create an event topic by name. More... | |
virtual TEveElementList & | GetEveTopic (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) | |
![]() | |
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::LCDD * | m_lcdd |
Reference to geometry hub. More... | |
GenericEventHandler * | m_evtHandler |
Reference to the event reader object. More... | |
TEveElementList * | m_geoGlobal |
TEveElementList * | m_eveGlobal |
ViewMenu * | m_viewMenu |
DD4hepMenu * | m_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... | |
typedef std::map<std::string, CalodataContext> DD4hep::Display::Calodata |
typedef std::set<DisplayConfiguration*> DD4hep::Display::Configurations |
typedef std::map<std::string, DataConfig> DD4hep::Display::DataConfigurations |
typedef std::set<PopupMenu*> DD4hep::Display::Menus |
typedef std::map<std::string, TEveElementList*> DD4hep::Display::Topics |
typedef std::map<std::string, ViewConfig> DD4hep::Display::ViewConfigurations |
typedef std::set<View*> DD4hep::Display::Views |
Display::Display | ( | TEveManager * | eve | ) |
Standard constructor.
Definition at line 111 of file Display.cpp.
References DD4hep::Geometry::LCDD::addExtension(), dd4hep::bar, BuildMenus(), DD4hep::Geometry::LCDD::getInstance(), DD4hep::EvePgonSetProjectedContextMenu::install(), DD4hep::EveShapeContextMenu::install(), DD4hep::ElementListContextMenu::install(), m_eve, m_evtHandler, m_lcdd, and DD4hep::GenericEventHandler::Subscribe().
|
virtual |
Default destructor.
Definition at line 132 of file Display.cpp.
References DD4hep::deletePtr(), DD4hep::Geometry::LCDDData::destroyData(), m_dd4Menu, m_eve, m_eveGlobal, m_evtHandler, m_geoGlobal, m_lcdd, m_viewConfigs, m_viewMenu, and DD4hep::Geometry::LCDD::removeExtension().
|
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().
|
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.
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 | , |
0 | |||
) |
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 | ) |
Access to calo data histograms by name as defined in the configuration.
Definition at line 217 of file Display.cpp.
References DD4hep::Display::CalodataContext::calo3D, DD4hep::GenericEventHandler::collectionLoop(), DD4hep::DisplayConfiguration::Defaults::color, DD4hep::Display::CalodataContext::config, DD4hep::DisplayConfiguration::Calodata::dz, DD4hep::DisplayConfiguration::Calodata::eta_max, DD4hep::DisplayConfiguration::Calodata::eta_min, DD4hep::Display::CalodataContext::eveHist, eventHandler(), DD4hep::DisplayConfiguration::Config::hits, ImportGeo(), m_calodata, m_calodataConfigs, DD4hep::DisplayConfiguration::Calodata::n_eta, DD4hep::DisplayConfiguration::Calodata::n_phi, DD4hep::DisplayConfiguration::Config::name, DD4hep::DisplayConfiguration::Calodata::phi_max, DD4hep::DisplayConfiguration::Calodata::phi_min, DD4hep::DisplayConfiguration::Calodata::rmin, DD4hep::Display::CalodataContext::slice, DD4hep::DisplayConfiguration::Calodata::threshold, DD4hep::DisplayConfiguration::Calodata::towerH, and DD4hep::DisplayConfiguration::Config::use.
Referenced by DD4hep::View::ConfigureGeometry().
|
inline |
Get Event Handler Plugin name.
Definition at line 125 of file Display.h.
References m_eventHandlerName.
Referenced by ClassImp().
|
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().
|
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().
|
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().
|
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 | ) |
Import configuration parameters.
Definition at line 204 of file Display.cpp.
References DD4hep::DisplayConfiguration::calodata, DD4hep::DisplayConfiguration::collections, m_calodataConfigs, m_collectionsConfigs, m_viewConfigs, and DD4hep::DisplayConfiguration::views.
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 |
Access to geometry hub.
Definition at line 179 of file Display.cpp.
References m_lcdd.
Referenced by DD4hep::View::ConfigureEvent(), DD4hep::View::ConfigureGeometry(), DD4hep::View::CreateGeometry(), DD4hep::View::GetGlobalGeometry(), and LoadGeoChildren().
void Display::LoadGeoChildren | ( | TEveElement * | start, |
int | levels, | ||
bool | redraw | ||
) |
Load 'levels' Children into the geometry scene.
Definition at line 533 of file Display.cpp.
References DD4hep::Utilities::createEveShape(), e, DD4hep::Utilities::findNodeWithMatrix(), GetGeoTopic(), DD4hep::Utilities::GetName(), DD4hep::INFO, DD4hep::Handle< T >::isValid(), lcdd(), DD4hep::Utilities::LoadDetElement(), m_lcdd, manager(), MessageBox(), DD4hep::Handle< T >::name(), DD4hep::Geometry::DetElement::placement(), DD4hep::printout(), DD4hep::Handle< T >::ptr(), DD4hep::Geometry::LCDD::sensitiveDetector(), and DD4hep::Geometry::LCDD::world().
Referenced by LoadXML().
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 | ) |
Load geometry from compact xml file.
Definition at line 152 of file Display.cpp.
References BuildMenus(), DD4hep::Geometry::LCDD::fromXML(), LoadGeoChildren(), m_dd4Menu, m_eve, m_geoTopics, m_lcdd, m_loadLevel, m_visLevel, DD4hep::Geometry::LCDD::manager(), and DD4hep::DD4hepMenu::OnGeometryLoaded().
Referenced by ClassImp().
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().
|
inline |
Access to the EVE manager.
Definition at line 115 of file Display.h.
References m_eve.
Referenced by DD4hep::View::AddToGlobalItems(), DD4hep::View::ConfigureEvent(), DD4hep::View::ConfigureEventFromGlobal(), DD4hep::View::ConfigureGeometry(), DD4hep::View::CreateEventScene(), DD4hep::View::CreateGeoScene(), GetEveTopic(), GetGeo(), ImportEvent(), DD4hep::View::Initialize(), LoadGeoChildren(), MakeNodesVisible(), DD4hep::View::Map(), and OnNewEvent().
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().
|
virtual |
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
Reimplemented from DD4hep::EventConsumer.
Definition at line 376 of file Display.cpp.
References DD4hep::Display::CalodataContext::calo3D, DD4hep::EventHandler::CALO_HIT_COLLECTION, DD4hep::MCParticleCreator::close(), DD4hep::GenericEventHandler::collectionLoop(), DD4hep::EventHandler::collectionLoop(), DD4hep::EventHandler::collectionType(), DD4hep::Display::CalodataContext::config, DD4hep::EventHandler::data(), DD4hep::PointsetCreator::element(), DD4hep::BoxsetCreator::element(), DD4hep::ERROR, DD4hep::Display::CalodataContext::eveHist, eventHandler(), DD4hep::DisplayConfiguration::Config::hits, ImportEvent(), DD4hep::INFO, m_calodata, m_collectionsConfigs, m_eveViews, manager(), DD4hep::EventHandler::PARTICLE_COLLECTION, DD4hep::MCParticleCreator::particles, DD4hep::printout(), and DD4hep::EventHandler::TRACKER_HIT_COLLECTION.
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().
|
virtual |
Register to the main event scene on new events.
Definition at line 280 of file Display.cpp.
References m_eveViews.
|
inline |
Set Event Handler Plugin name.
Definition at line 123 of file Display.h.
References m_eventHandlerName.
|
inline |
|
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.
|
virtual |
Unregister from the main event scene.
Definition at line 285 of file Display.cpp.
References m_eveViews.
Referenced by DD4hep::View::~View().
|
inline |
Access View configurations.
Definition at line 117 of file Display.h.
References m_viewConfigs.
Referenced by DD4hep::MultiView::Build().
|
protected |
Container with calorimeter data (projections)
Definition at line 99 of file Display.h.
Referenced by GetCaloHistogram(), and OnNewEvent().
|
protected |
Definition at line 96 of file Display.h.
Referenced by GetCalodataConfiguration(), GetCaloHistogram(), and ImportConfiguration().
|
protected |
Definition at line 97 of file Display.h.
Referenced by ImportConfiguration(), and OnNewEvent().
|
protected |
Definition at line 90 of file Display.h.
Referenced by BuildMenus(), ChooseGeometry(), LoadXML(), and ~Display().
|
protected |
Reference to TEve manager.
Definition at line 82 of file Display.h.
Referenced by AddMenu(), BuildMenus(), Display(), LoadXML(), manager(), and ~Display().
|
protected |
Definition at line 88 of file Display.h.
Referenced by ~Display().
|
protected |
Name of the event handler plugin.
Definition at line 105 of file Display.h.
Referenced by getEventHandlerName(), and setEventHandlerName().
|
protected |
Definition at line 92 of file Display.h.
Referenced by GetEveTopic().
|
protected |
Definition at line 93 of file Display.h.
Referenced by OnNewEvent(), RegisterEvents(), and UnregisterEvents().
|
protected |
Reference to the event reader object.
Definition at line 86 of file Display.h.
Referenced by Display(), eventHandler(), and ~Display().
|
protected |
Definition at line 87 of file Display.h.
Referenced by GetGeo(), and ~Display().
|
protected |
Definition at line 91 of file Display.h.
Referenced by GetGeoTopic(), and LoadXML().
|
protected |
Reference to geometry hub.
Definition at line 84 of file Display.h.
Referenced by Display(), lcdd(), LoadGeoChildren(), LoadXML(), and ~Display().
|
protected |
Load level for the eve geometry.
Definition at line 103 of file Display.h.
Referenced by LoadXML(), and setLoadLevel().
|
protected |
|
protected |
Definition at line 95 of file Display.h.
Referenced by BuildMenus(), GetViewConfiguration(), ImportConfiguration(), viewConfigurations(), and ~Display().
|
protected |
Definition at line 89 of file Display.h.
Referenced by BuildMenus(), and ~Display().
|
protected |
TGeoManager visualisation level.
Definition at line 101 of file Display.h.
Referenced by LoadXML(), and setVisLevel().