CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
FWEveOverlap Class Reference

#include <FWEveOverlap.h>

Inheritance diagram for FWEveOverlap:
FWGeoTopNode

Public Member Functions

FWGeometryTableViewBasebrowser () override
 
 FWEveOverlap (FWOverlapTableView *v)
 
TString GetHighlightTooltip () override
 
void Paint (Option_t *option="") override
 
void popupMenu (int x, int y, TGLViewer *v) override
 
FWGeometryTableManagerBasetableManager () override
 
 ~FWEveOverlap () override
 
- Public Member Functions inherited from FWGeoTopNode
void clearSelection ()
 
 FWGeoTopNode (const char *n="FWGeoTopNode", const char *t="FWGeoTopNode")
 
int getFirstSelectedTableIndex ()
 
void Paint (Option_t *option="") override
 
void printSelected ()
 
bool selectPhysicalFromTable (int)
 
void UnHighlighted () override
 
void UnSelected () override
 
 ~FWGeoTopNode () override
 

Private Member Functions

 ClassDefOverride (FWEveOverlap, 0)
 
bool paintChildNodesRecurse (FWGeometryTableManagerBase::Entries_i pIt, Int_t idx, const TGeoHMatrix &mtx)
 

Private Attributes

FWOverlapTableViewm_browser
 

Additional Inherited Members

- Public Types inherited from FWGeoTopNode
enum  MenuOptions {
  kSetTopNode, kSetTopNodeCam, kVisSelfOff, kVisChldOn,
  kVisChldOff, kApplyChldCol, kApplyChldColRec, kCamera,
  kPrintMaterial, kPrintPath, kPrintShape, kPrintOverlap,
  kOverlapVisibilityMotherOn, kOverlapVisibilityMotherOff
}
 
- Public Attributes inherited from FWGeoTopNode
std::set< TGLPhysicalShape * > fHted
 
std::set< TGLPhysicalShape * > fSted
 
FWGeoTopNodeGLScenem_scene
 
- Static Public Attributes inherited from FWGeoTopNode
static TGLVector3 s_pickedCamera3DCenter
 
static TGLViewer * s_pickedViewer = nullptr
 
- Protected Member Functions inherited from FWGeoTopNode
void ClearSet (std::set< TGLPhysicalShape * > &sset)
 
void ComputeBBox () override
 
void EraseFromSet (std::set< TGLPhysicalShape * > &sset, TGLPhysicalShape *id)
 
void paintShape (Int_t idx, const TGeoHMatrix &nm, bool volumeColor, bool parentNode)
 
void ProcessSelection (TGLSelectRecord &rec, std::set< TGLPhysicalShape * > &sset, TGLPhysicalShape *id)
 
FWPopupMenusetPopupMenu (int iX, int iY, TGLViewer *v, bool)
 
void SetStateOf (TGLPhysicalShape *id)
 
void setupBuffMtx (TBuffer3D &buff, const TGeoHMatrix &mat)
 
- Static Protected Member Functions inherited from FWGeoTopNode
static UInt_t phyID (int tableIdx)
 
static int tableIdx (TGLPhysicalShape *ps)
 

Detailed Description

Definition at line 10 of file FWEveOverlap.h.

Constructor & Destructor Documentation

◆ FWEveOverlap()

FWEveOverlap::FWEveOverlap ( FWOverlapTableView v)

Definition at line 11 of file FWEveOverlap.cc.

11 : m_browser(v) {}

◆ ~FWEveOverlap()

FWEveOverlap::~FWEveOverlap ( )
inlineoverride

Definition at line 13 of file FWEveOverlap.h.

13 {}

Member Function Documentation

◆ browser()

FWGeometryTableViewBase * FWEveOverlap::browser ( )
overridevirtual

Reimplemented from FWGeoTopNode.

Definition at line 14 of file FWEveOverlap.cc.

14 { return m_browser; }

References m_browser.

◆ ClassDefOverride()

FWEveOverlap::ClassDefOverride ( FWEveOverlap  ,
 
)
private

◆ GetHighlightTooltip()

TString FWEveOverlap::GetHighlightTooltip ( )
override

Definition at line 92 of file FWEveOverlap.cc.

92  {
93  // printf("highlight tooltio \n");
94  std::set<TGLPhysicalShape*>::iterator it = fHted.begin();
95  int idx = tableIdx(*it);
96  if (idx < 0) {
97  return Form("TopNode ");
98  }
100 
101  TString name = data.name();
102  if (data.testBit(FWOverlapTableManager::kOverlap)) {
103  ((FWOverlapTableManager*)m_browser->getTableManager())->getOverlapTitles(idx, name);
104  return name;
105  }
106 
107  return data.name();
108 }

References data, FWGeoTopNode::fHted, FWOverlapTableView::getTableManager(), training_settings::idx, FWOverlapTableManager::kOverlap, m_browser, Skims_PA_cff::name, FWGeometryTableManagerBase::refEntries(), and FWGeoTopNode::tableIdx().

◆ Paint()

void FWEveOverlap::Paint ( Option_t *  option = "")
override

Definition at line 17 of file FWEveOverlap.cc.

17  {
18  if (m_browser->getTableManager()->refEntries().empty())
19  return;
20 
22 
23  TEveGeoManagerHolder gmgr(FWGeometryTableViewManager::getGeoMangeur());
24 
25  int topNodeIdx = m_browser->getTopNodeIdx();
26 
28  std::advance(sit, topNodeIdx);
29  TGeoHMatrix mtx;
31 
32  bool drawsChildren = false;
33 
34  if ((*sit).testBit(FWGeometryTableManagerBase::kVisNodeChld))
35  drawsChildren = paintChildNodesRecurse(sit, topNodeIdx, mtx);
36 
38  paintShape(topNodeIdx, mtx, false, drawsChildren);
39 }

References FWGeometryTableViewManager::getGeoMangeur(), FWGeometryTableManagerBase::getNodeMatrix(), FWOverlapTableView::getTableManager(), FWGeometryTableViewBase::getTopNodeIdx(), FWGeometryTableManagerBase::kVisNodeChld, FWGeometryTableManagerBase::kVisNodeSelf, m_browser, FWGeoTopNode::Paint(), paintChildNodesRecurse(), FWGeoTopNode::paintShape(), and FWGeometryTableManagerBase::refEntries().

◆ paintChildNodesRecurse()

bool FWEveOverlap::paintChildNodesRecurse ( FWGeometryTableManagerBase::Entries_i  pIt,
Int_t  idx,
const TGeoHMatrix &  mtx 
)
private

Definition at line 42 of file FWEveOverlap.cc.

44  {
45  TGeoNode* parentNode = pIt->m_node;
46  int nD = parentNode->GetNdaughters();
47 
48  int dOff = 0;
49 
50  pIt++;
51  int pcnt = cnt + 1;
52 
53  bool drawsChildren = false;
54 
56  for (int n = 0; n != nD; ++n) {
57  it = pIt;
58  std::advance(it, n + dOff);
59  cnt = pcnt + n + dOff;
60 
61  TGeoHMatrix nm = parentMtx;
62  nm.Multiply(it->m_node->GetMatrix());
63 
64  bool drawsChildrenSecondGen = false;
66  drawsChildrenSecondGen = paintChildNodesRecurse(it, cnt, nm);
67 
69  if (it->testBit(FWOverlapTableManager::kOverlap)) {
70  int nno;
71  it->m_node->GetOverlaps(nno);
72  if ((m_browser->m_rnrOverlap.value() && ((nno & BIT(1)) == BIT(1))) ||
73  (m_browser->m_rnrExtrusion.value() && ((nno & BIT(2)) == BIT(2)))) {
74  paintShape(cnt, nm, false, drawsChildrenSecondGen);
75  drawsChildren = true;
76  }
77 
78  } else {
79  paintShape(cnt, nm, false, drawsChildrenSecondGen);
80  drawsChildren = true;
81  }
82  }
83 
84  drawsChildren |= drawsChildrenSecondGen;
85  FWGeometryTableManagerBase::getNNodesTotal(parentNode->GetDaughter(n), dOff);
86  }
87  return drawsChildren;
88 }

References FWGeometryTableManagerBase::getNNodesTotal(), FWOverlapTableManager::kOverlap, FWOverlapTableManager::kOverlapChild, FWGeometryTableManagerBase::kVisNodeChld, FWGeometryTableManagerBase::kVisNodeSelf, m_browser, FWOverlapTableView::m_rnrExtrusion, FWOverlapTableView::m_rnrOverlap, dqmiodumpmetadata::n, FWGeoTopNode::paintShape(), and FWGenericParameter< T >::value().

Referenced by Paint().

◆ popupMenu()

void FWEveOverlap::popupMenu ( int  x,
int  y,
TGLViewer *  v 
)
overridevirtual

Reimplemented from FWGeoTopNode.

Definition at line 112 of file FWEveOverlap.cc.

112  {
113  FWPopupMenu* nodePopup = setPopupMenu(x, y, v, true);
114 
115  if (nodePopup)
116  nodePopup->Connect("Activated(Int_t)", "FWOverlapTableView", m_browser, "chosenItem(Int_t)");
117 }

References m_browser, FWGeoTopNode::setPopupMenu(), findQualityFiles::v, x, and y.

◆ tableManager()

FWGeometryTableManagerBase * FWEveOverlap::tableManager ( )
overridevirtual

Reimplemented from FWGeoTopNode.

Definition at line 12 of file FWEveOverlap.cc.

12 { return m_browser->getTableManager(); }

References FWOverlapTableView::getTableManager(), and m_browser.

Member Data Documentation

◆ m_browser

FWOverlapTableView* FWEveOverlap::m_browser
private
DDAxes::y
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
FWGeometryTableViewManager::getGeoMangeur
static TGeoManager * getGeoMangeur()
Definition: FWGeometryTableViewManager.cc:78
FWEveOverlap::paintChildNodesRecurse
bool paintChildNodesRecurse(FWGeometryTableManagerBase::Entries_i pIt, Int_t idx, const TGeoHMatrix &mtx)
Definition: FWEveOverlap.cc:42
FWGeoTopNode::tableIdx
static int tableIdx(TGLPhysicalShape *ps)
Definition: FWGeoTopNode.cc:55
DDAxes::x
findQualityFiles.v
v
Definition: findQualityFiles.py:179
training_settings.idx
idx
Definition: training_settings.py:16
FWOverlapTableManager::kOverlapChild
Definition: FWOverlapTableManager.h:33
FWOverlapTableManager::kOverlap
Definition: FWOverlapTableManager.h:33
FWOverlapTableView::m_rnrOverlap
FWBoolParameter m_rnrOverlap
Definition: FWOverlapTableView.h:81
FWEveOverlap::m_browser
FWOverlapTableView * m_browser
Definition: FWEveOverlap.h:23
FWGeometryTableManagerBase::getNNodesTotal
static void getNNodesTotal(TGeoNode *geoNode, int &off)
Definition: FWGeometryTableManagerBase.h:204
FWOverlapTableView::getTableManager
FWGeometryTableManagerBase * getTableManager() override
Definition: FWOverlapTableView.cc:165
FWGeometryTableManagerBase::getNodeMatrix
void getNodeMatrix(const NodeInfo &nodeInfo, TGeoHMatrix &mat) const
Definition: FWGeometryTableManagerBase.cc:161
FWPopupMenu
Definition: FWPopupMenu.cc:5
FWGeometryTableManagerBase::kVisNodeSelf
Definition: FWGeometryTableManagerBase.h:45
FWGeoTopNode::paintShape
void paintShape(Int_t idx, const TGeoHMatrix &nm, bool volumeColor, bool parentNode)
Definition: FWGeoTopNode.cc:213
FWGeometryTableManagerBase::refEntries
Entries_v & refEntries()
Definition: FWGeometryTableManagerBase.h:143
FWGeometryTableViewBase::getTopNodeIdx
int getTopNodeIdx() const
Definition: FWGeometryTableViewBase.h:97
FWGeometryTableManagerBase::NodeInfo
Definition: FWGeometryTableManagerBase.h:52
FWGenericParameter::value
T value() const
Definition: FWGenericParameter.h:50
FWOverlapTableManager
Definition: FWOverlapTableManager.h:31
FWOverlapTableView::m_rnrExtrusion
FWBoolParameter m_rnrExtrusion
Definition: FWOverlapTableView.h:82
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
FWGeoTopNode::setPopupMenu
FWPopupMenu * setPopupMenu(int iX, int iY, TGLViewer *v, bool)
Definition: FWGeoTopNode.cc:336
FWGeometryTableManagerBase::Entries_i
Entries_v::iterator Entries_i
Definition: FWGeometryTableManagerBase.h:88
FWGeometryTableManagerBase::kVisNodeChld
Definition: FWGeometryTableManagerBase.h:46
FWGeoTopNode::fHted
std::set< TGLPhysicalShape * > fHted
Definition: FWGeoTopNode.h:71
FWGeoTopNode::Paint
void Paint(Option_t *option="") override
Definition: FWGeoTopNode.cc:294