14 #include <boost/bind.hpp> 30 #include "TEveScene.h" 31 #include "TEveSceneInfo.h" 32 #include "TEveWindow.h" 33 #include "TEveManager.h" 36 #include "TGeoVolume.h" 37 #include "TGeoMatrix.h" 38 #include "TGeoShape.h" 40 #include "TGeoMatrix.h" 41 #include "TGeoManager.h" 43 #include "TGLViewer.h" 44 #include "KeySymbols.h" 46 #include "TGNumberEntry.h" 47 #include "TGListBox.h" 49 #include "TEveViewer.h" 50 #include "TGeoOverlap.h" 63 m_path(this,
"Path:",
std::
string(
"/cms:World_1/cms:CMSE_1")),
64 m_precision(this,
"Precision", 0.05, 0.000001, 10),
65 m_listAllNodes(this,
"ListAllNodes",
true),
66 m_rnrOverlap(this,
"Overlap",
true),
67 m_rnrExtrusion(this,
"Extrusion",
true),
68 m_drawPoints(this,
"DrawPoints",
true),
69 m_pointSize(this,
"PointSize", 4
l, 0
l, 10
l),
70 m_extrusionMarkerColor(this,
"ExtrusionMarkerColor", 0
l, 0
l, 20
l),
71 m_overlapMarkerColor(this,
"OverlapMarkerColor", 9
l, 0
l, 20
l)
74 TGHorizontalFrame*
hp =
new TGHorizontalFrame(
m_frame);
78 hp->AddFrame(
m_viewBox,
new TGLayoutHints(kLHintsExpandY, 2, 2, 0, 0));
82 TGTextButton* rb =
new TGTextButton (hp,
"CdTop");
83 hp->AddFrame(rb,
new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0) );
84 rb->Connect(
"Clicked()",
"FWGeometryTableViewBase",
this,
"cdTop()");
88 TGTextButton* rb =
new TGTextButton (hp,
"CdUp");
89 hp->AddFrame(rb,
new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0));
90 rb->Connect(
"Clicked()",
"FWGeometryTableViewBase",
this,
"cdUp()");
93 hp->AddFrame(
new TGLabel(hp,
"Precision:"),
new TGLayoutHints(kLHintsBottom, 10, 0, 0, 2));
95 hp->AddFrame(
m_numEntry,
new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0));
96 m_numEntry->Connect(
"ValueSet(Long_t)",
"FWOverlapTableView",
this,
"precisionCallback(Long_t)");
102 m_listOptionButton->Connect(
"Clicked()",
"FWOverlapTableView",
this,
"setListAllNodes()");
103 hp->AddFrame(
m_listOptionButton,
new TGLayoutHints(kLHintsLeft|kLHintsCenterY,2,0,1,1));
108 hp->AddFrame(
m_applyButton,
new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0));
109 m_applyButton->Connect(
"Clicked()",
"FWOverlapTableView",
this,
"recalculate()");
112 m_frame->AddFrame(hp,
new TGLayoutHints(kLHintsLeft|kLHintsExpandX, 4, 2, 2, 0));
118 #if ROOT_VERSION_CODE < ROOT_VERSION(5,32,0) 119 m_eveScene =
new FWGeoTopNodeEveScene(gls,
"TopGeoNodeScene",
"");
121 m_eveScene =
new TEveScene(gls,
"TopGeoNodeScene",
"");
127 m_eveTopNode->SetElementNameTitle(
"overlapNode",
"opverlapNodetitle");
138 m_marker->Reset(TEveQuadSet::kQT_FreeQuad, kFALSE, 32);
140 m_marker->SetAlwaysSecSelect(kTRUE);
218 (*it)->setFrom(iFrom);
292 std::cout <<
"=============================================================================" << std::endl << std::endl;
304 using namespace TMath;
308 for (
int i = 0;
i <
m_marker->GetPlex()->Size(); ++
i)
311 TEveQuadSet::QFreeQuad_t*
q = (TEveQuadSet::QFreeQuad_t*)
m_marker->GetDigit(
i);
317 for (std::vector<int>::iterator j = id->
m_nodes.begin(); j <
id->m_nodes.end(); ++j)
335 gEve->FullRedraw3D(
false,
true);
void precisionCallback(Long_t)
TGTextButton * m_applyButton
bool isNodeRendered(int idx, int top_node_idx) const
FWGeoTopNode * m_eveTopNode
std::vector< FWParameterBase * >::const_iterator const_iterator
FWGeoTopNode * m_eveTopNode
const_iterator begin() const
FWBoolParameter m_rnrOverlap
FWOverlapTableView(TEveWindowSlot *iParent, FWColorManager *colMng)
FWEveDigitSetScalableMarker * m_marker
void populateController(ViewerParameterGUI &) const override
FWBoolParameter m_listAllNodes
void setCheckerState(bool)
~FWOverlapTableView() override
ViewerParameterGUI & requestTab(const char *)
const FWConfiguration * m_viewersConfig
FWGeometryTableManagerBase * getTableManager() override
void setFrom(const FWConfiguration &) override
sigc::signal< void, T > changed_
virtual void refreshTable3D()
int getFirstSelectedTableIndex()
void printOverlaps(int) const
void refreshTable3D() override
FWBoolParameter m_drawPoints
FWDoubleParameter m_precision
FWGeoTopNodeGLScene * m_scene
void setLevelOffset(int x)
bool listAllNodes() const
void chosenItem(int x) override
std::vector< int > m_nodes
FWBoolParameter m_rnrExtrusion
const_iterator end() const
FWLongParameter m_topNodeIdx
TGNumberEntry * m_numEntry
TGCheckButton * m_listOptionButton
TGCompositeFrame * m_frame
virtual TEveElement * getEveGeoElement() const
int getTopNodeIdx() const
FWLongParameter m_extrusionMarkerColor
const FWConfiguration * valueForKey(const std::string &iKey) const
FWLongParameter m_pointSize
FWLongParameter m_overlapMarkerColor
FWOverlapTableManager * m_tableManager
static const std::string sUpdateMsg
void populateController(ViewerParameterGUI &) const override
virtual void chosenItem(int)
const std::string & name() const
void importOverlaps(std::string path, double precision)