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) {}
FWOverlapTableView * m_browser
Definition: FWEveOverlap.h:23

◆ ~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.

References m_browser.

15 { return m_browser; }
FWOverlapTableView * m_browser
Definition: FWEveOverlap.h:23

◆ ClassDefOverride()

FWEveOverlap::ClassDefOverride ( FWEveOverlap  ,
 
)
private

◆ GetHighlightTooltip()

TString FWEveOverlap::GetHighlightTooltip ( )
override

Definition at line 93 of file FWEveOverlap.cc.

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

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 }
FWOverlapTableView * m_browser
Definition: FWEveOverlap.h:23
FWGeometryTableManagerBase * getTableManager() override
std::set< TGLPhysicalShape * > fHted
Definition: FWGeoTopNode.h:71
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
static int tableIdx(TGLPhysicalShape *ps)
Definition: FWGeoTopNode.cc:55

◆ Paint()

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

Definition at line 18 of file FWEveOverlap.cc.

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

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 }
FWOverlapTableView * m_browser
Definition: FWEveOverlap.h:23
FWGeometryTableManagerBase * getTableManager() override
bool paintChildNodesRecurse(FWGeometryTableManagerBase::Entries_i pIt, Int_t idx, const TGeoHMatrix &mtx)
Definition: FWEveOverlap.cc:43
void paintShape(Int_t idx, const TGeoHMatrix &nm, bool volumeColor, bool parentNode)
void Paint(Option_t *option="") override
void getNodeMatrix(const NodeInfo &nodeInfo, TGeoHMatrix &mat) const

◆ paintChildNodesRecurse()

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

Definition at line 43 of file FWEveOverlap.cc.

References FWGeometryTableManagerBase::getNNodesTotal(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, 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().

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 }
FWBoolParameter m_rnrOverlap
FWOverlapTableView * m_browser
Definition: FWEveOverlap.h:23
bool paintChildNodesRecurse(FWGeometryTableManagerBase::Entries_i pIt, Int_t idx, const TGeoHMatrix &mtx)
Definition: FWEveOverlap.cc:43
FWBoolParameter m_rnrExtrusion
static void getNNodesTotal(TGeoNode *geoNode, int &off)
void paintShape(Int_t idx, const TGeoHMatrix &nm, bool volumeColor, bool parentNode)

◆ popupMenu()

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

Reimplemented from FWGeoTopNode.

Definition at line 113 of file FWEveOverlap.cc.

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

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 }
FWOverlapTableView * m_browser
Definition: FWEveOverlap.h:23
FWPopupMenu * setPopupMenu(int iX, int iY, TGLViewer *v, bool)

◆ tableManager()

FWGeometryTableManagerBase * FWEveOverlap::tableManager ( )
overridevirtual

Reimplemented from FWGeoTopNode.

Definition at line 13 of file FWEveOverlap.cc.

References FWOverlapTableView::getTableManager(), and m_browser.

13 { return m_browser->getTableManager(); }
FWOverlapTableView * m_browser
Definition: FWEveOverlap.h:23
FWGeometryTableManagerBase * getTableManager() override

Member Data Documentation

◆ m_browser

FWOverlapTableView* FWEveOverlap::m_browser
private