24 using namespace DD4hep;
32 display->RegisterEvents(v);
33 v->ConfigureGeometryFromInfo();
34 v->ConfigureEventFromInfo();
39 MultiView::MultiView(
Display* eve,
const string& nam) :
View(eve, nam)
51 TEveWindowSlot* new_slot;
55 TEveWindowPack *pack = ((TEveWindowSlot*)slot)->MakePack();
56 pack->SetElementName(
m_name.c_str());
57 pack->SetHorizontal();
58 pack->SetShowTitleBar(kFALSE);
61 pack = pack->NewSlot()->MakePack();
62 pack->SetShowTitleBar(kFALSE);
66 _V::const_iterator icfg = view_cfg.find(
m_name);
67 if ( icfg != view_cfg.end() ) {
68 const _C& c = (*icfg).second.subdetectors;
69 for(_C::const_iterator i = c.begin(); i!=c.end();++i) {
74 if ( panels.size()>0) {
76 string typ =
"DD4hep__"+cfg.
use;
77 v = PluginService::Create<View*>(typ.c_str(),
m_eve,cfg.
name.c_str());
80 v = PluginService::Create<View*>(
"DD4hep_DDEve_RhoZProjection",
m_eve,(
m_name+
" - RhoZ View").c_str());
82 (new_slot = pack->NewSlot())->MakeCurrent();
83 _build(
m_eve,v,new_slot);
86 if ( panels.size()>1) {
88 string typ =
"DD4hep__"+cfg.
use;
89 v = PluginService::Create<View*>(typ.c_str(),
m_eve,cfg.
name.c_str());
92 v = PluginService::Create<View*>(
"DD4hep_DDEve_RhoPhiProjection",
m_eve,(
m_name+
" - RPhi View").c_str());
94 (new_slot = pack->NewSlot())->MakeCurrent();
95 _build(
m_eve,v,new_slot);
#define DECLARE_VIEW_FACTORY(x)
std::string m_name
The name of the view.
ClassImp(MultiView) static void _build(Display *display
Import Geometry data.
std::vector< Config > Configurations
virtual View & Map(TEveWindow *slot)
Map the view view to the slot.
const ViewConfigurations & viewConfigurations() const
Access View configurations.
View TEveWindowSlot * slot
class View View.h DDEve/View.h
std::map< std::string, ViewConfig > ViewConfigurations
virtual View & CreateScenes()
Create the geometry and the event scene.
virtual ~MultiView()
Default destructor.
virtual View & Build(TEveWindow *slot)
Build the 3d view and map it to the given slot.
class MultiView MultiView.h DDEve/MultiView.h
The main class of the DDEve display.