#include <Fireworks/Core/interface/FWOverlapTableView.h>
Description: [one line class summary]
Usage: <usage>
Definition at line 34 of file FWOverlapTableView.h.
FWOverlapTableView::FWOverlapTableView | ( | TEveWindowSlot * | iParent, |
FWColorManager * | colMng | ||
) |
Definition at line 58 of file FWOverlapTableView.cc.
References FWGenericParameter< T >::changed_, drawPoints(), m_applyButton, m_drawPoints, FWGeometryTableViewBase::m_eveScene, FWGeometryTableViewBase::m_eveTopNode, FWGeoTopNodeGLScene::m_eveTopNode, FWGeometryTableViewBase::m_frame, m_listAllNodes, m_listOptionButton, FWGeometryTableViewBase::m_marker, m_numEntry, m_pointSize, m_precision, m_rnrExtrusion, m_rnrOverlap, FWGeoTopNode::m_scene, m_tableManager, FWGeometryTableViewBase::m_viewBox, FWGenericParameterWithRange< T >::max(), FWGenericParameterWithRange< T >::min(), FWParameterBase::name(), pointSize(), FWGeometryTableViewBase::postConst(), FWGeometryTableViewBase::refreshTable3D(), refreshTable3D(), and FWGenericParameter< T >::value().
: FWGeometryTableViewBase(iParent, FWViewType::kOverlapTable, colMng), m_applyButton(0), m_listOptionButton(0), m_tableManager(0), m_numEntry(0), m_runChecker(true), m_path(this,"Path:", std::string("/cms:World_1/cms:CMSE_1")), m_precision(this, "Precision", 0.05, 0.000001, 10), m_listAllNodes(this, "ListAllNodes", true), m_rnrOverlap(this, "Overlap", true), m_rnrExtrusion(this, "Extrusion", true), m_drawPoints(this, "DrawPoints", true), m_pointSize(this, "PointSize:", 1l, 0l, 10l) { // top row TGHorizontalFrame* hp = new TGHorizontalFrame(m_frame); { m_viewBox = new FWViewCombo(hp, this); hp->AddFrame( m_viewBox,new TGLayoutHints(kLHintsExpandY, 2, 2, 0, 0)); } { 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()"); } { hp->AddFrame(new TGLabel(hp, "Precision:"), new TGLayoutHints(kLHintsBottom, 10, 0, 0, 2)); m_numEntry = new TGNumberEntry(hp, m_precision.value(), 5, -1, TGNumberFormat::kNESReal, TGNumberFormat::kNEAAnyNumber, TGNumberFormat::kNELLimitMinMax, m_precision.min(), m_precision.max()); hp->AddFrame(m_numEntry, new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0)); m_numEntry->Connect("ValueSet(Long_t)","FWOverlapTableView",this,"precisionCallback(Long_t)"); } { m_listOptionButton = new TGCheckButton(hp,m_listAllNodes.name().c_str()); m_listOptionButton->SetState( m_listAllNodes.value() ? kButtonDown : kButtonUp ); m_listOptionButton->Connect("Clicked()", "FWOverlapTableView", this, "setListAllNodes()"); hp->AddFrame(m_listOptionButton, new TGLayoutHints(kLHintsLeft|kLHintsCenterY,2,0,1,1)); } { m_applyButton = new TGTextButton (hp, "Apply"); hp->AddFrame( m_applyButton, new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0)); m_applyButton->Connect("Clicked()","FWOverlapTableView",this,"recalculate()"); } m_frame->AddFrame(hp,new TGLayoutHints(kLHintsLeft|kLHintsExpandX, 4, 2, 2, 0)); m_tableManager = new FWOverlapTableManager(this); // std::cerr << " FWOverlapTableView::initGeometry \n"; 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 FWEveOverlap(this); m_eveTopNode->SetElementNameTitle("overlapNode", "opverlapNodetitle"); m_eveTopNode->IncDenyDestroy(); m_eveTopNode->SetPickable(true); m_eveScene->AddElement(m_eveTopNode); gls->m_eveTopNode = m_eveTopNode; m_eveTopNode->m_scene = gls; m_marker = new TEvePointSet(); m_marker->SetMarkerSize(5); m_marker->SetMainColor(kRed); m_marker->IncDenyDestroy(); m_drawPoints.changed_.connect(boost::bind(&FWOverlapTableView::drawPoints,this)); m_pointSize.changed_.connect(boost::bind(&FWOverlapTableView::pointSize,this)); m_rnrOverlap.changed_.connect(boost::bind(&FWOverlapTableView::refreshTable3D,this)); m_rnrExtrusion.changed_.connect(boost::bind(&FWGeometryTableViewBase::refreshTable3D,this)); postConst(); }
FWOverlapTableView::~FWOverlapTableView | ( | ) | [virtual] |
Definition at line 151 of file FWOverlapTableView.cc.
References FWGeometryTableViewBase::m_marker.
FWOverlapTableView::FWOverlapTableView | ( | const FWOverlapTableView & | ) | [private] |
void FWOverlapTableView::cdTop | ( | ) | [virtual] |
Reimplemented from FWGeometryTableViewBase.
Definition at line 264 of file FWOverlapTableView.cc.
References FWGeometryTableViewBase::m_topNodeIdx, setCheckerState(), and FWGenericParameter< T >::value().
{ if (m_topNodeIdx.value() == -1) return; setCheckerState(true); FWGeometryTableViewBase::cdTop(); }
void FWOverlapTableView::cdUp | ( | ) | [virtual] |
Reimplemented from FWGeometryTableViewBase.
Definition at line 258 of file FWOverlapTableView.cc.
References setCheckerState().
{ setCheckerState(true); FWGeometryTableViewBase::cdUp(); }
void FWOverlapTableView::chosenItem | ( | int | x | ) | [virtual] |
Reimplemented from FWGeometryTableViewBase.
Definition at line 281 of file FWOverlapTableView.cc.
References gather_cfg::cout, FWGeoTopNode::getFirstSelectedTableIndex(), FWGeoTopNode::kPrintOverlap, FWGeometryTableViewBase::m_eveTopNode, m_tableManager, and FWOverlapTableManager::printOverlaps().
{ // printf(" FWOverlapTableView::chosenItem chosen item %s \n", ni->name()); switch (menuIdx) { case FWGeoTopNode::kPrintOverlap: { std::cout << "=============================================================================" << std::endl << std::endl; m_tableManager->printOverlaps(m_eveTopNode->getFirstSelectedTableIndex()); break; } default: FWGeometryTableViewBase::chosenItem(menuIdx); } }
FWOverlapTableView::ClassDef | ( | FWOverlapTableView | , |
0 | |||
) |
void FWOverlapTableView::drawPoints | ( | ) |
Definition at line 242 of file FWOverlapTableView.cc.
References m_drawPoints, FWGeometryTableViewBase::m_marker, and FWGenericParameter< T >::value().
Referenced by FWOverlapTableView().
{ m_marker->SetRnrSelf(m_drawPoints.value()); m_marker->ElementChanged(); gEve->Redraw3D(); }
TEveElement * FWOverlapTableView::getEveGeoElement | ( | ) | const [protected, virtual] |
Definition at line 176 of file FWOverlapTableView.cc.
References FWGeometryTableViewBase::m_eveTopNode.
{ return m_eveTopNode; }
FWGeometryTableManagerBase * FWOverlapTableView::getTableManager | ( | ) | [virtual] |
Reimplemented from FWGeometryTableViewBase.
Definition at line 157 of file FWOverlapTableView.cc.
References m_tableManager.
Referenced by FWEveOverlap::GetHighlightTooltip(), FWEveOverlap::Paint(), recalculate(), and FWEveOverlap::tableManager().
{ return m_tableManager; }
bool FWOverlapTableView::listAllNodes | ( | ) | const |
Definition at line 163 of file FWOverlapTableView.cc.
References m_listAllNodes, and FWGenericParameter< T >::value().
Referenced by FWOverlapTableManager::cellRenderer(), FWOverlapTableManager::nodeIsParent(), and FWOverlapTableManager::recalculateVisibilityNodeRec().
{ return m_listAllNodes.value(); }
const FWOverlapTableView& FWOverlapTableView::operator= | ( | const FWOverlapTableView & | ) | [private] |
void FWOverlapTableView::pointSize | ( | ) |
Definition at line 250 of file FWOverlapTableView.cc.
References FWGeometryTableViewBase::m_marker, m_pointSize, and FWGenericParameter< T >::value().
Referenced by FWOverlapTableView().
{ m_marker->SetMarkerSize(m_pointSize.value()); m_marker->ElementChanged(); gEve->Redraw3D(); }
void FWOverlapTableView::populateController | ( | ViewerParameterGUI & | gui | ) | const [virtual] |
Reimplemented from FWGeometryTableViewBase.
Definition at line 227 of file FWOverlapTableView.cc.
References m_drawPoints, m_pointSize, m_rnrExtrusion, m_rnrOverlap, and ViewerParameterGUI::requestTab().
{ gui.requestTab("Style"). // addParam(&m_enableHighlight). // separator(). addParam(&m_rnrOverlap). addParam(&m_rnrExtrusion). separator(). addParam(&m_drawPoints). addParam(&m_pointSize); FWGeometryTableViewBase::populateController(gui); }
void FWOverlapTableView::precisionCallback | ( | Long_t | ) |
Definition at line 182 of file FWOverlapTableView.cc.
References gather_cfg::cout, m_numEntry, m_precision, FWGenericParameter< T >::set(), setCheckerState(), and sUpdateMsg.
{ // std::cout << " ----------------------------- PRECISION \n" << m_numEntry->GetNumber(); setCheckerState(true); m_precision.set( m_numEntry->GetNumber()); std::cout << sUpdateMsg; }
void FWOverlapTableView::recalculate | ( | ) |
Definition at line 191 of file FWOverlapTableView.cc.
References asciidump::at, FWGeometryTableViewBase::checkExpandLevel(), getTableManager(), FWGeometryTableViewBase::getTopNodeIdx(), FWOverlapTableManager::importOverlaps(), m_path, m_precision, m_tableManager, refreshTable3D(), setCheckerState(), FWGeometryTableManagerBase::setLevelOffset(), and FWGenericParameter< T >::value().
Referenced by setFrom().
{ //m_path.set(m_pathEntry->GetText()); // m_precision.set(m_numEntry->GetNumber()); // std::cout << " $$$$ " << m_path.value() << std::endl; m_tableManager->importOverlaps(m_path.value(), m_precision.value()); checkExpandLevel(); getTableManager()->setLevelOffset(getTableManager()->refEntries().at(getTopNodeIdx()).m_level); refreshTable3D(); setCheckerState(false); }
void FWOverlapTableView::refreshTable3D | ( | ) | [virtual] |
Reimplemented from FWGeometryTableViewBase.
Definition at line 298 of file FWOverlapTableView.cc.
References AlCaHLTBitMon_QueryRunRegistry::data, FWGeometryTableManagerBase::getNNodesTotal(), FWGeometryTableViewBase::getTopNodeIdx(), i, FWOverlapTableManager::kVisMarker, m_drawPoints, FWGeometryTableViewBase::m_enableRedraw, FWGeometryTableViewBase::m_marker, m_markerIndices, m_markerVertices, m_rnrExtrusion, m_rnrOverlap, m_tableManager, n0, FWGeometryTableManagerBase::refEntries(), FWGeometryTableManagerBase::NodeInfo::testBit(), and FWGenericParameter< T >::value().
Referenced by FWOverlapTableView(), recalculate(), and setListAllNodes().
{ using namespace TMath; if (!m_enableRedraw) return; FWGeometryTableViewBase::refreshTable3D(); std::vector<float> pnts; int cnt = 0; // std::cout << "WOverlapTableView::refreshTable3D() "<< std::endl; int n0 = getTopNodeIdx(); int nd = 0; m_tableManager->getNNodesTotal(m_tableManager->refEntries().at(n0).m_node, nd); int n1 = n0+nd; // printf("marker rnf %d %d \n", n0, n1); if (m_drawPoints.value()) { for (std::vector<int>::iterator i = m_markerIndices.begin(); i!=m_markerIndices.end(); i++, cnt+=3) { if (Abs(*i) >= n0 && Abs(*i) <= n1) { FWGeometryTableManagerBase::NodeInfo& data = m_tableManager->refEntries().at(Abs(*i)); if ( data.testBit(FWOverlapTableManager::kVisMarker) && ( (( *i > 0 ) && m_rnrOverlap.value()) || ((*i < 0) && m_rnrExtrusion.value()) )) { pnts.push_back(m_markerVertices[cnt]); pnts.push_back(m_markerVertices[cnt+1]); pnts.push_back(m_markerVertices[cnt+2]); } } } } m_marker->SetPolyMarker(int(pnts.size()/3), &pnts[0], 4); m_marker->ElementChanged(); gEve->FullRedraw3D(false, true); }
void FWOverlapTableView::setCheckerState | ( | bool | x | ) | [private] |
Definition at line 272 of file FWOverlapTableView.cc.
References m_applyButton, m_runChecker, and x.
Referenced by cdTop(), cdUp(), precisionCallback(), and recalculate().
{ m_runChecker = x; m_applyButton->SetForegroundColor(x ? 0xff0000 : 0x000000); gClient->NeedRedraw(m_applyButton); }
void FWOverlapTableView::setFrom | ( | const FWConfiguration & | iFrom | ) | [virtual] |
Reimplemented from FWConfigurableParameterizable.
Definition at line 206 of file FWOverlapTableView.cc.
References FWParameterizable::begin(), FWParameterizable::end(), FWGeometryTableViewBase::m_enableRedraw, m_numEntry, m_precision, FWGeometryTableViewBase::m_topNodeIdx, FWGeometryTableViewBase::m_viewersConfig, FWParameterBase::name(), recalculate(), FWGeometryTableViewBase::setTopNodePathFromConfig(), FWGenericParameter< T >::value(), and FWConfiguration::valueForKey().
{ m_enableRedraw = false; for (const_iterator it =begin(), itEnd = end(); it != itEnd; ++it) { if ((*it)->name() == m_topNodeIdx.name() ) setTopNodePathFromConfig(iFrom); else (*it)->setFrom(iFrom); } m_viewersConfig = iFrom.valueForKey("Viewers"); m_numEntry->SetNumber(m_precision.value()); // refreshTable3D(); m_enableRedraw = true; recalculate(); }
void FWOverlapTableView::setListAllNodes | ( | ) |
Definition at line 169 of file FWOverlapTableView.cc.
References m_listAllNodes, m_listOptionButton, refreshTable3D(), and FWGenericParameter< T >::set().
{ m_listAllNodes.set( m_listOptionButton->IsOn()); refreshTable3D(); }
TGTextButton* FWOverlapTableView::m_applyButton [private] |
Definition at line 69 of file FWOverlapTableView.h.
Referenced by FWOverlapTableView(), and setCheckerState().
Definition at line 93 of file FWOverlapTableView.h.
Referenced by drawPoints(), FWOverlapTableView(), populateController(), and refreshTable3D().
Definition at line 88 of file FWOverlapTableView.h.
Referenced by FWOverlapTableView(), listAllNodes(), and setListAllNodes().
TGCheckButton* FWOverlapTableView::m_listOptionButton [private] |
Definition at line 70 of file FWOverlapTableView.h.
Referenced by FWOverlapTableView(), and setListAllNodes().
std::vector<int> FWOverlapTableView::m_markerIndices |
Definition at line 82 of file FWOverlapTableView.h.
Referenced by FWOverlapTableManager::addOverlapEntry(), FWOverlapTableManager::cellRenderer(), FWOverlapTableManager::importOverlaps(), and refreshTable3D().
std::vector<float> FWOverlapTableView::m_markerVertices |
Definition at line 81 of file FWOverlapTableView.h.
Referenced by FWOverlapTableManager::addOverlapEntry(), FWOverlapTableManager::importOverlaps(), and refreshTable3D().
TGNumberEntry* FWOverlapTableView::m_numEntry |
Definition at line 76 of file FWOverlapTableView.h.
Referenced by FWOverlapTableView(), precisionCallback(), and setFrom().
Definition at line 85 of file FWOverlapTableView.h.
Referenced by recalculate().
Definition at line 94 of file FWOverlapTableView.h.
Referenced by FWOverlapTableView(), pointSize(), and populateController().
Definition at line 86 of file FWOverlapTableView.h.
Referenced by FWOverlapTableView(), precisionCallback(), recalculate(), and setFrom().
Definition at line 91 of file FWOverlapTableView.h.
Referenced by FWOverlapTableView(), FWEveOverlap::paintChildNodesRecurse(), populateController(), and refreshTable3D().
Definition at line 90 of file FWOverlapTableView.h.
Referenced by FWOverlapTableView(), FWEveOverlap::paintChildNodesRecurse(), populateController(), and refreshTable3D().
Definition at line 78 of file FWOverlapTableView.h.
Referenced by setCheckerState().
Definition at line 75 of file FWOverlapTableView.h.
Referenced by chosenItem(), FWOverlapTableView(), getTableManager(), recalculate(), and refreshTable3D().