15 #include <boost/bind.hpp>
32 #include "TEveScene.h"
33 #include "TEveSceneInfo.h"
34 #include "TEveWindow.h"
35 #include "TEveManager.h"
38 #include "TGeoVolume.h"
39 #include "TGeoMatrix.h"
40 #include "TGeoShape.h"
42 #include "TGeoMatrix.h"
43 #include "TGeoManager.h"
45 #include "TGLViewer.h"
46 #include "KeySymbols.h"
48 #include "TGNumberEntry.h"
49 #include "TGListBox.h"
51 #include "TEveViewer.h"
52 #include "TGeoOverlap.h"
61 m_listOptionButton(0),
65 m_path(this,
"Path:", std::
string(
"/cms:World_1/cms:CMSE_1")),
66 m_precision(this,
"Precision", 0.05, 0.000001, 10),
67 m_listAllNodes(this,
"ListAllNodes",
true),
68 m_rnrOverlap(this,
"Overlap",
true),
69 m_rnrExtrusion(this,
"Extrusion",
true),
70 m_drawPoints(this,
"DrawPoints",
true),
71 m_pointSize(this,
"PointSize", 4
l, 0
l, 10
l),
72 m_extrusionMarkerColor(this,
"ExtrusionMarkerColor", 0
l, 0
l, 20
l),
73 m_overlapMarkerColor(this,
"OverlapMarkerColor", 9
l, 0
l, 20
l)
76 TGHorizontalFrame* hp =
new TGHorizontalFrame(
m_frame);
80 hp->AddFrame(
m_viewBox,
new TGLayoutHints(kLHintsExpandY, 2, 2, 0, 0));
84 TGTextButton* rb =
new TGTextButton (hp,
"CdTop");
85 hp->AddFrame(rb,
new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0) );
86 rb->Connect(
"Clicked()",
"FWGeometryTableViewBase",
this,
"cdTop()");
90 TGTextButton* rb =
new TGTextButton (hp,
"CdUp");
91 hp->AddFrame(rb,
new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0));
92 rb->Connect(
"Clicked()",
"FWGeometryTableViewBase",
this,
"cdUp()");
95 hp->AddFrame(
new TGLabel(hp,
"Precision:"),
new TGLayoutHints(kLHintsBottom, 10, 0, 0, 2));
97 hp->AddFrame(
m_numEntry,
new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0));
98 m_numEntry->Connect(
"ValueSet(Long_t)",
"FWOverlapTableView",
this,
"precisionCallback(Long_t)");
104 m_listOptionButton->Connect(
"Clicked()",
"FWOverlapTableView",
this,
"setListAllNodes()");
105 hp->AddFrame(
m_listOptionButton,
new TGLayoutHints(kLHintsLeft|kLHintsCenterY,2,0,1,1));
110 hp->AddFrame(
m_applyButton,
new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0));
111 m_applyButton->Connect(
"Clicked()",
"FWOverlapTableView",
this,
"recalculate()");
114 m_frame->AddFrame(hp,
new TGLayoutHints(kLHintsLeft|kLHintsExpandX, 4, 2, 2, 0));
120 #if ROOT_VERSION_CODE < ROOT_VERSION(5,32,0)
121 m_eveScene =
new FWGeoTopNodeEveScene(gls,
"TopGeoNodeScene",
"");
123 m_eveScene =
new TEveScene(gls,
"TopGeoNodeScene",
"");
129 m_eveTopNode->SetElementNameTitle(
"overlapNode",
"opverlapNodetitle");
140 m_marker->Reset(TEveQuadSet::kQT_FreeQuad, kFALSE, 32);
142 m_marker->SetAlwaysSecSelect(kTRUE);
220 (*it)->setFrom(iFrom);
294 std::cout <<
"=============================================================================" << std::endl << std::endl;
306 using namespace TMath;
310 for (
int i = 0;
i <
m_marker->GetPlex()->Size(); ++
i)
313 TEveQuadSet::QFreeQuad_t*
q = (TEveQuadSet::QFreeQuad_t*)
m_marker->GetDigit(
i);
319 for (std::vector<int>::iterator
j = id->
m_nodes.begin();
j <
id->m_nodes.end(); ++
j)
337 gEve->FullRedraw3D(
false,
true);
void precisionCallback(Long_t)
virtual void populateController(ViewerParameterGUI &) const
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
FWBoolParameter m_listAllNodes
void setCheckerState(bool)
ViewerParameterGUI & requestTab(const char *)
const FWConfiguration * m_viewersConfig
virtual FWGeometryTableManagerBase * getTableManager()
sigc::signal< void, T > changed_
virtual void refreshTable3D()
int getFirstSelectedTableIndex()
virtual void setFrom(const FWConfiguration &)
void printOverlaps(int) const
FWBoolParameter m_drawPoints
FWDoubleParameter m_precision
FWGeoTopNodeGLScene * m_scene
void setLevelOffset(int x)
bool listAllNodes() const
virtual void refreshTable3D()
std::vector< int > m_nodes
FWBoolParameter m_rnrExtrusion
virtual void chosenItem(int x)
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
virtual ~FWOverlapTableView()
const FWConfiguration * valueForKey(const std::string &iKey) const
FWLongParameter m_pointSize
FWLongParameter m_overlapMarkerColor
FWOverlapTableManager * m_tableManager
static const std::string sUpdateMsg
virtual void chosenItem(int)
virtual void populateController(ViewerParameterGUI &) const
const std::string & name() const
void importOverlaps(std::string path, double precision)