#include <FWEveDetectorGeo.h>
Public Types | |
enum | MenuOptions { kGeoSetTopNode, kGeoSetTopNodeCam, kGeoVisOn, kGeoVisOff, kGeoInspectMaterial, kGeoInspectShape, kGeoCamera } |
Public Member Functions | |
FWEveDetectorGeo (FWGeometryTableView *v) | |
virtual TString | GetHighlightTooltip () |
virtual void | Paint (Option_t *option="") |
virtual void | popupMenu (int x, int y) |
virtual FWGeometryTableManagerBase * | tableManager () |
virtual | ~FWEveDetectorGeo () |
Private Member Functions | |
ClassDef (FWEveDetectorGeo, 0) | |
void | 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.
kGeoSetTopNode | |
kGeoSetTopNodeCam | |
kGeoVisOn | |
kGeoVisOff | |
kGeoInspectMaterial | |
kGeoInspectShape | |
kGeoCamera |
Definition at line 14 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 25 of file FWEveDetectorGeo.h.
{}
FWEveDetectorGeo::ClassDef | ( | FWEveDetectorGeo | , |
0 | |||
) | [private] |
TString FWEveDetectorGeo::GetHighlightTooltip | ( | ) | [virtual] |
Definition at line 104 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 24 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); if (sit->testBit(FWGeometryTableManagerBase::kVisNodeSelf) && ((FWGeometryTableManager*)tableManager())->getVisibility(*sit)) paintShape(*sit, topIdx,mtx, m_browser->getVolumeMode() ); } if ( ((FWGeometryTableManager*)tableManager())->getVisibilityChld(*sit)) paintChildNodesRecurse( sit, topIdx, mtx); }
void FWEveDetectorGeo::paintChildNodesRecurse | ( | FWGeometryTableManagerBase::Entries_i | pIt, |
Int_t | idx, | ||
const TGeoHMatrix & | mtx | ||
) | [private] |
Definition at line 55 of file FWEveDetectorGeo.cc.
References FWGeometryTableView::getIgnoreVisLevelWhenFilter(), FWGeometryTableManagerBase::getNNodesTotal(), FWGeometryTableView::getVolumeMode(), FWGeometryTableManagerBase::kExpanded, 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; 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()); if (m_filterOff) { if ( ((FWGeometryTableManager*)tableManager())->getVisibility(*it)) paintShape(*it, cnt , nm, m_browser->getVolumeMode() ); if ( ((FWGeometryTableManager*)tableManager())->getVisibilityChld(*it) && ( it->m_level < m_maxLevel || it->testBit(FWGeometryTableManagerBase::kExpanded) )) { paintChildNodesRecurse(it,cnt , nm); } } else { if ( ((FWGeometryTableManager*)tableManager())->getVisibility(*it)) paintShape(*it,cnt , nm, m_browser->getVolumeMode() ); if ( ((FWGeometryTableManager*)tableManager())->getVisibilityChld(*it) && ( it->m_level < m_maxLevel || m_browser->getIgnoreVisLevelWhenFilter() )) { paintChildNodesRecurse(it,cnt , nm); } } FWGeometryTableManagerBase::getNNodesTotal(parentNode->GetDaughter(n), dOff); } }
void FWEveDetectorGeo::popupMenu | ( | int | x, |
int | y | ||
) | [virtual] |
Reimplemented from FWGeoTopNode.
Definition at line 120 of file FWEveDetectorGeo.cc.
References FWGeoTopNode::fSted, fwLog, FWGeoTopNode::getFirstSelectedTableIndex(), kGeoCamera, kGeoInspectShape, kGeoSetTopNode, kGeoSetTopNodeCam, kGeoVisOff, kGeoVisOn, fwlog::kInfo, and m_browser.
{ if (getFirstSelectedTableIndex() < 0) { if (fSted.empty()) fwLog(fwlog::kInfo) << "No menu -- no node/entry selected \n"; return; } FWPopupMenu* nodePopup = new FWPopupMenu(); nodePopup->AddEntry("Set As Top Node", kGeoSetTopNode); nodePopup->AddEntry("Set As Top Node And Camera Center", kGeoSetTopNodeCam); nodePopup->AddSeparator(); nodePopup->AddEntry("Rnr Off For All Children", kGeoVisOff); nodePopup->AddEntry("Rnr On For All Children", kGeoVisOn); nodePopup->AddSeparator(); nodePopup->AddEntry("Set Camera Center", kGeoCamera); nodePopup->AddSeparator(); // nodePopup->AddEntry("InspectMaterial", kGeoInspectMaterial); crashes !!! nodePopup->AddEntry("InspectShape", kGeoInspectShape); nodePopup->PlaceMenu(x, y,true,true); 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 37 of file FWEveDetectorGeo.h.
Referenced by GetHighlightTooltip(), Paint(), paintChildNodesRecurse(), popupMenu(), and tableManager().
bool FWEveDetectorGeo::m_filterOff [private] |
Definition at line 39 of file FWEveDetectorGeo.h.
Referenced by Paint(), and paintChildNodesRecurse().
int FWEveDetectorGeo::m_maxLevel [private] |
Definition at line 38 of file FWEveDetectorGeo.h.
Referenced by Paint(), and paintChildNodesRecurse().