15 #include <boost/bind.hpp>
30 #include "TEveScene.h"
31 #include "TEveSceneInfo.h"
32 #include "TEveWindow.h"
34 #include "TEvePointSet.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"
55 static const std::string
sUpdateMsg =
"Please press Apply button to update overlaps.\n";
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:", 1
l, 0
l, 10
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");
215 (*it)->setFrom(iFrom);
288 std::cout <<
"=============================================================================" << std::endl << std::endl;
300 using namespace TMath;
304 std::vector<float> pnts;
316 if (Abs(*
i) >=
n0 && Abs(*
i) <= n1)
330 m_marker->SetPolyMarker(
int(pnts.size()/3), &pnts[0], 4);
332 gEve->FullRedraw3D(
false,
true);
void precisionCallback(Long_t)
virtual void populateController(ViewerParameterGUI &) const
TGTextButton * m_applyButton
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)
std::vector< float > m_markerVertices
std::vector< int > m_markerIndices
FWBoolParameter m_listAllNodes
void setCheckerState(bool)
void setTopNodePathFromConfig(const FWConfiguration &iFrom)
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()
FWBoolParameter m_rnrExtrusion
virtual void chosenItem(int x)
const_iterator end() const
FWLongParameter m_topNodeIdx
TGNumberEntry * m_numEntry
TGCheckButton * m_listOptionButton
TGCompositeFrame * m_frame
static void getNNodesTotal(TGeoNode *geoNode, int &off)
virtual TEveElement * getEveGeoElement() const
char data[epos_bytes_allocation]
int getTopNodeIdx() const
virtual ~FWOverlapTableView()
const FWConfiguration * valueForKey(const std::string &iKey) const
FWLongParameter m_pointSize
FWOverlapTableManager * m_tableManager
static const std::string sUpdateMsg
virtual void chosenItem(int)
virtual void populateController(ViewerParameterGUI &) const
const std::string & name() const
bool testBit(UChar_t f) const
void importOverlaps(std::string path, double precision)