#include <Fireworks/Core/interface/FWGeometryTableView.h>
Description: [one line class summary]
Usage: <usage>
Definition at line 29 of file FWGeometryTableView.h.
Definition at line 34 of file FWGeometryTableView.h.
Definition at line 33 of file FWGeometryTableView.h.
{ kBBoxCenter, kBBoxSurface };
FWGeometryTableView::FWGeometryTableView | ( | TEveWindowSlot * | iParent, |
FWColorManager * | colMng | ||
) |
Definition at line 133 of file FWGeometryTableView.cc.
References FWEnumParameter::addEntry(), autoExpandCallback(), FWGeometryTableViewBase::cdTop(), FWGenericParameter< T >::changed_, checkRegionOfInterest(), FWGeometryTableViewManager::getGeoMangeur(), FWGUIValidatingTextEntry::getListBox(), kBBoxCenter, kBBoxSurface, kFilterMaterialName, kFilterMaterialTitle, kFilterShapeClassName, kFilterShapeName, kNode, kVolume, FWGeometryTableManager::loadGeometry(), FWGeometryTableViewBase::m_autoExpand, m_disableTopNode, FWGeometryTableViewBase::m_eveScene, FWGeometryTableViewBase::m_eveTopNode, FWGeoTopNodeGLScene::m_eveTopNode, m_filterEntry, m_filterType, m_filterTypeSetter, m_filterValidator, FWGeometryTableViewBase::m_frame, m_mode, m_proximityAlgo, m_regionRadius, FWGeoTopNode::m_scene, m_selectRegion, m_tableManager, FWGeometryTableViewBase::m_viewBox, m_visLevel, m_visLevelFilter, FWParameterSetterBase::makeSetterFor(), FWGeometryTableViewBase::postConst(), FWGeometryTableViewBase::refreshTable3D(), FWGUIValidatingTextEntry::setMaxListBoxHeight(), FWGUIValidatingTextEntry::setValidator(), and updateVisibilityTopNode().
: FWGeometryTableViewBase(iParent, FWViewType::kGeometryTable, colMng), m_tableManager(0), m_filterEntry(0), m_filterValidator(0), m_mode(this, "Mode", 0l, 0l, 1l), m_disableTopNode(this,"HideTopNode", true), m_visLevel(this,"VisLevel", 3l, 1l, 100l), m_filter(this,"Materials", std::string()), m_filterType(this,"FilterType:", 0l, 0l, 3l), m_visLevelFilter(this,"IgnoreVisLevelOnFilter", true), m_selectRegion(this, "SelectNearCameraCenter", false), m_regionRadius(this, "SphereRadius", 10.0, 1.0, 300.0), m_proximityAlgo(this, "Proximity algorithm", 1l, 0l, 1l) { FWGeoTopNodeGLScene *gls = new FWGeoTopNodeGLScene(0); #if ROOT_VERSION_CODE < ROOT_VERSION(5,32,0) m_eveScene = new FWGeoTopNodeEveScene(gls, "TopGeoNodeScene", ""); #else m_eveScene = new TEveScene(gls, "TopGeoNodeScene", ""); #endif gEve->GetScenes()->AddElement(m_eveScene); m_eveTopNode = new FWEveDetectorGeo(this); m_eveTopNode->IncDenyDestroy(); m_eveTopNode->SetPickable(true); m_eveScene->AddElement(m_eveTopNode); gls->m_eveTopNode = m_eveTopNode; m_eveTopNode->m_scene = gls; // top row TGHorizontalFrame *hp = new TGHorizontalFrame(m_frame); { TGTextButton *rb = new TGTextButton (hp, "CdTop"); hp->AddFrame(rb, new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0) ); rb->Connect("Clicked()","FWGeometryTableViewBase",this,"cdTop()"); } { TGTextButton *rb = new TGTextButton (hp, "CdUp"); hp->AddFrame(rb, new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0)); rb->Connect("Clicked()","FWGeometryTableViewBase",this,"cdUp()"); } { m_viewBox = new FWViewCombo(hp, this); hp->AddFrame( m_viewBox,new TGLayoutHints(kLHintsExpandY, 2, 2, 0, 0)); } { m_filterType.addEntry(kFilterMaterialName, "MaterialName"); m_filterType.addEntry(kFilterMaterialTitle, "MaterialTitle"); m_filterType.addEntry(kFilterShapeName, "ShapeName"); m_filterType.addEntry(kFilterShapeClassName, "ShapeClassName"); boost::shared_ptr<FWParameterSetterBase> ptr( FWParameterSetterBase::makeSetterFor((FWParameterBase*)&m_filterType) ); ptr->attach((FWParameterBase*)&m_filterType, this); TGFrame* pframe = ptr->build(hp, false); hp->AddFrame(pframe, new TGLayoutHints(kLHintsLeft)); m_filterTypeSetter.swap(ptr); } { hp->AddFrame(new TGLabel(hp, "FilterExp:"), new TGLayoutHints(kLHintsBottom, 0, 0, 0, 2)); m_filterEntry = new FWGUIValidatingTextEntry(hp); m_filterEntry->SetHeight(20); m_filterValidator = new FWGeoMaterialValidator(this); m_filterEntry->setValidator(m_filterValidator); hp->AddFrame(m_filterEntry, new TGLayoutHints(kLHintsExpandX, 0, 2, 1, 0)); m_filterEntry->setMaxListBoxHeight(150); m_filterEntry->getListBox()->Connect("Selected(int)", "FWGeometryTableView", this, "filterListCallback()"); m_filterEntry->Connect("ReturnPressed()", "FWGeometryTableView", this, "filterTextEntryCallback()"); gVirtualX->GrabKey( m_filterEntry->GetId(),gVirtualX->KeysymToKeycode((int)kKey_A), kKeyControlMask, true); } m_frame->AddFrame(hp,new TGLayoutHints(kLHintsLeft|kLHintsExpandX, 2, 2, 2, 0)); m_tableManager = new FWGeometryTableManager(this); { TEveGeoManagerHolder gmgr( FWGeometryTableViewManager::getGeoMangeur()); m_tableManager->loadGeometry( gGeoManager->GetTopNode(), gGeoManager->GetListOfVolumes()); } cdTop(); m_mode.addEntry(kNode, "Node"); m_mode.addEntry(kVolume, "Volume"); m_mode.changed_.connect(boost::bind(&FWGeometryTableView::refreshTable3D,this)); m_autoExpand.changed_.connect(boost::bind(&FWGeometryTableView::autoExpandCallback, this)); m_visLevel.changed_.connect(boost::bind(&FWGeometryTableView::refreshTable3D,this)); m_visLevelFilter.changed_.connect(boost::bind(&FWGeometryTableView::refreshTable3D,this)); m_disableTopNode.changed_.connect(boost::bind(&FWGeometryTableView::updateVisibilityTopNode,this)); postConst(); m_proximityAlgo.addEntry(kBBoxCenter, "BBox center"); m_proximityAlgo.addEntry(kBBoxSurface, "BBox surface"); m_selectRegion.changed_.connect(boost::bind(&FWGeometryTableView::checkRegionOfInterest,this)); m_regionRadius.changed_.connect(boost::bind(&FWGeometryTableView::checkRegionOfInterest,this)); m_proximityAlgo.changed_.connect(boost::bind(&FWGeometryTableView::checkRegionOfInterest,this)); }
FWGeometryTableView::~FWGeometryTableView | ( | ) | [virtual] |
Definition at line 238 of file FWGeometryTableView.cc.
{}
FWGeometryTableView::FWGeometryTableView | ( | const FWGeometryTableView & | ) | [private] |
void FWGeometryTableView::autoExpandCallback | ( | ) |
Definition at line 261 of file FWGeometryTableView.cc.
References FWGeometryTableViewBase::checkExpandLevel(), getTableManager(), FWGeometryTableViewBase::m_enableRedraw, and FWGeometryTableManagerBase::redrawTable().
Referenced by FWGeometryTableView().
{ if (!m_enableRedraw) return; checkExpandLevel(); getTableManager()->redrawTable(true); }
void FWGeometryTableView::checkRegionOfInterest | ( | ) |
Definition at line 367 of file FWGeometryTableView.cc.
References FWGeometryTableManager::checkRegionOfInterest(), fwLog, fwlog::kError, fwlog::kInfo, fwlog::kWarning, FWGeometryTableViewBase::m_eveTopNode, m_proximityAlgo, m_regionRadius, m_selectRegion, m_tableManager, FWGeometryTableViewBase::refreshTable3D(), FWGeometryTableManager::resetRegionOfInterest(), v, FWGenericParameter< T >::value(), and viewIsChecked().
Referenced by FWGeometryTableView().
{ if (m_selectRegion.value()) { double* center = 0; for (TEveElement::List_i it = gEve->GetViewers()->BeginChildren(); it != gEve->GetViewers()->EndChildren(); ++it) { TEveViewer* v = ((TEveViewer*)(*it)); if (viewIsChecked(v, m_eveTopNode)) { if (center) { fwLog(fwlog::kWarning) << "Center picked from first view \n"; } else { center = v->GetGLViewer()->CurrentCamera().GetCenterVec(); fwLog(fwlog::kInfo) << Form("Center picked (%.1f, %.1f, %.1f) from first selected 3D view \n", center[0], center[1], center[2]); } } } if (! center) { fwLog(fwlog::kError) << "No 3D view selected \n"; return; } m_tableManager->checkRegionOfInterest(center, m_regionRadius.value(), m_proximityAlgo.value()); } else { m_tableManager->resetRegionOfInterest(); } refreshTable3D(); }
FWGeometryTableView::ClassDef | ( | FWGeometryTableView | , |
0 | |||
) | [private] |
bool FWGeometryTableView::drawTopNode | ( | ) | const [inline] |
Definition at line 54 of file FWGeometryTableView.h.
References m_disableTopNode, and FWGenericParameter< T >::value().
Referenced by FWGeometryTableManager::loadGeometry().
{ return ! m_disableTopNode.value(); }
void FWGeometryTableView::filterListCallback | ( | ) |
Definition at line 277 of file FWGeometryTableView.cc.
References funct::exp(), m_filterEntry, AlCaHLTBitMon_QueryRunRegistry::string, and updateFilter().
{ // std::cout << "list click ed [" << m_filterEntry->GetText() << "] \n" ; std::string exp = m_filterEntry->GetText(); updateFilter(exp); }
void FWGeometryTableView::filterTextEntryCallback | ( | ) |
Definition at line 269 of file FWGeometryTableView.cc.
References funct::exp(), m_filterEntry, AlCaHLTBitMon_QueryRunRegistry::string, and updateFilter().
{ // std::cout << "text entry click ed \n" ; std::string exp = m_filterEntry->GetText(); updateFilter(exp); }
int FWGeometryTableView::getAutoExpand | ( | ) | const [inline] |
Definition at line 48 of file FWGeometryTableView.h.
References FWGeometryTableViewBase::m_autoExpand, and FWGenericParameter< T >::value().
Referenced by FWGeometryTableManager::importChildren(), and FWGeometryTableManager::loadGeometry().
{ return m_autoExpand.value(); }
std::string FWGeometryTableView::getFilter | ( | ) | const [inline] |
Definition at line 47 of file FWGeometryTableView.h.
References m_filter, and FWGenericParameter< T >::value().
Referenced by FWEveDetectorGeo::Paint(), and FWGeometryTableManager::updateFilter().
int FWGeometryTableView::getFilterType | ( | ) | const [inline] |
Definition at line 52 of file FWGeometryTableView.h.
References m_filterType, and FWGenericParameter< T >::value().
Referenced by FWGeoMaterialValidator::addDaughtersRec(), and FWGeometryTableManager::loadGeometry().
{ return m_filterType.value(); }
bool FWGeometryTableView::getIgnoreVisLevelWhenFilter | ( | ) | const [inline] |
Definition at line 50 of file FWGeometryTableView.h.
References m_visLevelFilter, and FWGenericParameter< T >::value().
Referenced by FWEveDetectorGeo::paintChildNodesRecurse().
{ return m_visLevelFilter.value(); }
FWGeometryTableManagerBase * FWGeometryTableView::getTableManager | ( | ) | [virtual] |
Reimplemented from FWGeometryTableViewBase.
Definition at line 255 of file FWGeometryTableView.cc.
References m_tableManager.
Referenced by autoExpandCallback(), FWGeoMaterialValidator::fillOptions(), FWEveDetectorGeo::GetHighlightTooltip(), FWEveDetectorGeo::Paint(), setPath(), FWEveDetectorGeo::tableManager(), and updateVisibilityTopNode().
{ return m_tableManager; }
int FWGeometryTableView::getVisLevel | ( | ) | const [inline] |
Definition at line 49 of file FWGeometryTableView.h.
References m_visLevel, and FWGenericParameter< T >::value().
Referenced by FWEveDetectorGeo::Paint().
{ return m_visLevel.value(); }
bool FWGeometryTableView::getVolumeMode | ( | ) | const [inline] |
Definition at line 46 of file FWGeometryTableView.h.
References kVolume, m_mode, and FWGenericParameter< T >::value().
Referenced by FWGeometryTableManager::cellName(), FWGeometryTableManager::getVisibility(), FWGeometryTableManager::getVisibilityChld(), FWEveDetectorGeo::Paint(), FWEveDetectorGeo::paintChildNodesRecurse(), FWGeometryTableManager::recalculateVisibility(), FWGeometryTableManager::setVisibility(), and FWGeometryTableManager::setVisibilityChld().
bool FWGeometryTableView::isSelectedByRegion | ( | ) | const [inline] |
Definition at line 63 of file FWGeometryTableView.h.
References m_selectRegion, and FWGenericParameter< T >::value().
Referenced by FWEveDetectorGeo::paintChildNodesRecurse().
{ return m_selectRegion.value(); }
const FWGeometryTableView& FWGeometryTableView::operator= | ( | const FWGeometryTableView & | ) | [private] |
void FWGeometryTableView::populateController | ( | ViewerParameterGUI & | gui | ) | const [virtual] |
Reimplemented from FWGeometryTableViewBase.
Definition at line 312 of file FWGeometryTableView.cc.
References ViewerParameterGUI::getTabContainer(), FWGeometryTableViewBase::m_autoExpand, m_disableTopNode, FWGeometryTableViewBase::m_minLeafTransparency, FWGeometryTableViewBase::m_minParentTransparency, m_mode, m_proximityAlgo, m_regionRadius, m_selectRegion, m_visLevel, m_visLevelFilter, ViewerParameterGUI::requestTab(), and ViewerParameterGUI::separator().
{ gui.requestTab("Style"). addParam(&m_mode). addParam(&m_autoExpand). separator(). addParam(&m_disableTopNode). addParam(&m_minParentTransparency). addParam(&m_minLeafTransparency). addParam(&m_visLevel). addParam(&m_visLevelFilter). separator(). addParam(&m_selectRegion). addParam(&m_regionRadius). addParam(&m_proximityAlgo).separator(); TGTextButton* butt = new TGTextButton(gui.getTabContainer(), "ReloadColors"); gui.getTabContainer()->AddFrame(butt); butt->Connect("Clicked()", "FWGeometryTableViewBase", (FWGeometryTableViewBase*)this, "reloadColors()"); }
void FWGeometryTableView::setFrom | ( | const FWConfiguration & | iFrom | ) | [virtual] |
Reimplemented from FWConfigurableParameterizable.
Definition at line 405 of file FWGeometryTableView.cc.
References FWParameterizable::begin(), FWGeometryTableViewBase::cdNode(), FWGeometryTableViewBase::checkExpandLevel(), FWParameterizable::end(), FWGeometryTableViewBase::m_enableRedraw, m_filter, m_filterEntry, m_filterType, m_filterTypeSetter, m_tableManager, FWGeometryTableViewBase::m_topNodeIdx, FWGeometryTableViewBase::m_viewersConfig, FWParameterBase::name(), FWGeometryTableViewBase::refreshTable3D(), FWGeometryTableViewBase::setTopNodePathFromConfig(), FWGeometryTableManager::updateFilter(), FWGenericParameter< T >::value(), and FWConfiguration::valueForKey().
{ m_enableRedraw = false; for (const_iterator it =begin(), itEnd = end(); it != itEnd; ++it) { // printf("set from %s \n",(*it)->name().c_str() ); if ((*it)->name() == m_topNodeIdx.name() ) setTopNodePathFromConfig(iFrom); else (*it)->setFrom(iFrom); } cdNode(m_topNodeIdx.value()); TGComboBox* cbox = ((FWEnumParameterSetter*) m_filterTypeSetter.get())->getWidget(); cbox->Select(m_filterType.value(), false); m_viewersConfig = iFrom.valueForKey("Viewers"); m_enableRedraw = true; m_filterEntry->SetText(m_filter.value().c_str(), false); m_tableManager->updateFilter(m_filterType.value()); checkExpandLevel(); refreshTable3D(); /* getTableManager()->redrawTable(); m_eveTopNode->ElementChanged(); gEve->FullRedraw3D(false, true); */ }
void FWGeometryTableView::setPath | ( | int | parentIdx, |
std::string & | |||
) | [virtual] |
Reimplemented from FWGeometryTableViewBase.
Definition at line 242 of file FWGeometryTableView.cc.
References asciidump::at, FWGeometryTableViewBase::checkExpandLevel(), FWGeoTopNode::clearSelection(), getTableManager(), FWGeometryTableViewBase::getTopNodeIdx(), FWGeometryTableManagerBase::kVisNodeSelf, m_disableTopNode, FWGeometryTableViewBase::m_eveTopNode, FWGeometryTableViewBase::m_topNodeIdx, FWGeometryTableManagerBase::refEntries(), FWGeometryTableViewBase::refreshTable3D(), FWGenericParameter< T >::set(), FWGeometryTableManagerBase::setLevelOffset(), and FWGenericParameter< T >::value().
{ m_eveTopNode->clearSelection(); m_topNodeIdx.set(parentIdx); getTableManager()->refEntries().at(getTopNodeIdx()).setBitVal(FWGeometryTableManagerBase::kVisNodeSelf,!m_disableTopNode.value() ); getTableManager()->setLevelOffset(getTableManager()->refEntries().at(getTopNodeIdx()).m_level); checkExpandLevel(); refreshTable3D(); }
void FWGeometryTableView::updateFilter | ( | std::string & | exp | ) |
Definition at line 286 of file FWGeometryTableView.cc.
References i, m_filter, m_filterEntry, m_filterType, m_tableManager, FWGeometryTableManagerBase::refEntries(), FWGeometryTableViewBase::refreshTable3D(), FWGenericParameter< T >::set(), FWGeometryTableManager::setVisibility(), FWGeometryTableManager::setVisibilityChld(), FWGeometryTableManager::updateFilter(), and FWGenericParameter< T >::value().
Referenced by filterListCallback(), and filterTextEntryCallback().
{ // std::cout << "=FWGeometryTableViewBase::updateFilter()" << m_filterEntry->GetText() <<std::endl; if (exp.empty()) { // std::cout << "FITLER OFF \n"; for (FWGeometryTableManagerBase::Entries_i i = m_tableManager->refEntries().begin(); i != m_tableManager->refEntries().end(); ++i) { m_tableManager->setVisibility(*i, true); m_tableManager->setVisibilityChld(*i, true); } // NOTE: entry should be cleared automatically m_filterEntry->Clear(); } m_filter.set(exp); m_tableManager->updateFilter(m_filterType.value()); refreshTable3D(); }
void FWGeometryTableView::updateVisibilityTopNode | ( | ) |
Definition at line 439 of file FWGeometryTableView.cc.
References getTableManager(), FWGeometryTableViewBase::getTopNodeIdx(), FWGeometryTableManagerBase::kVisNodeSelf, m_disableTopNode, FWGeometryTableManagerBase::refEntries(), FWGeometryTableViewBase::refreshTable3D(), and FWGenericParameter< T >::value().
Referenced by FWGeometryTableView().
{ getTableManager()->refEntries().at(getTopNodeIdx()).setBitVal(FWGeometryTableManagerBase::kVisNodeSelf,!m_disableTopNode.value() ); refreshTable3D(); }
Definition at line 80 of file FWGeometryTableView.h.
Referenced by drawTopNode(), FWGeometryTableView(), populateController(), setPath(), and updateVisibilityTopNode().
Definition at line 83 of file FWGeometryTableView.h.
Referenced by getFilter(), setFrom(), and updateFilter().
Definition at line 75 of file FWGeometryTableView.h.
Referenced by filterListCallback(), filterTextEntryCallback(), FWGeometryTableView(), setFrom(), and updateFilter().
Definition at line 84 of file FWGeometryTableView.h.
Referenced by FWGeometryTableView(), getFilterType(), setFrom(), and updateFilter().
boost::shared_ptr<FWParameterSetterBase> FWGeometryTableView::m_filterTypeSetter [private] |
Definition at line 92 of file FWGeometryTableView.h.
Referenced by FWGeometryTableView(), and setFrom().
Definition at line 76 of file FWGeometryTableView.h.
Referenced by FWGeometryTableView().
FWEnumParameter FWGeometryTableView::m_mode [private] |
Definition at line 79 of file FWGeometryTableView.h.
Referenced by FWGeometryTableView(), getVolumeMode(), and populateController().
Definition at line 89 of file FWGeometryTableView.h.
Referenced by checkRegionOfInterest(), FWGeometryTableView(), and populateController().
Definition at line 88 of file FWGeometryTableView.h.
Referenced by checkRegionOfInterest(), FWGeometryTableView(), and populateController().
Definition at line 87 of file FWGeometryTableView.h.
Referenced by checkRegionOfInterest(), FWGeometryTableView(), isSelectedByRegion(), and populateController().
Definition at line 73 of file FWGeometryTableView.h.
Referenced by checkRegionOfInterest(), FWGeometryTableView(), getTableManager(), setFrom(), and updateFilter().
Definition at line 81 of file FWGeometryTableView.h.
Referenced by FWGeometryTableView(), getVisLevel(), and populateController().
Definition at line 85 of file FWGeometryTableView.h.
Referenced by FWGeometryTableView(), getIgnoreVisLevelWhenFilter(), and populateController().