CMS 3D CMS Logo

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

void addTo (FWConfiguration &) const override
 
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
 
FWEveDigitSetScalableMarkergetMarker ()
 
long getMinLeafTransparency () const
 
long getMinParentTransparency () const
 
long getParentTransparencyFactor () const
 
virtual FWGeometryTableManagerBasegetTableManager ()
 
int getTopNodeIdx () const
 
void nodeColorChangeRequested (Color_t)
 
void populate3DViewsFromConfig ()
 
virtual void refreshTable3D ()
 
void reloadColors ()
 
void saveImageTo (const std::string &iName) const override
 
void selectView (int)
 
void setBackgroundColor ()
 
virtual void setPath (int, std::string &)
 
void transparencyChanged ()
 
 ~FWGeometryTableViewBase () override
 
- Public Member Functions inherited from FWViewBase
virtual FWViewContextMenuHandlerBasecontextMenuHandler () const
 
void destroy ()
 
 FWViewBase (FWViewType::EType, unsigned int iVersion=1)
 
 FWViewBase (const FWViewBase &)=delete
 
const FWViewBaseoperator= (const FWViewBase &)=delete
 
void promptForSaveImageTo (TGFrame *) const
 
FWViewType::EType typeId () const
 
const std::string & typeName () const
 
- Public Member Functions inherited from FWConfigurableParameterizable
 FWConfigurableParameterizable (unsigned int iVersion=1)
 
 FWConfigurableParameterizable (const FWConfigurableParameterizable &)=delete
 
const FWConfigurableParameterizableoperator= (const FWConfigurableParameterizable &)=delete
 
void setFrom (const FWConfiguration &) override
 
unsigned int version () const
 
 ~FWConfigurableParameterizable () override
 
- Public Member Functions inherited from FWParameterizable
void add (FWParameterBase *)
 
const_iterator begin () const
 
const_iterator end () const
 
 FWParameterizable ()
 
 FWParameterizable (const FWParameterizable &)=delete
 
const FWParameterizableoperator= (const FWParameterizable &)=delete
 
virtual ~FWParameterizable ()
 
- Public Member Functions inherited from FWConfigurable
 FWConfigurable ()
 
 FWConfigurable (const FWConfigurable &)=delete
 
const FWConfigurableoperator= (const FWConfigurable &)=delete
 
virtual ~FWConfigurable ()
 
- Public Member Functions inherited from FWParameterSetterEditorBase
 FWParameterSetterEditorBase ()
 
 FWParameterSetterEditorBase (const FWParameterSetterEditorBase &)=delete
 
const FWParameterSetterEditorBaseoperator= (const FWParameterSetterEditorBase &)=delete
 
virtual void updateEditor ()
 
virtual ~FWParameterSetterEditorBase ()
 

Protected Member Functions

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

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
 
FWEveDigitSetScalableMarkerm_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 41 of file FWGeometryTableViewBase.h.

Constructor & Destructor Documentation

◆ FWGeometryTableViewBase() [1/2]

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

Definition at line 148 of file FWGeometryTableViewBase.cc.

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

151  : FWViewBase(type),
152  m_topNodeIdx(this, "TopNodeIndex", -1l, 0, 1e7),
153  m_autoExpand(this, "ExpandList:", 1l, 0l, 100l),
154  m_enableHighlight(this, "EnableHighlight", true),
155  m_parentTransparencyFactor(this, "ParentTransparencyFactor", 1l, 0l, 100l),
156  m_leafTransparencyFactor(this, "LeafTransparencyFactor", 1l, 0l, 100l),
157  m_minParentTransparency(this, "MinParentTransparency", type == FWViewType::kOverlapTable ? 0l : 90l, 0l, 100l),
158  m_minLeafTransparency(this, "MinLeafTransparency", 0l, 0l, 100l),
159  m_colorManager(colMng),
160  m_colorPopup(nullptr),
161  m_eveWindow(nullptr),
162  m_frame(nullptr),
163  m_viewBox(nullptr),
164  m_viewersConfig(nullptr),
165  m_enableRedraw(true),
166  m_marker(nullptr),
167  m_eveTopNode(nullptr),
168  m_eveScene(nullptr),
170  m_eveWindow = iParent->MakeFrame(nullptr);
171  TGCompositeFrame* xf = m_eveWindow->GetGUICompositeFrame();
172 
173  m_frame = new FWGeometryVF(xf, this);
174 
175  xf->AddFrame(m_frame, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
176 
181 }
FWEveDigitSetScalableMarker * m_marker
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:32

◆ ~FWGeometryTableViewBase()

FWGeometryTableViewBase::~FWGeometryTableViewBase ( )
override

Definition at line 210 of file FWGeometryTableViewBase.cc.

References getTableManager(), m_eveWindow, and m_frame.

210  {
211  // take out composite frame and delete it directly (zwithout the timeout)
212  TGCompositeFrame* frame = m_eveWindow->GetGUICompositeFrame();
213  frame->RemoveFrame(m_frame);
214  delete m_frame;
215 
216  m_eveWindow->DestroyWindowAndSlot();
217  delete getTableManager();
218 }
virtual FWGeometryTableManagerBase * getTableManager()

◆ FWGeometryTableViewBase() [2/2]

FWGeometryTableViewBase::FWGeometryTableViewBase ( const FWGeometryTableViewBase )
private

Member Function Documentation

◆ addTo()

void FWGeometryTableViewBase::addTo ( FWConfiguration iTo) const
overridevirtual

Reimplemented from FWConfigurableParameterizable.

Definition at line 552 of file FWGeometryTableViewBase.cc.

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

552  {
554 
555  FWConfiguration viewers(1);
556  FWConfiguration tempArea;
557 
558  for (TEveElement::List_i k = gEve->GetViewers()->BeginChildren(); k != gEve->GetViewers()->EndChildren(); ++k) {
559  for (TEveElement::List_i eit = (*k)->BeginChildren(); eit != (*k)->EndChildren(); ++eit) {
560  TEveScene* s = ((TEveSceneInfo*)*eit)->GetScene();
561  if (s->GetGLScene() == m_eveTopNode->m_scene) {
562  viewers.addKeyValue((*k)->GetElementName(), tempArea);
563  break;
564  }
565  }
566  }
567 
568  iTo.addKeyValue("Viewers", viewers, true);
569 }
FWGeoTopNodeGLScene * m_scene
Definition: FWGeoTopNode.h:66
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
void addTo(FWConfiguration &) const override

◆ cdNode()

void FWGeometryTableViewBase::cdNode ( int  idx)

◆ cdTop()

void FWGeometryTableViewBase::cdTop ( )
virtual

◆ cdUp()

void FWGeometryTableViewBase::cdUp ( )
virtual

◆ cellClicked()

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 360 of file FWGeometryTableViewBase.cc.

References FWColorManager::backgroundColorIndex(), FWGeometryTableManagerBase::cancelEditor(), colors, FWColorManager::fillLimitedColors(), FWGeometryTableManagerBase::firstColumnClicked(), getTableManager(), heavyIonCSV_trainingSettings::idx, 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(), x, and y.

360  {
361  int idx = getTableManager()->rowToIndex()[iRow];
363 
364  if (iColumn != 2)
365  getTableManager()->cancelEditor(false);
366 
367  bool elementChanged = false;
368  if (iButton == kButton1) {
369  if (iColumn == 0) {
370  Window_t wdummy;
371  Int_t xLoc, yLoc;
372  gVirtualX->TranslateCoordinates(
373  gClient->GetDefaultRoot()->GetId(), m_tableWidget->GetId(), x, y, xLoc, yLoc, wdummy);
374 
375  if (getTableManager()->firstColumnClicked(iRow, xLoc))
377  } else if (iColumn == 1) {
378  std::vector<Color_t> colors;
380 
381  if (!m_colorPopup) {
382  m_colorPopup = new FWColorPopup(gClient->GetDefaultRoot(), colors.front());
384  m_colorPopup->Connect("ColorSelected(Color_t)",
385  "FWGeometryTableViewBase",
386  const_cast<FWGeometryTableViewBase*>(this),
387  "nodeColorChangeRequested(Color_t");
388  }
390  m_colorPopup->SetName("Selected");
392  m_colorPopup->PlacePopup(x, y, m_colorPopup->GetDefaultWidth(), m_colorPopup->GetDefaultHeight());
393  return;
394  } else if (iColumn == 2) {
395  // transparency edit
397  } else if (iColumn == 3) {
398  // vis self
399  getTableManager()->setVisibility(ni, !getTableManager()->getVisibility(ni));
400  elementChanged = true;
401  } else if (iColumn == 4) {
402  // vis children
403  getTableManager()->setVisibilityChld(ni, !getTableManager()->getVisibilityChld(ni));
404  elementChanged = true;
405  } else if (iColumn == 6) {
406  // used in overlaps for RnrMarker column
407  ni.switchBit(BIT(5));
408  elementChanged = true;
409  } else {
411  }
412 
413  if (elementChanged) {
414  refreshTable3D();
415  // getTableManager()->dataChanged();
416  }
417  } else if (iColumn == 0) {
419  m_eveTopNode->popupMenu(x, y, nullptr);
420  }
421 }
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) override
virtual void setVisibilityChld(NodeInfo &, bool)
BackgroundColorIndex backgroundColorIndex() const
void PlacePopup(Int_t x, Int_t y, UInt_t w, UInt_t h)
vector< Color_t > colors
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)
Definition: colors.py:1
void fillLimitedColors(std::vector< Color_t > &cv) const
virtual FWGeometryTableManagerBase * getTableManager()

◆ checkExpandLevel()

void FWGeometryTableViewBase::checkExpandLevel ( )

Definition at line 266 of file FWGeometryTableViewBase.cc.

References getTableManager(), mps_fire::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().

266  {
267  // check expand state
268  int ae = m_autoExpand.value();
269  if (m_topNodeIdx.value() > 0)
270  ae += getTableManager()->refEntries().at(m_topNodeIdx.value()).m_level;
271 
273  i != getTableManager()->refEntries().end();
274  ++i) {
275  if (i->m_level < ae)
277  else
279  }
280 }
virtual FWGeometryTableManagerBase * getTableManager()

◆ chosenItem()

void FWGeometryTableViewBase::chosenItem ( int  menuIdx)
virtual

Reimplemented in FWOverlapTableView.

Definition at line 452 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(), AlCaHLTBitMon_QueryRunRegistry::string, findQualityFiles::v, X, BeamSpotPI::Y, and BeamSpotPI::Z.

Referenced by FWOverlapTableView::chosenItem().

452  {
453  int selectedIdx = m_eveTopNode->getFirstSelectedTableIndex();
455  // printf("chosen item %s %d\n", ni.name(), menuIdx);
456 
457  TGeoVolume* gv = ni.m_node->GetVolume();
458  bool resetHome = false;
459  if (gv) {
460  switch (menuIdx) {
462  getTableManager()->setVisibility(ni, false);
463  refreshTable3D();
464  break;
465 
467  getTableManager()->setDaughtersSelfVisibility(selectedIdx, false);
468  refreshTable3D();
469  break;
470 
472  getTableManager()->setDaughtersSelfVisibility(selectedIdx, true);
473  refreshTable3D();
474  break;
475 
477  getTableManager()->applyColorTranspToDaughters(selectedIdx, false);
478  refreshTable3D();
479  break;
480 
482  getTableManager()->applyColorTranspToDaughters(selectedIdx, true);
483  refreshTable3D();
484  break;
485 
487  gv->InspectMaterial();
488  break;
489 
491  gv->InspectShape();
492  break;
493 
495  std::string ps;
496  getTableManager()->getNodePath(selectedIdx, ps);
497  std::cout << ps << std::endl;
498  break;
499  }
501  cdNode(selectedIdx);
502  break;
503 
505  cdNode(selectedIdx);
506  resetHome = true;
507  break;
508 
509  case FWGeoTopNode::kCamera: {
510  TGLViewer* v = FWGeoTopNode::s_pickedViewer;
511  v->CurrentCamera().SetExternalCenter(true);
512  v->CurrentCamera().SetCenterVec(FWGeoTopNode::s_pickedCamera3DCenter.X(),
515  v->SetDrawCameraCenter(true);
516  // resetHome = true;
517  break;
518  }
519  default:
520  return;
521  }
522  }
523 
524  if (resetHome)
525  gEve->FullRedraw3D(true, true);
526 }
#define X(str)
Definition: MuonsGrabber.cc:38
virtual void applyColorTranspToDaughters(int selectedIdx, bool recurse)
int getFirstSelectedTableIndex()
void getNodePath(int, std::string &) const
void setDaughtersSelfVisibility(bool)
virtual void setVisibility(NodeInfo &, bool)
static TGLViewer * s_pickedViewer
Definition: FWGeoTopNode.h:88
static TGLVector3 s_pickedCamera3DCenter
Definition: FWGeoTopNode.h:87
virtual FWGeometryTableManagerBase * getTableManager()

◆ ClassDef()

FWGeometryTableViewBase::ClassDef ( FWGeometryTableViewBase  ,
 
)
private

◆ getEnableHighlight()

bool FWGeometryTableViewBase::getEnableHighlight ( )
inline

◆ getLeafTransparencyFactor()

long FWGeometryTableViewBase::getLeafTransparencyFactor ( ) const
inline

◆ getMarker()

FWEveDigitSetScalableMarker* FWGeometryTableViewBase::getMarker ( )
inline

Definition at line 99 of file FWGeometryTableViewBase.h.

References m_marker.

Referenced by FWOverlapTableManager::addOverlapEntry(), and FWOverlapTableManager::importOverlaps().

99 { return m_marker; }
FWEveDigitSetScalableMarker * m_marker

◆ getMinLeafTransparency()

long FWGeometryTableViewBase::getMinLeafTransparency ( ) const
inline

◆ getMinParentTransparency()

long FWGeometryTableViewBase::getMinParentTransparency ( ) const
inline

◆ getParentTransparencyFactor()

long FWGeometryTableViewBase::getParentTransparencyFactor ( ) const
inline

◆ getTableManager()

virtual FWGeometryTableManagerBase* FWGeometryTableViewBase::getTableManager ( )
inlinevirtual

◆ getTopNodeIdx()

int FWGeometryTableViewBase::getTopNodeIdx ( ) const
inline

◆ nodeColorChangeRequested()

void FWGeometryTableViewBase::nodeColorChangeRequested ( Color_t  col)

Definition at line 438 of file FWGeometryTableViewBase.cc.

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

438  {
439  // AMT: need to add virtual FWGeometryTableView::nodeColorChangeRequested() for volume mode
440 
441  // printf("color change %d \n", m_tableRowIndexForColorPopup);
442  if (m_tableRowIndexForColorPopup >= 0) {
444  ni.m_color = col;
445  ni.m_node->GetVolume()->SetLineColor(col);
446  refreshTable3D();
448  }
449 }
col
Definition: cuy.py:1009
virtual FWGeometryTableManagerBase * getTableManager()

◆ operator=()

const FWGeometryTableViewBase& FWGeometryTableViewBase::operator= ( const FWGeometryTableViewBase )
private

◆ populate3DViewsFromConfig()

void FWGeometryTableViewBase::populate3DViewsFromConfig ( )

Definition at line 284 of file FWGeometryTableViewBase.cc.

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

Referenced by FWGUIManager::setFrom().

284  {
285  // post-config
286  if (m_viewersConfig) {
287  TEveElementList* viewers = gEve->GetViewers();
289 
290  if (nullptr != keyVals) {
291  for (FWConfiguration::KeyValuesIt it = keyVals->begin(); it != keyVals->end(); ++it) {
292  TString sname = it->first;
293  TEveViewer* v = dynamic_cast<TEveViewer*>(viewers->FindChild(sname.Data()));
294  if (!v) {
295  fwLog(fwlog::kError) << "FWGeometryTableViewBase::populate3DViewsFromConfig no viewer found " << it->first
296  << std::endl;
297  return;
298  }
299  v->AddScene(m_eveScene);
301  if (m_marker)
302  getMarkerScene(v)->AddElement(m_marker);
303 
304  gEve->FullRedraw3D(false, true);
305  }
306  }
307  }
308 }
FWEveDigitSetScalableMarker * m_marker
const FWConfiguration * m_viewersConfig
std::vector< std::pair< std::string, FWConfiguration > > KeyValues
#define fwLog(_level_)
Definition: fwLog.h:45
KeyValues::const_iterator KeyValuesIt
const KeyValues * keyValues() const

◆ populateController()

void FWGeometryTableViewBase::populateController ( ViewerParameterGUI gui) const
overrideprotectedvirtual

Reimplemented from FWViewBase.

Reimplemented in FWOverlapTableView, and FWGeometryTableView.

Definition at line 607 of file FWGeometryTableViewBase.cc.

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

Referenced by FWOverlapTableView::populateController().

607  {
608  gui.requestTab("Style")
609  .separator()
610  .
611  //addParam(&m_parentTransparencyFactor).
612  // addParam(&m_leafTransparencyFactor).
613  addParam(&m_minParentTransparency)
615  .separator();
616  TGTextButton* butt = new TGTextButton(gui.getTabContainer(), "ReloadColors");
617  gui.getTabContainer()->AddFrame(butt);
618  butt->Connect("Clicked()", "FWGeometryTableViewBase", (FWGeometryTableViewBase*)this, "reloadColors()");
619 }
ViewerParameterGUI & requestTab(const char *)
ViewerParameterGUI & separator()
ViewerParameterGUI & addParam(const FWParameterBase *)
TGCompositeFrame * getTabContainer()

◆ postConst()

void FWGeometryTableViewBase::postConst ( )
protected

Definition at line 183 of file FWGeometryTableViewBase.cc.

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

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

183  {
185  m_frame->AddFrame(m_tableWidget, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 2, 2, 0, 0));
189  m_tableWidget->Connect("cellClicked(Int_t,Int_t,Int_t,Int_t,Int_t,Int_t)",
190  "FWGeometryTableViewBase",
191  this,
192  "cellClicked(Int_t,Int_t,Int_t,Int_t,Int_t,Int_t)");
194  // resetSetters();
195 
196  FWTranspEntry* editor = new FWTranspEntry(m_tableWidget->body(), this);
197  editor->SetBackgroundColor(gVirtualX->GetPixel(kYellow - 7));
198  editor->SetFrameDrawn(false);
199  editor->Connect("ReturnPressed()", "FWGeometryTableViewBase", this, "transparencyChanged()");
201 
202  m_frame->MapSubwindows();
203  editor->UnmapWindow();
204  m_frame->Layout();
205  m_eveWindow->GetGUICompositeFrame()->Layout();
206  m_frame->MapWindow();
207 }
void SetHeaderBackgroundColor(Pixel_t)
void SetLineSeparatorColor(Pixel_t)
void disableGrowInWidth()
FWTabularWidget * body()
Definition: FWTableWidget.h:90
void SetBackgroundColor(Pixel_t) override
void setCellValueEditor(TGTextEntry *editor)
virtual FWGeometryTableManagerBase * getTableManager()

◆ refreshTable3D()

void FWGeometryTableViewBase::refreshTable3D ( )
virtual

Reimplemented in FWOverlapTableView.

Definition at line 535 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().

535  {
536  if (m_enableRedraw) {
537  if (gEve->GetSelection()->HasChild(m_eveTopNode))
538  gEve->GetSelection()->RemoveElement(m_eveTopNode);
539 
540  if (gEve->GetHighlight()->HasChild(m_eveTopNode))
541  gEve->GetHighlight()->RemoveElement(m_eveTopNode);
542 
543  m_eveTopNode->m_scene->PadPaint(m_eveTopNode->m_scene->GetPad());
544  gEve->Redraw3D();
545 
547  }
548 }
FWGeoTopNodeGLScene * m_scene
Definition: FWGeoTopNode.h:66
void redrawTable(bool setExpand=false)
virtual FWGeometryTableManagerBase * getTableManager()

◆ reloadColors()

void FWGeometryTableViewBase::reloadColors ( )

Definition at line 594 of file FWGeometryTableViewBase.cc.

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

594  {
595  // printf("relaodColors \n");
597  i != getTableManager()->refEntries().end();
598  ++i) {
599  i->m_color = i->m_node->GetVolume()->GetLineColor();
600  }
601 
602  refreshTable3D();
603 }
const_iterator begin() const
virtual FWGeometryTableManagerBase * getTableManager()

◆ saveImageTo()

void FWGeometryTableViewBase::saveImageTo ( const std::string &  iName) const
inlineoverridevirtual

Implements FWViewBase.

Definition at line 83 of file FWGeometryTableViewBase.h.

83 {}

◆ selectView()

void FWGeometryTableViewBase::selectView ( int  idx)

Definition at line 312 of file FWGeometryTableViewBase.cc.

References heavyIonCSV_trainingSettings::idx, m_eveScene, m_eveTopNode, m_marker, m_viewBox, FWGeometryTableViewBase::FWViewCombo::setElement(), and findQualityFiles::v.

312  {
313  // callback from sleclect view popup menu
314 
316 
317  TEveElement::List_i it = gEve->GetViewers()->BeginChildren();
318  std::advance(it, idx);
319  TEveViewer* v = (TEveViewer*)(*it);
320 
321  for (TEveElement::List_i eit = v->BeginChildren(); eit != v->EndChildren(); ++eit) {
322  if ((((TEveSceneInfo*)(*eit))->GetScene()) == m_eveScene) {
323  v->RemoveElement(*eit);
324  if (m_marker)
325  getMarkerScene(v)->RemoveElement(m_marker);
326  gEve->Redraw3D();
327  return;
328  }
329  }
330 
331  if (m_marker)
332  getMarkerScene(v)->AddElement(m_marker);
333  v->AddScene(m_eveScene);
334  gEve->Redraw3D();
335 }
FWEveDigitSetScalableMarker * m_marker

◆ setBackgroundColor()

void FWGeometryTableViewBase::setBackgroundColor ( )

Definition at line 423 of file FWGeometryTableViewBase.cc.

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

423  {
424  bool backgroundIsWhite = m_colorManager->backgroundColorIndex() == FWColorManager::kWhiteIndex;
425  if (backgroundIsWhite) {
428  } else {
431  }
432  getTableManager()->setBackgroundToWhite(backgroundIsWhite);
433  gClient->NeedRedraw(m_tableWidget);
434 }
void SetLineSeparatorColor(Pixel_t)
BackgroundColorIndex backgroundColorIndex() const
void SetBackgroundColor(Pixel_t) override
virtual FWGeometryTableManagerBase * getTableManager()

◆ setColumnSelected()

void FWGeometryTableViewBase::setColumnSelected ( int  idx)
private

Definition at line 339 of file FWGeometryTableViewBase.cc.

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

Referenced by cellClicked().

339  {
340  // printf("cell clicled top node %p\n", (void*)m_eveTopNode);
341  if (gEve->GetSelection()->HasChild(m_eveTopNode))
342  gEve->GetSelection()->RemoveElement(m_eveTopNode);
343 
344  if (gEve->GetHighlight()->HasChild(m_eveTopNode))
345  gEve->GetHighlight()->RemoveElement(m_eveTopNode);
346 
347  // reset bits and sets for old selected table entry
350 
352  gEve->GetSelection()->AddElement(m_eveTopNode);
353 
356  gEve->Redraw3D();
357 }
void UnHighlighted() override
void UnSelected() override
bool selectPhysicalFromTable(int)
void redrawTable(bool setExpand=false)
virtual FWGeometryTableManagerBase * getTableManager()

◆ setPath()

void FWGeometryTableViewBase::setPath ( int  parentIdx,
std::string &   
)
virtual

Reimplemented in FWGeometryTableView.

Definition at line 252 of file FWGeometryTableViewBase.cc.

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

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

252  {
254 
255  // printf("set path %d \n", parentIdx);
256  m_topNodeIdx.set(parentIdx);
257  // getTableManager()->refEntries().at(getTopNodeIdx()).setBitVal(FWGeometryTableManagerBase::kVisNodeSelf,!m_disableTopNode.value() );
258  getTableManager()->setLevelOffset(getTableManager()->refEntries().at(getTopNodeIdx()).m_level);
259 
261  refreshTable3D();
262 }
void clearSelection()
Definition: FWGeoTopNode.h:76
virtual FWGeometryTableManagerBase * getTableManager()

◆ setTopNodePathFromConfig()

void FWGeometryTableViewBase::setTopNodePathFromConfig ( const FWConfiguration iFrom)
protected

Definition at line 573 of file FWGeometryTableViewBase.cc.

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

Referenced by FWGeometryTableView::setFrom().

573  {
574  int tn;
576  if (!value)
577  return;
578 
579  std::istringstream s(value->value());
580  s >> tn;
581  int lastIdx = getTableManager()->refEntries().size() - 1;
582  if (tn >= lastIdx) {
583  fwLog(fwlog::kWarning) << Form(
584  "Ignoring node path from confugration file -- %s value larger than number of nodes \n",
585  m_topNodeIdx.name().c_str());
586  return;
587  }
588  // std::cerr << "set top node " << ;
589  m_topNodeIdx.set(tn);
590 }
const std::string & name() const
Definition: value.py:1
#define fwLog(_level_)
Definition: fwLog.h:45
const FWConfiguration * valueForKey(const std::string &iKey) const
virtual FWGeometryTableManagerBase * getTableManager()

◆ transparencyChanged()

void FWGeometryTableViewBase::transparencyChanged ( )

Member Data Documentation

◆ m_autoExpand

FWLongParameter FWGeometryTableViewBase::m_autoExpand
protected

◆ m_colorManager

FWColorManager* FWGeometryTableViewBase::m_colorManager
protected

Definition at line 121 of file FWGeometryTableViewBase.h.

Referenced by cellClicked(), and setBackgroundColor().

◆ m_colorPopup

FWColorPopup* FWGeometryTableViewBase::m_colorPopup
protected

Definition at line 126 of file FWGeometryTableViewBase.h.

Referenced by cellClicked().

◆ m_enableHighlight

FWBoolParameter FWGeometryTableViewBase::m_enableHighlight
protected

Definition at line 113 of file FWGeometryTableViewBase.h.

Referenced by getEnableHighlight().

◆ m_enableRedraw

bool FWGeometryTableViewBase::m_enableRedraw
protected

◆ m_eveScene

TEveScene* FWGeometryTableViewBase::m_eveScene
protected

◆ m_eveTopNode

FWGeoTopNode* FWGeometryTableViewBase::m_eveTopNode
protected

◆ m_eveWindow

TEveWindowFrame* FWGeometryTableViewBase::m_eveWindow
protected

◆ m_frame

TGCompositeFrame* FWGeometryTableViewBase::m_frame
protected

◆ m_leafTransparencyFactor

FWLongParameter FWGeometryTableViewBase::m_leafTransparencyFactor
protected

◆ m_marker

FWEveDigitSetScalableMarker* FWGeometryTableViewBase::m_marker
protected

◆ m_minLeafTransparency

FWLongParameter FWGeometryTableViewBase::m_minLeafTransparency
protected

◆ m_minParentTransparency

FWLongParameter FWGeometryTableViewBase::m_minParentTransparency
protected

◆ m_parentTransparencyFactor

FWLongParameter FWGeometryTableViewBase::m_parentTransparencyFactor
protected

◆ m_tableRowIndexForColorPopup

int FWGeometryTableViewBase::m_tableRowIndexForColorPopup
private

Definition at line 154 of file FWGeometryTableViewBase.h.

Referenced by cellClicked(), and nodeColorChangeRequested().

◆ m_tableWidget

FWTableWidget* FWGeometryTableViewBase::m_tableWidget
protected

Definition at line 122 of file FWGeometryTableViewBase.h.

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

◆ m_topNodeIdx

FWLongParameter FWGeometryTableViewBase::m_topNodeIdx
protected

◆ m_viewBox

FWViewCombo* FWGeometryTableViewBase::m_viewBox
protected

◆ m_viewersConfig

const FWConfiguration* FWGeometryTableViewBase::m_viewersConfig
protected