CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
FWGeometryTableViewBase Class Reference

#include <FWGeometryTableViewBase.h>

Inheritance diagram for FWGeometryTableViewBase:
FWViewBase FWParameterSetterEditorBase FWConfigurableParameterizable FWParameterizable FWConfigurable FWGeometryTableView FWOverlapTableView

Classes

class  FWViewCombo
 

Public Member Functions

virtual void addTo (FWConfiguration &) const
 
void cdNode (int)
 
virtual void cdTop ()
 
virtual void cdUp ()
 
virtual void cellClicked (Int_t iRow, Int_t iColumn, Int_t iButton, Int_t iKeyMod, Int_t iGlobalX, Int_t iGlobalY)
 
void checkExpandLevel ()
 
virtual void chosenItem (int)
 
 FWGeometryTableViewBase (TEveWindowSlot *, FWViewType::EType, FWColorManager *)
 
bool getEnableHighlight ()
 
long getLeafTransparencyFactor () const
 
long getMinLeafTransparency () const
 
long getMinParentTransparency () const
 
long getParentTransparencyFactor () const
 
virtual
FWGeometryTableManagerBase
getTableManager ()
 
int getTopNodeIdx () const
 
void nodeColorChangeRequested (Color_t)
 
void populate3DViewsFromConfig ()
 
virtual void refreshTable3D ()
 
void reloadColors ()
 
virtual void saveImageTo (const std::string &iName) const
 
void selectView (int)
 
void setBackgroundColor ()
 
virtual void setPath (int, std::string &)
 
void transparencyChanged ()
 
virtual ~FWGeometryTableViewBase ()
 
- Public Member Functions inherited from FWViewBase
virtual
FWViewContextMenuHandlerBase
contextMenuHandler () const
 
void destroy ()
 
 FWViewBase (FWViewType::EType, unsigned int iVersion=1)
 
void promptForSaveImageTo (TGFrame *) const
 
FWViewType::EType typeId () const
 
const std::string & typeName () const
 
- Public Member Functions inherited from FWConfigurableParameterizable
 FWConfigurableParameterizable (unsigned int iVersion=1)
 
virtual void setFrom (const FWConfiguration &)
 
unsigned int version () const
 
virtual ~FWConfigurableParameterizable ()
 
- Public Member Functions inherited from FWParameterizable
void add (FWParameterBase *)
 
const_iterator begin () const
 
const_iterator end () const
 
 FWParameterizable ()
 
virtual ~FWParameterizable ()
 
- Public Member Functions inherited from FWConfigurable
 FWConfigurable ()
 
virtual ~FWConfigurable ()
 
- Public Member Functions inherited from FWParameterSetterEditorBase
 FWParameterSetterEditorBase ()
 
virtual void updateEditor ()
 
virtual ~FWParameterSetterEditorBase ()
 

Protected Member Functions

void enableHighlight ()
 
virtual void populateController (ViewerParameterGUI &) const
 
void postConst ()
 
void setTopNodePathFromConfig (const FWConfiguration &iFrom)
 
- Protected Member Functions inherited from FWViewBase
virtual ~FWViewBase ()
 

Protected Attributes

FWLongParameter m_autoExpand
 
FWColorManagerm_colorManager
 
FWColorPopupm_colorPopup
 
FWBoolParameter m_enableHighlight
 
bool m_enableRedraw
 
TEveScene * m_eveScene
 
FWGeoTopNodem_eveTopNode
 
TEveWindowFrame * m_eveWindow
 
TGCompositeFrame * m_frame
 
FWLongParameter m_leafTransparencyFactor
 
TEvePointSet * m_marker
 
FWLongParameter m_minLeafTransparency
 
FWLongParameter m_minParentTransparency
 
FWLongParameter m_parentTransparencyFactor
 
FWTableWidgetm_tableWidget
 
FWLongParameter m_topNodeIdx
 
FWViewCombom_viewBox
 
const FWConfigurationm_viewersConfig
 
- Protected Attributes inherited from FWViewBase
FWViewType m_type
 

Private Member Functions

 ClassDef (FWGeometryTableViewBase, 0)
 
 FWGeometryTableViewBase (const FWGeometryTableViewBase &)
 
const FWGeometryTableViewBaseoperator= (const FWGeometryTableViewBase &)
 
void setColumnSelected (int idx)
 

Private Attributes

int m_tableRowIndexForColorPopup
 

Additional Inherited Members

- Public Types inherited from FWParameterizable
typedef std::vector
< FWParameterBase * >
::const_iterator 
const_iterator
 
- Public Attributes inherited from FWViewBase
sigc::signal< void, const
FWViewBase * > 
beingDestroyed_
 
sigc::signal< void, Int_t, Int_t > openSelectedModelContextMenu_
 

Detailed Description

Definition at line 44 of file FWGeometryTableViewBase.h.

Constructor & Destructor Documentation

FWGeometryTableViewBase::FWGeometryTableViewBase ( TEveWindowSlot *  iParent,
FWViewType::EType  type,
FWColorManager colMng 
)

Definition at line 160 of file FWGeometryTableViewBase.cc.

References FWGenericParameter< T >::changed_, m_eveWindow, m_frame, m_leafTransparencyFactor, m_minLeafTransparency, m_minParentTransparency, m_parentTransparencyFactor, and refreshTable3D().

161  : FWViewBase(type),
162  m_topNodeIdx(this, "TopNodeIndex", -1l, 0, 1e7),
163  m_autoExpand(this,"ExpandList:", 1l, 0l, 100l),
164  m_enableHighlight(this,"EnableHighlight", true),
165  m_parentTransparencyFactor(this, "ParentTransparencyFactor", 1l, 0l, 100l),
166  m_leafTransparencyFactor(this, "LeafTransparencyFactor", 1l, 0l, 100l),
167  m_minParentTransparency(this, "MinParentTransparency", 90l, 0l, 100l),
168  m_minLeafTransparency(this, "MinLeafTransparency", 0l, 0l, 100l),
169  m_colorManager(colMng),
170  m_colorPopup(0),
171  m_eveWindow(0),
172  m_frame(0),
173  m_viewBox(0),
174  m_viewersConfig(0),
175  m_enableRedraw(true),
176  m_marker(0),
177  m_eveTopNode(0),
178  m_eveScene(0),
180 {
181  m_eveWindow = iParent->MakeFrame(0);
182  TGCompositeFrame* xf = m_eveWindow->GetGUICompositeFrame();
183 
184  m_frame = new FWGeometryVF(xf, this);
185 
186  xf->AddFrame(m_frame, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
187 
192 
193 }
type
Definition: HCALResponse.h:22
FWLongParameter m_parentTransparencyFactor
const FWConfiguration * m_viewersConfig
FWLongParameter m_leafTransparencyFactor
sigc::signal< void, T > changed_
FWViewBase(FWViewType::EType, unsigned int iVersion=1)
Definition: FWViewBase.cc:34
FWGeometryTableViewBase::~FWGeometryTableViewBase ( )
virtual

Definition at line 223 of file FWGeometryTableViewBase.cc.

References getTableManager(), m_eveWindow, and m_frame.

224 {
225  // take out composite frame and delete it directly (zwithout the timeout)
226  TGCompositeFrame *frame = m_eveWindow->GetGUICompositeFrame();
227  frame->RemoveFrame( m_frame );
228  delete m_frame;
229 
230 
231 
232  m_eveWindow->DestroyWindowAndSlot();
233  delete getTableManager();
234 }
virtual FWGeometryTableManagerBase * getTableManager()
FWGeometryTableViewBase::FWGeometryTableViewBase ( const FWGeometryTableViewBase )
private

Member Function Documentation

void FWGeometryTableViewBase::addTo ( FWConfiguration iTo) const
virtual

Reimplemented from FWConfigurableParameterizable.

Definition at line 607 of file FWGeometryTableViewBase.cc.

References FWConfiguration::addKeyValue(), FWConfigurableParameterizable::addTo(), gen::k, m_eveTopNode, FWGeoTopNode::m_scene, and alignCSCRings::s.

608 {
610 
611  FWConfiguration viewers(1);
612  FWConfiguration tempArea;
613 
614  for(TEveElement::List_i k = gEve->GetViewers()->BeginChildren(); k!= gEve->GetViewers()->EndChildren(); ++k)
615  {
616  for (TEveElement::List_i eit = (*k)->BeginChildren(); eit != (*k)->EndChildren(); ++eit )
617  {
618  TEveScene* s = ((TEveSceneInfo*)*eit)->GetScene();
619  if (s->GetGLScene() == m_eveTopNode->m_scene)
620  {
621  viewers.addKeyValue( (*k)->GetElementName(), tempArea);
622  break;
623  }
624  }
625  }
626 
627  iTo.addKeyValue("Viewers", viewers, true);
628 }
FWGeoTopNodeGLScene * m_scene
Definition: FWGeoTopNode.h:69
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
int k[5][pyjets_maxn]
virtual void addTo(FWConfiguration &) const
void FWGeometryTableViewBase::cdNode ( int  idx)

Definition at line 250 of file FWGeometryTableViewBase.cc.

References FWGeometryTableManagerBase::getNodePath(), getTableManager(), AlCaHLTBitMon_ParallelJobs::p, and setPath().

Referenced by chosenItem(), and FWGeometryTableView::setFrom().

251 {
252  std::string p;
253  getTableManager()->getNodePath(idx, p);
254  setPath(idx, p);
255 }
void getNodePath(int, std::string &) const
virtual void setPath(int, std::string &)
virtual FWGeometryTableManagerBase * getTableManager()
void FWGeometryTableViewBase::cdTop ( )
virtual

Reimplemented in FWOverlapTableView.

Definition at line 257 of file FWGeometryTableViewBase.cc.

References getTableManager(), scaleCards::path, FWGeometryTableManagerBase::refEntries(), and setPath().

Referenced by FWOverlapTableView::cdTop(), and FWGeometryTableView::FWGeometryTableView().

258 {
259  std::string path = "/" ;
260  path += getTableManager()->refEntries().at(0).name();
261  setPath(-1, path );
262 }
virtual void setPath(int, std::string &)
list path
Definition: scaleCards.py:51
virtual FWGeometryTableManagerBase * getTableManager()
void FWGeometryTableViewBase::cdUp ( )
virtual

Reimplemented in FWOverlapTableView.

Definition at line 264 of file FWGeometryTableViewBase.cc.

References FWGeometryTableManagerBase::getNodePath(), getTableManager(), getTopNodeIdx(), AlCaHLTBitMon_ParallelJobs::p, FWGeometryTableManagerBase::refEntries(), and setPath().

Referenced by FWOverlapTableView::cdUp().

265 {
266  if (getTopNodeIdx() != -1)
267  {
268  int pIdx = getTableManager()->refEntries()[getTopNodeIdx()].m_parent;
269  std::string p;
270  getTableManager()->getNodePath(pIdx, p);
271  setPath(pIdx, p);
272  }
273 }
void getNodePath(int, std::string &) const
virtual void setPath(int, std::string &)
virtual FWGeometryTableManagerBase * getTableManager()
void FWGeometryTableViewBase::cellClicked ( Int_t  iRow,
Int_t  iColumn,
Int_t  iButton,
Int_t  iKeyMod,
Int_t  iGlobalX,
Int_t  iGlobalY 
)
virtual

Definition at line 394 of file FWGeometryTableViewBase.cc.

References FWColorManager::backgroundColorIndex(), FWGeometryTableManagerBase::cancelEditor(), colors, FWColorManager::fillLimitedColors(), FWGeometryTableManagerBase::firstColumnClicked(), getTableManager(), FWColorPopup::InitContent(), FWColorManager::kBlackIndex, m_colorManager, m_colorPopup, m_eveTopNode, m_tableRowIndexForColorPopup, m_tableWidget, FWColorPopup::PlacePopup(), FWGeoTopNode::popupMenu(), FWGeometryTableManagerBase::refEntries(), refreshTable3D(), FWColorPopup::ResetColors(), FWGeometryTableManagerBase::rowToIndex(), setColumnSelected(), FWColorPopup::SetName(), FWGeometryTableManagerBase::setVisibility(), FWGeometryTableManagerBase::setVisibilityChld(), FWGeometryTableManagerBase::showEditor(), FWGeometryTableManagerBase::NodeInfo::switchBit(), vdt::x, and detailsBasic3DVector::y.

395 {
396  int idx = getTableManager()->rowToIndex()[iRow];
398 
399  if (iColumn != 2) getTableManager()->cancelEditor(false);
400 
401  bool elementChanged = false;
402  if (iButton == kButton1)
403  {
404  if (iColumn == 0)
405  {
406  Window_t wdummy;
407  Int_t xLoc,yLoc;
408  gVirtualX->TranslateCoordinates(gClient->GetDefaultRoot()->GetId(), m_tableWidget->GetId(), x, y, xLoc, yLoc, wdummy);
409 
410  if (getTableManager()->firstColumnClicked(iRow, xLoc))
411  setColumnSelected(idx);
412  }
413  else if (iColumn == 1)
414  {
415  std::vector<Color_t> colors;
417 
418  if (!m_colorPopup) {
419  m_colorPopup = new FWColorPopup(gClient->GetDefaultRoot(), colors.front());
420  m_colorPopup->InitContent("", colors);
421  m_colorPopup->Connect("ColorSelected(Color_t)","FWGeometryTableViewBase", const_cast<FWGeometryTableViewBase*>(this), "nodeColorChangeRequested(Color_t");
422  }
424  m_colorPopup->SetName("Selected");
426  m_colorPopup->PlacePopup(x, y, m_colorPopup->GetDefaultWidth(), m_colorPopup->GetDefaultHeight());
427  return;
428  }
429  else if (iColumn == 2)
430  {
431  // transparency edit
432  getTableManager()->showEditor(idx);
433  }
434  else if (iColumn == 3)
435  {
436  // vis self
437  getTableManager()->setVisibility(ni, !getTableManager()->getVisibility(ni));
438  elementChanged = true;
439  }
440  else if (iColumn == 4)
441  {
442  // vis children
443  getTableManager()->setVisibilityChld(ni, !getTableManager()->getVisibilityChld(ni));
444  elementChanged = true;
445  }
446  else if (iColumn == 6)
447  {
448  // used in overlaps for RnrMarker column
449  ni.switchBit(BIT(6));
450  elementChanged = true;
451  }
452  else
453  {
454  setColumnSelected(idx);
455  }
456 
457  if (elementChanged) {
458  refreshTable3D();
459  // getTableManager()->dataChanged();
460  }
461  }
462  else if (iColumn == 0)
463  {
464  setColumnSelected(idx);
465  m_eveTopNode->popupMenu(x, y, 0);
466  }
467 }
bool firstColumnClicked(int row, int xPos)
void InitContent(const char *name, const std::vector< Color_t > &colors, bool backgroundIsBlack=true)
void SetName(const char *iName)
void fillLimitedColors(std::vector< Color_t > &cv) const
virtual void setVisibilityChld(NodeInfo &, bool)
void PlacePopup(Int_t x, Int_t y, UInt_t w, UInt_t h)
vector< Color_t > colors
BackgroundColorIndex backgroundColorIndex() const
void ResetColors(const std::vector< Color_t > &colors, bool backgroundIsBlack=true)
virtual void popupMenu(int x, int y, TGLViewer *)
Definition: FWGeoTopNode.h:82
virtual void setVisibility(NodeInfo &, bool)
x
Definition: VDTMath.h:216
virtual FWGeometryTableManagerBase * getTableManager()
void FWGeometryTableViewBase::checkExpandLevel ( )

Definition at line 291 of file FWGeometryTableViewBase.cc.

References getTableManager(), i, FWGeometryTableManagerBase::kExpanded, m_autoExpand, m_topNodeIdx, FWGeometryTableManagerBase::refEntries(), and FWGenericParameter< T >::value().

Referenced by FWGeometryTableView::autoExpandCallback(), FWOverlapTableView::recalculate(), FWGeometryTableView::setFrom(), FWGeometryTableView::setPath(), and setPath().

292 {
293  // check expand state
294  int ae = m_autoExpand.value();
295  if ( m_topNodeIdx.value() > 0)
296  ae += getTableManager()->refEntries().at(m_topNodeIdx.value()).m_level;
297 
299  {
300  if (i->m_level < ae)
302  else
304  }
305 }
int i
Definition: DBlmapReader.cc:9
virtual FWGeometryTableManagerBase * getTableManager()
void FWGeometryTableViewBase::chosenItem ( int  menuIdx)
virtual

Reimplemented in FWOverlapTableView.

Definition at line 502 of file FWGeometryTableViewBase.cc.

References FWGeometryTableManagerBase::applyColorTranspToDaughters(), cdNode(), gather_cfg::cout, FWGeoTopNode::getFirstSelectedTableIndex(), FWGeometryTableManagerBase::getNodePath(), getTableManager(), FWGeoTopNode::kApplyChldCol, FWGeoTopNode::kApplyChldColRec, FWGeoTopNode::kCamera, FWGeoTopNode::kPrintMaterial, FWGeoTopNode::kPrintPath, FWGeoTopNode::kPrintShape, FWGeoTopNode::kSetTopNode, FWGeoTopNode::kSetTopNodeCam, FWGeoTopNode::kVisChldOff, FWGeoTopNode::kVisChldOn, FWGeoTopNode::kVisSelfOff, m_eveTopNode, FWGeometryTableManagerBase::NodeInfo::m_node, FWGeometryTableManagerBase::refEntry(), refreshTable3D(), FWGeoTopNode::s_pickedCamera3DCenter, FWGeoTopNode::s_pickedViewer, FWGeometryTableManagerBase::setDaughtersSelfVisibility(), FWGeometryTableManagerBase::setVisibility(), X, and Gflash::Z.

Referenced by FWOverlapTableView::chosenItem().

503 {
504  int selectedIdx = m_eveTopNode->getFirstSelectedTableIndex();
506  // printf("chosen item %s \n", ni.name());
507 
508  TGeoVolume *gv = ni.m_node->GetVolume();
509  bool resetHome = false;
510  if (gv)
511  {
512  switch (menuIdx)
513  {
515  getTableManager()->setVisibility(ni, false);
516  refreshTable3D();
517 
519  getTableManager()->setDaughtersSelfVisibility(selectedIdx, false);
520  refreshTable3D();
521  break;
522 
524  getTableManager()->setDaughtersSelfVisibility(selectedIdx, true);
525  refreshTable3D();
526  break;
527 
529  getTableManager()->applyColorTranspToDaughters(selectedIdx, false);
530  refreshTable3D();
531  break;
532 
534  getTableManager()->applyColorTranspToDaughters(selectedIdx, true);
535  refreshTable3D();
536  break;
537 
539  gv->InspectMaterial();
540  break;
541 
543  gv->InspectShape();
544  break;
545 
547  {
548  std::string ps;
549  getTableManager()->getNodePath(selectedIdx, ps);
550  std::cout << ps << std::endl;
551  break;
552  }
554  cdNode(selectedIdx);
555  break;
556 
558  cdNode(selectedIdx);
559  resetHome = true;
560  break;
561 
563  {
564  TGLViewer* v = FWGeoTopNode::s_pickedViewer;
565  v->CurrentCamera().SetExternalCenter(true);
567  v->SetDrawCameraCenter(true);
568  // resetHome = true;
569  break;
570  }
571  default:
572  return;
573  }
574  }
575 
576  if (resetHome) gEve->FullRedraw3D(true, true);
577 
578 }
const double Z[kNumberCalorimeter]
#define X(str)
Definition: MuonsGrabber.cc:49
void getNodePath(int, std::string &) const
virtual void applyColorTranspToDaughters(int selectedIdx, bool recurse)
int getFirstSelectedTableIndex()
void setDaughtersSelfVisibility(bool)
virtual void setVisibility(NodeInfo &, bool)
static TGLViewer * s_pickedViewer
Definition: FWGeoTopNode.h:88
tuple cout
Definition: gather_cfg.py:121
mathSSE::Vec4< T > v
static TGLVector3 s_pickedCamera3DCenter
Definition: FWGeoTopNode.h:87
virtual FWGeometryTableManagerBase * getTableManager()
FWGeometryTableViewBase::ClassDef ( FWGeometryTableViewBase  ,
 
)
private
void FWGeometryTableViewBase::enableHighlight ( )
protected
bool FWGeometryTableViewBase::getEnableHighlight ( )
inline

Definition at line 76 of file FWGeometryTableViewBase.h.

References m_enableHighlight, and FWGenericParameter< T >::value().

76 { return m_enableHighlight.value(); }
long FWGeometryTableViewBase::getLeafTransparencyFactor ( ) const
inline
long FWGeometryTableViewBase::getMinLeafTransparency ( ) const
inline
long FWGeometryTableViewBase::getMinParentTransparency ( ) const
inline
long FWGeometryTableViewBase::getParentTransparencyFactor ( ) const
inline
virtual FWGeometryTableManagerBase* FWGeometryTableViewBase::getTableManager ( )
inlinevirtual
int FWGeometryTableViewBase::getTopNodeIdx ( ) const
inline
void FWGeometryTableViewBase::nodeColorChangeRequested ( Color_t  col)

Definition at line 486 of file FWGeometryTableViewBase.cc.

References getTableManager(), FWGeometryTableManagerBase::NodeInfo::m_color, FWGeometryTableManagerBase::NodeInfo::m_node, m_tableRowIndexForColorPopup, FWGeometryTableManagerBase::refEntries(), and refreshTable3D().

487 {
488  // AMT: need to add virtual FWGeometryTableView::nodeColorChangeRequested() for volume mode
489 
490  // printf("color change %d \n", m_tableRowIndexForColorPopup);
491  if (m_tableRowIndexForColorPopup >= 0) {
493  ni.m_color = col;
494  ni.m_node->GetVolume()->SetLineColor(col);
495  refreshTable3D();
497  }
498 }
virtual FWGeometryTableManagerBase * getTableManager()
const FWGeometryTableViewBase& FWGeometryTableViewBase::operator= ( const FWGeometryTableViewBase )
private
void FWGeometryTableViewBase::populate3DViewsFromConfig ( )

Definition at line 310 of file FWGeometryTableViewBase.cc.

References fwLog, fwlog::kError, FWConfiguration::keyValues(), m_eveScene, m_eveTopNode, m_marker, m_viewBox, m_viewersConfig, FWGeometryTableViewBase::FWViewCombo::setElement(), and lumiContext::sname.

Referenced by FWGUIManager::setFrom().

311 {
312  // post-config
313  if (m_viewersConfig) {
314  TEveElementList* viewers = gEve->GetViewers();
316 
317  if(0!=keyVals)
318  {
319  for(FWConfiguration::KeyValuesIt it = keyVals->begin(); it!= keyVals->end(); ++it) {
320 
321  TString sname = it->first;
322  TEveViewer* v = dynamic_cast<TEveViewer*>(viewers->FindChild(sname.Data()));
323  if (!v)
324  {
325  fwLog(fwlog::kError) << "FWGeometryTableViewBase::populate3DViewsFromConfig no viewer found " << it->first << std::endl;
326  return;
327  }
328  v->AddScene(m_eveScene);
330  if (m_marker) getMarkerScene(v)->AddElement(m_marker);
331 
332  gEve->FullRedraw3D(false, true);
333  }
334  }
335  }
336 }
std::vector< std::pair< std::string, FWConfiguration > > KeyValues
const KeyValues * keyValues() const
const FWConfiguration * m_viewersConfig
#define fwLog(_level_)
Definition: fwLog.h:51
KeyValues::const_iterator KeyValuesIt
mathSSE::Vec4< T > v
void FWGeometryTableViewBase::populateController ( ViewerParameterGUI gui) const
protectedvirtual

Reimplemented from FWViewBase.

Reimplemented in FWOverlapTableView, and FWGeometryTableView.

Definition at line 665 of file FWGeometryTableViewBase.cc.

References ViewerParameterGUI::getTabContainer(), m_minLeafTransparency, m_minParentTransparency, and ViewerParameterGUI::requestTab().

Referenced by FWOverlapTableView::populateController().

666 {
667  gui.requestTab("Style").
668  separator().
669  //addParam(&m_parentTransparencyFactor).
670  // addParam(&m_leafTransparencyFactor).
671  addParam(&m_minParentTransparency).
672  addParam(&m_minLeafTransparency).
673  separator();
674  TGTextButton* butt = new TGTextButton(gui.getTabContainer(), "ReloadColors");
675  gui.getTabContainer()->AddFrame(butt);
676  butt->Connect("Clicked()", "FWGeometryTableViewBase", (FWGeometryTableViewBase*)this, "reloadColors()");
677 
678 }
ViewerParameterGUI & requestTab(const char *)
TGCompositeFrame * getTabContainer()
void FWGeometryTableViewBase::postConst ( )
protected

Definition at line 195 of file FWGeometryTableViewBase.cc.

References FWTableWidget::body(), FWTableWidget::disableGrowInWidth(), idDealer::editor, getTableManager(), m_eveWindow, m_frame, m_tableWidget, FWTableWidget::SetBackgroundColor(), FWGeometryTableManagerBase::setCellValueEditor(), FWTableWidget::SetHeaderBackgroundColor(), and FWTableWidget::SetLineSeparatorColor().

Referenced by FWGeometryTableView::FWGeometryTableView(), and FWOverlapTableView::FWOverlapTableView().

196 {
198  m_frame->AddFrame(m_tableWidget,new TGLayoutHints(kLHintsExpandX|kLHintsExpandY,2,2,0,0));
202  m_tableWidget->Connect("cellClicked(Int_t,Int_t,Int_t,Int_t,Int_t,Int_t)",
203  "FWGeometryTableViewBase",this,
204  "cellClicked(Int_t,Int_t,Int_t,Int_t,Int_t,Int_t)");
206  // resetSetters();
207 
208 
209  FWTranspEntry *editor = new FWTranspEntry(m_tableWidget->body(), this);
210  editor->SetBackgroundColor(gVirtualX->GetPixel(kYellow-7));
211  editor->SetFrameDrawn(false);
212  editor->Connect("ReturnPressed()", "FWGeometryTableViewBase",this,"transparencyChanged()");
214 
215  m_frame->MapSubwindows();
216  editor->UnmapWindow();
217  m_frame->Layout();
218  m_eveWindow->GetGUICompositeFrame()->Layout();
219  m_frame->MapWindow();
220 }
void SetBackgroundColor(Pixel_t)
void SetHeaderBackgroundColor(Pixel_t)
void SetLineSeparatorColor(Pixel_t)
void disableGrowInWidth()
FWTabularWidget * body()
Definition: FWTableWidget.h:93
tuple editor
Definition: idDealer.py:73
void setCellValueEditor(TGTextEntry *editor)
virtual FWGeometryTableManagerBase * getTableManager()
void FWGeometryTableViewBase::refreshTable3D ( )
virtual

Reimplemented in FWOverlapTableView.

Definition at line 588 of file FWGeometryTableViewBase.cc.

References getTableManager(), m_enableRedraw, m_eveTopNode, FWGeoTopNode::m_scene, and FWGeometryTableManagerBase::redrawTable().

Referenced by cellClicked(), FWGeometryTableView::checkRegionOfInterest(), chosenItem(), FWGeometryTableView::FWGeometryTableView(), FWGeometryTableViewBase(), FWOverlapTableView::FWOverlapTableView(), nodeColorChangeRequested(), FWOverlapTableView::refreshTable3D(), reloadColors(), FWGeometryTableView::setFrom(), FWGeometryTableView::setPath(), setPath(), transparencyChanged(), FWGeometryTableView::updateFilter(), and FWGeometryTableView::updateVisibilityTopNode().

589 {
590  if (m_enableRedraw)
591  {
592  if (gEve->GetSelection()->HasChild(m_eveTopNode))
593  gEve->GetSelection()->RemoveElement(m_eveTopNode);
594 
595  if (gEve->GetHighlight()->HasChild(m_eveTopNode))
596  gEve->GetHighlight()->RemoveElement(m_eveTopNode);
597 
598  m_eveTopNode->m_scene->PadPaint(m_eveTopNode->m_scene->GetPad());
599  gEve->Redraw3D();
600 
602  }
603 }
FWGeoTopNodeGLScene * m_scene
Definition: FWGeoTopNode.h:69
void redrawTable(bool setExpand=false)
virtual FWGeometryTableManagerBase * getTableManager()
void FWGeometryTableViewBase::reloadColors ( )

Definition at line 651 of file FWGeometryTableViewBase.cc.

References FWParameterizable::begin(), getTableManager(), i, FWGeometryTableManagerBase::refEntries(), and refreshTable3D().

652 {
653  // printf("relaodColors \n");
654  for (FWGeometryTableManagerBase::Entries_i i = getTableManager()->refEntries().begin(); i != getTableManager()->refEntries().end(); ++i)
655  {
656  i->m_color = i->m_node->GetVolume()->GetLineColor();
657  }
658 
659  refreshTable3D();
660 }
int i
Definition: DBlmapReader.cc:9
const_iterator begin() const
virtual FWGeometryTableManagerBase * getTableManager()
virtual void FWGeometryTableViewBase::saveImageTo ( const std::string &  iName) const
inlinevirtual

Implements FWViewBase.

Definition at line 82 of file FWGeometryTableViewBase.h.

82 {}
void FWGeometryTableViewBase::selectView ( int  idx)

Definition at line 341 of file FWGeometryTableViewBase.cc.

References m_eveScene, m_eveTopNode, m_marker, m_viewBox, and FWGeometryTableViewBase::FWViewCombo::setElement().

342 {
343  // callback from sleclect view popup menu
344 
346 
347  TEveElement::List_i it = gEve->GetViewers()->BeginChildren();
348  std::advance(it, idx);
349  TEveViewer* v = (TEveViewer*)(*it);
350 
351  for (TEveElement::List_i eit = v->BeginChildren(); eit != v->EndChildren(); ++eit )
352  {
353  if ((((TEveSceneInfo*)(*eit))->GetScene()) == m_eveScene)
354  {
355  v->RemoveElement(*eit);
356  if (m_marker) getMarkerScene(v)->RemoveElement(m_marker);
357  gEve->Redraw3D();
358  return;
359  }
360  }
361 
362  if (m_marker) getMarkerScene(v)->AddElement(m_marker);
363  v->AddScene(m_eveScene);
364  gEve->Redraw3D();
365 }
mathSSE::Vec4< T > v
void FWGeometryTableViewBase::setBackgroundColor ( )

Definition at line 470 of file FWGeometryTableViewBase.cc.

References FWColorManager::backgroundColorIndex(), getTableManager(), FWColorManager::kWhiteIndex, m_colorManager, m_tableWidget, FWTableWidget::SetBackgroundColor(), FWGeometryTableManagerBase::setBackgroundToWhite(), and FWTableWidget::SetLineSeparatorColor().

Referenced by Vispa.Plugins.EdmBrowser.EventContentView.LabelItem::__init__().

471 {
473  if(backgroundIsWhite) {
476  } else {
479  }
480  getTableManager()->setBackgroundToWhite(backgroundIsWhite);
481  gClient->NeedRedraw(m_tableWidget);
482 }
void SetBackgroundColor(Pixel_t)
void SetLineSeparatorColor(Pixel_t)
BackgroundColorIndex backgroundColorIndex() const
virtual FWGeometryTableManagerBase * getTableManager()
void FWGeometryTableViewBase::setColumnSelected ( int  idx)
private

Definition at line 370 of file FWGeometryTableViewBase.cc.

References getTableManager(), FWGeometryTableManagerBase::kSelected, m_eveTopNode, FWGeometryTableManagerBase::redrawTable(), FWGeometryTableManagerBase::refEntry(), FWGeoTopNode::selectPhysicalFromTable(), FWGeometryTableManagerBase::NodeInfo::setBit(), FWGeoTopNode::UnHighlighted(), and FWGeoTopNode::UnSelected().

Referenced by cellClicked().

371 {
372  // printf("cell clicled top node %p\n", (void*)m_eveTopNode);
373  if (gEve->GetSelection()->HasChild( m_eveTopNode))
374  gEve->GetSelection()->RemoveElement( m_eveTopNode);
375 
376  if (gEve->GetHighlight()->HasChild( m_eveTopNode))
377  gEve->GetHighlight()->RemoveElement( m_eveTopNode);
378 
379  // reset bits and sets for old selected table entry
382 
383 
385  gEve->GetSelection()->AddElement(m_eveTopNode);
386 
389  gEve->Redraw3D();
390 }
bool selectPhysicalFromTable(int)
virtual void UnHighlighted()
void redrawTable(bool setExpand=false)
virtual void UnSelected()
virtual FWGeometryTableManagerBase * getTableManager()
void FWGeometryTableViewBase::setPath ( int  parentIdx,
std::string &   
)
virtual

Reimplemented in FWGeometryTableView.

Definition at line 275 of file FWGeometryTableViewBase.cc.

References asciidump::at, checkExpandLevel(), FWGeoTopNode::clearSelection(), getTableManager(), getTopNodeIdx(), m_eveTopNode, m_topNodeIdx, refreshTable3D(), FWGenericParameter< T >::set(), and FWGeometryTableManagerBase::setLevelOffset().

Referenced by cdNode(), cdTop(), and cdUp().

276 {
278 
279  // printf("set path %d \n", parentIdx);
280  m_topNodeIdx.set(parentIdx);
281  // getTableManager()->refEntries().at(getTopNodeIdx()).setBitVal(FWGeometryTableManagerBase::kVisNodeSelf,!m_disableTopNode.value() );
282  getTableManager()->setLevelOffset(getTableManager()->refEntries().at(getTopNodeIdx()).m_level);
283 
284 
286  refreshTable3D();
287 }
void clearSelection()
Definition: FWGeoTopNode.h:79
list at
Definition: asciidump.py:428
virtual FWGeometryTableManagerBase * getTableManager()
void FWGeometryTableViewBase::setTopNodePathFromConfig ( const FWConfiguration iFrom)
protected

Definition at line 632 of file FWGeometryTableViewBase.cc.

References fwLog, getTableManager(), fwlog::kWarning, m_topNodeIdx, FWParameterBase::name(), FWGeometryTableManagerBase::refEntries(), alignCSCRings::s, FWGenericParameter< T >::set(), FWConfiguration::value(), relativeConstraints::value, and FWConfiguration::valueForKey().

Referenced by FWOverlapTableView::setFrom(), and FWGeometryTableView::setFrom().

633 {
634  int tn;
635  const FWConfiguration* value = iFrom.valueForKey( m_topNodeIdx.name() );
636  if (!value) return;
637 
638  std::istringstream s(value->value());
639  s>> tn;
640  int lastIdx = getTableManager()->refEntries().size() -1;
641  if (tn >= lastIdx) {
642  fwLog(fwlog::kWarning) << Form("Ignoring node path from confugration file -- %s value larger than number of nodes \n", m_topNodeIdx.name().c_str());
643  return;
644  }
645  // std::cerr << "set top node " << ;
646  m_topNodeIdx.set(tn);
647 }
const std::string & value(unsigned int iIndex=0) const
#define fwLog(_level_)
Definition: fwLog.h:51
const FWConfiguration * valueForKey(const std::string &iKey) const
const std::string & name() const
virtual FWGeometryTableManagerBase * getTableManager()
void FWGeometryTableViewBase::transparencyChanged ( )

Member Data Documentation

FWLongParameter FWGeometryTableViewBase::m_autoExpand
protected
FWColorManager* FWGeometryTableViewBase::m_colorManager
protected

Definition at line 121 of file FWGeometryTableViewBase.h.

Referenced by cellClicked(), and setBackgroundColor().

FWColorPopup* FWGeometryTableViewBase::m_colorPopup
protected

Definition at line 126 of file FWGeometryTableViewBase.h.

Referenced by cellClicked().

FWBoolParameter FWGeometryTableViewBase::m_enableHighlight
protected

Definition at line 113 of file FWGeometryTableViewBase.h.

Referenced by getEnableHighlight().

bool FWGeometryTableViewBase::m_enableRedraw
protected
TEveScene* FWGeometryTableViewBase::m_eveScene
protected
FWGeoTopNode* FWGeometryTableViewBase::m_eveTopNode
protected
TEveWindowFrame* FWGeometryTableViewBase::m_eveWindow
protected
TGCompositeFrame* FWGeometryTableViewBase::m_frame
protected
FWLongParameter FWGeometryTableViewBase::m_leafTransparencyFactor
protected
TEvePointSet* FWGeometryTableViewBase::m_marker
protected
FWLongParameter FWGeometryTableViewBase::m_minLeafTransparency
protected
FWLongParameter FWGeometryTableViewBase::m_minParentTransparency
protected
FWLongParameter FWGeometryTableViewBase::m_parentTransparencyFactor
protected
int FWGeometryTableViewBase::m_tableRowIndexForColorPopup
private

Definition at line 158 of file FWGeometryTableViewBase.h.

Referenced by cellClicked(), and nodeColorChangeRequested().

FWTableWidget* FWGeometryTableViewBase::m_tableWidget
protected

Definition at line 122 of file FWGeometryTableViewBase.h.

Referenced by cellClicked(), postConst(), and setBackgroundColor().

FWLongParameter FWGeometryTableViewBase::m_topNodeIdx
protected
FWViewCombo* FWGeometryTableViewBase::m_viewBox
protected
const FWConfiguration* FWGeometryTableViewBase::m_viewersConfig
protected