#include <FWEveDetectorGeo.h>
Public Member Functions | |
virtual FWGeometryTableViewBase * | browser () |
FWEveDetectorGeo (FWGeometryTableView *v) | |
virtual TString | GetHighlightTooltip () |
virtual void | Paint (Option_t *option="") |
virtual void | popupMenu (int x, int y, TGLViewer *) |
virtual FWGeometryTableManagerBase * | tableManager () |
virtual | ~FWEveDetectorGeo () |
Private Member Functions | |
ClassDef (FWEveDetectorGeo, 0) | |
bool | paintChildNodesRecurse (FWGeometryTableManagerBase::Entries_i pIt, Int_t idx, const TGeoHMatrix &mtx) |
Private Attributes | |
FWGeometryTableView * | m_browser |
bool | m_filterOff |
int | m_maxLevel |
Definition at line 10 of file FWEveDetectorGeo.h.
FWEveDetectorGeo::FWEveDetectorGeo | ( | FWGeometryTableView * | v | ) |
Definition at line 13 of file FWEveDetectorGeo.cc.
: m_browser(v), m_maxLevel(0), m_filterOff(0) { }
virtual FWEveDetectorGeo::~FWEveDetectorGeo | ( | ) | [inline, virtual] |
Definition at line 14 of file FWEveDetectorGeo.h.
{}
FWGeometryTableViewBase * FWEveDetectorGeo::browser | ( | ) | [virtual] |
Reimplemented from FWGeoTopNode.
Definition at line 23 of file FWEveDetectorGeo.cc.
References m_browser.
{ return m_browser; }
FWEveDetectorGeo::ClassDef | ( | FWEveDetectorGeo | , |
0 | |||
) | [private] |
TString FWEveDetectorGeo::GetHighlightTooltip | ( | ) | [virtual] |
Definition at line 126 of file FWEveDetectorGeo.cc.
References AlCaHLTBitMon_QueryRunRegistry::data, FWGeoTopNode::fHted, FWGeometryTableView::getTableManager(), UserOptions_cff::idx, m_browser, FWGeometryTableManagerBase::NodeInfo::name(), FWGeometryTableManagerBase::refEntries(), and FWGeoTopNode::tableIdx().
{ std::set<TGLPhysicalShape*>::iterator it = fHted.begin(); int idx = tableIdx(*it); if (idx > 0) { FWGeometryTableManagerBase::NodeInfo& data = m_browser->getTableManager()->refEntries().at(idx); return data.name(); } return "error"; }
void FWEveDetectorGeo::Paint | ( | Option_t * | option = "" | ) | [virtual] |
Reimplemented from FWGeoTopNode.
Definition at line 29 of file FWEveDetectorGeo.cc.
References FWGeometryTableView::getFilter(), FWGeometryTableViewManager::getGeoMangeur(), FWGeometryTableManagerBase::getLevelOffset(), FWGeometryTableManagerBase::getNodeMatrix(), FWGeometryTableView::getTableManager(), FWGeometryTableViewBase::getTopNodeIdx(), FWGeometryTableView::getVisLevel(), FWGeometryTableView::getVolumeMode(), FWGeometryTableManagerBase::kVisNodeSelf, m_browser, m_filterOff, m_maxLevel, paintChildNodesRecurse(), FWGeoTopNode::paintShape(), FWGeometryTableManagerBase::refEntries(), and tableManager().
{ FWGeoTopNode::Paint(); // printf("PAINPAINTPAINTPAINTPAINTPAINTPAINTPAINTPAINTPAINTT %d/%d \n", m_browser->getTopNodeIdx(), (int)m_browser->getTableManager()->refEntries().size()); if (m_browser->getTableManager()->refEntries().empty()) return; TEveGeoManagerHolder gmgr( FWGeometryTableViewManager::getGeoMangeur()); m_maxLevel = m_browser->getVisLevel() + m_browser->getTableManager()->getLevelOffset(); m_filterOff = m_browser->getFilter().empty(); Int_t topIdx = m_browser->getTopNodeIdx(); FWGeometryTableManagerBase::Entries_i sit = m_browser->getTableManager()->refEntries().begin(); TGeoHMatrix mtx; if (topIdx >= 0) { std::advance(sit, topIdx); m_browser->getTableManager()->getNodeMatrix(*sit, mtx); } bool drawsChildren = 0; if ( ((FWGeometryTableManager*)tableManager())->getVisibilityChld(*sit)) drawsChildren = paintChildNodesRecurse( sit, topIdx, mtx); if (sit->testBit(FWGeometryTableManagerBase::kVisNodeSelf) && ((FWGeometryTableManager*)tableManager())->getVisibility(*sit)) paintShape( topIdx,mtx, m_browser->getVolumeMode(), drawsChildren ); fflush(stdout); }
bool FWEveDetectorGeo::paintChildNodesRecurse | ( | FWGeometryTableManagerBase::Entries_i | pIt, |
Int_t | idx, | ||
const TGeoHMatrix & | mtx | ||
) | [private] |
Definition at line 66 of file FWEveDetectorGeo.cc.
References FWGeometryTableView::getIgnoreVisLevelWhenFilter(), FWGeometryTableManagerBase::getNNodesTotal(), FWGeometryTableView::getVolumeMode(), FWGeometryTableView::isSelectedByRegion(), m_browser, m_filterOff, m_maxLevel, n, FWGeoTopNode::paintShape(), and tableManager().
Referenced by Paint().
{ TGeoNode* parentNode = pIt->m_node; int nD = parentNode->GetNdaughters(); int dOff=0; pIt++; int pcnt = cnt+1; bool drawsChildNodes = 0; FWGeometryTableManagerBase::Entries_i it; for (int n = 0; n != nD; ++n) { it = pIt; std::advance(it,n + dOff); cnt = pcnt + n+dOff; TGeoHMatrix nm = parentMtx; nm.Multiply(it->m_node->GetMatrix()); bool drawsChildNodesSecondGen = false; if (m_filterOff || m_browser->isSelectedByRegion()) { if ( ((FWGeometryTableManager*)tableManager())->getVisibilityChld(*it) && ( it->m_level < m_maxLevel)) { drawsChildNodesSecondGen = paintChildNodesRecurse(it,cnt , nm); } if ( ((FWGeometryTableManager*)tableManager())->getVisibility(*it)) { paintShape(cnt , nm, m_browser->getVolumeMode(), drawsChildNodesSecondGen ); drawsChildNodes = true; } } else { if ( ((FWGeometryTableManager*)tableManager())->getVisibilityChld(*it) && ( it->m_level < m_maxLevel || m_browser->getIgnoreVisLevelWhenFilter() )) { drawsChildNodesSecondGen = paintChildNodesRecurse(it,cnt , nm); } ((FWGeometryTableManager*)tableManager())->assertNodeFilterCache(*it); if ( ((FWGeometryTableManager*)tableManager())->getVisibility(*it)) { paintShape(cnt , nm, m_browser->getVolumeMode(), drawsChildNodesSecondGen ); drawsChildNodes = true; } } drawsChildNodes |= drawsChildNodesSecondGen; FWGeometryTableManagerBase::getNNodesTotal(parentNode->GetDaughter(n), dOff); } return drawsChildNodes; }
void FWEveDetectorGeo::popupMenu | ( | int | x, |
int | y, | ||
TGLViewer * | v | ||
) | [virtual] |
Reimplemented from FWGeoTopNode.
Definition at line 140 of file FWEveDetectorGeo.cc.
References m_browser, and FWGeoTopNode::setPopupMenu().
{ FWPopupMenu* nodePopup = FWGeoTopNode::setPopupMenu(x, y, v, false); if (nodePopup) nodePopup->Connect("Activated(Int_t)", "FWGeometryTableView", m_browser, "chosenItem(Int_t)"); }
FWGeometryTableManagerBase * FWEveDetectorGeo::tableManager | ( | ) | [virtual] |
Reimplemented from FWGeoTopNode.
Definition at line 18 of file FWEveDetectorGeo.cc.
References FWGeometryTableView::getTableManager(), and m_browser.
Referenced by Paint(), and paintChildNodesRecurse().
{ return m_browser->getTableManager(); }
FWGeometryTableView* FWEveDetectorGeo::m_browser [private] |
Definition at line 35 of file FWEveDetectorGeo.h.
Referenced by browser(), GetHighlightTooltip(), Paint(), paintChildNodesRecurse(), popupMenu(), and tableManager().
bool FWEveDetectorGeo::m_filterOff [private] |
Definition at line 37 of file FWEveDetectorGeo.h.
Referenced by Paint(), and paintChildNodesRecurse().
int FWEveDetectorGeo::m_maxLevel [private] |
Definition at line 36 of file FWEveDetectorGeo.h.
Referenced by Paint(), and paintChildNodesRecurse().