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 12 of file FWEveOverlap.cc.

12 : 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 15 of file FWEveOverlap.cc.

15 { return m_browser; }

References m_browser.

◆ ClassDefOverride()

FWEveOverlap::ClassDefOverride ( FWEveOverlap  ,
 
)
private

◆ GetHighlightTooltip()

TString FWEveOverlap::GetHighlightTooltip ( )
override

Definition at line 93 of file FWEveOverlap.cc.

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

References data, FWGeoTopNode::fHted, FWOverlapTableView::getTableManager(), heavyIonCSV_trainingSettings::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 18 of file FWEveOverlap.cc.

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

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 43 of file FWEveOverlap.cc.

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

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 113 of file FWEveOverlap.cc.

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

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

◆ tableManager()

FWGeometryTableManagerBase * FWEveOverlap::tableManager ( )
overridevirtual

Reimplemented from FWGeoTopNode.

Definition at line 13 of file FWEveOverlap.cc.

13 { 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:43
FWGeoTopNode::tableIdx
static int tableIdx(TGLPhysicalShape *ps)
Definition: FWGeoTopNode.cc:55
DDAxes::x
findQualityFiles.v
v
Definition: findQualityFiles.py:179
FWOverlapTableManager::kOverlapChild
Definition: FWOverlapTableManager.h:33
FWOverlapTableManager::kOverlap
Definition: FWOverlapTableManager.h:33
FWOverlapTableView::m_rnrOverlap
FWBoolParameter m_rnrOverlap
Definition: FWOverlapTableView.h:81
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
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