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 ( FWOverlapTableView v)

Definition at line 11 of file FWEveOverlap.cc.

11  :
12  m_browser(v)
13 {
14 }
FWOverlapTableView * m_browser
Definition: FWEveOverlap.h:23
FWEveOverlap::~FWEveOverlap ( )
inlineoverride

Member Function Documentation

FWGeometryTableViewBase * FWEveOverlap::browser ( )
overridevirtual

Reimplemented from FWGeoTopNode.

Definition at line 20 of file FWEveOverlap.cc.

References m_browser.

Referenced by ~FWEveOverlap().

21 {
22  return m_browser;
23 }
FWOverlapTableView * m_browser
Definition: FWEveOverlap.h:23
FWEveOverlap::ClassDefOverride ( FWEveOverlap  ,
 
)
private
TString FWEveOverlap::GetHighlightTooltip ( )
override

Definition at line 110 of file FWEveOverlap.cc.

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

Referenced by ~FWEveOverlap().

111 {
112  // printf("highlight tooltio \n");
113  std::set<TGLPhysicalShape*>::iterator it = fHted.begin();
114  int idx = tableIdx(*it);
115  if ( idx < 0)
116  {
117  return Form("TopNode ");
118  }
120 
121  TString name = data.name();
123 
124  ((FWOverlapTableManager*)m_browser->getTableManager())->getOverlapTitles(idx, name);
125  return name;
126  }
127 
128  return data.name();
129 }
FWOverlapTableView * m_browser
Definition: FWEveOverlap.h:23
FWGeometryTableManagerBase * getTableManager() override
std::set< TGLPhysicalShape * > fHted
Definition: FWGeoTopNode.h:73
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
static int tableIdx(TGLPhysicalShape *ps)
Definition: FWGeoTopNode.cc:59
void FWEveOverlap::Paint ( Option_t *  option = "")
override

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

Referenced by ~FWEveOverlap().

27 {
28 
29  if (m_browser->getTableManager()->refEntries().empty()) return;
30 
32 
33  TEveGeoManagerHolder gmgr( FWGeometryTableViewManager::getGeoMangeur());
34 
35 
36  int topNodeIdx = m_browser->getTopNodeIdx();
37 
39  std::advance(sit,topNodeIdx );
40  TGeoHMatrix mtx;
42 
43  bool drawsChildren = false;
44 
45  if ( (*sit).testBit(FWGeometryTableManagerBase::kVisNodeChld))
46  drawsChildren = paintChildNodesRecurse( sit, topNodeIdx, mtx);
47 
49  paintShape(topNodeIdx,mtx, false, drawsChildren);
50 }
FWOverlapTableView * m_browser
Definition: FWEveOverlap.h:23
FWGeometryTableManagerBase * getTableManager() override
void getNodeMatrix(const NodeInfo &nodeInfo, TGeoHMatrix &mat) const
bool paintChildNodesRecurse(FWGeometryTableManagerBase::Entries_i pIt, Int_t idx, const TGeoHMatrix &mtx)
Definition: FWEveOverlap.cc:54
void paintShape(Int_t idx, const TGeoHMatrix &nm, bool volumeColor, bool parentNode)
void Paint(Option_t *option="") override
bool FWEveOverlap::paintChildNodesRecurse ( FWGeometryTableManagerBase::Entries_i  pIt,
Int_t  idx,
const TGeoHMatrix &  mtx 
)
private

Definition at line 54 of file FWEveOverlap.cc.

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

Referenced by Paint().

55 {
56 
57  TGeoNode* parentNode = pIt->m_node;
58  int nD = parentNode->GetNdaughters();
59 
60  int dOff=0;
61 
62  pIt++;
63  int pcnt = cnt+1;
64 
65  bool drawsChildren = false;
66 
68  for (int n = 0; n != nD; ++n)
69  {
70  it = pIt;
71  std::advance(it,n + dOff);
72  cnt = pcnt + n+dOff;
73 
74  TGeoHMatrix nm = parentMtx;
75  nm.Multiply(it->m_node->GetMatrix());
76 
77  bool drawsChildrenSecondGen = false;
79  drawsChildrenSecondGen = paintChildNodesRecurse(it,cnt , nm);
80 
82  {
83  if (it->testBit(FWOverlapTableManager::kOverlap))
84  {
85  int nno;it->m_node->GetOverlaps(nno);
86  if ( (m_browser->m_rnrOverlap.value() && ((nno & BIT(1)) == BIT(1)) )
87  || (m_browser->m_rnrExtrusion.value() && ((nno & BIT(2)) == BIT(2)) ))
88  {
89  paintShape(cnt , nm, false, drawsChildrenSecondGen);
90  drawsChildren = true;
91  }
92 
93  }
94  else
95  {
96  paintShape(cnt , nm, false, drawsChildrenSecondGen);
97  drawsChildren = true;
98  }
99  }
100 
101  drawsChildren |= drawsChildrenSecondGen;
102  FWGeometryTableManagerBase::getNNodesTotal(parentNode->GetDaughter(n), dOff);
103  }
104  return drawsChildren;
105 }
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:54
FWBoolParameter m_rnrExtrusion
static void getNNodesTotal(TGeoNode *geoNode, int &off)
void paintShape(Int_t idx, const TGeoHMatrix &nm, bool volumeColor, bool parentNode)
void FWEveOverlap::popupMenu ( int  x,
int  y,
TGLViewer *  v 
)
overridevirtual

Reimplemented from FWGeoTopNode.

Definition at line 134 of file FWEveOverlap.cc.

References m_browser, and FWGeoTopNode::setPopupMenu().

Referenced by ~FWEveOverlap().

135 {
136  FWPopupMenu* nodePopup = setPopupMenu(x, y,v, true);
137 
138  if (nodePopup) nodePopup->Connect("Activated(Int_t)",
139  "FWOverlapTableView",
140  m_browser,
141  "chosenItem(Int_t)");
142 }
FWOverlapTableView * m_browser
Definition: FWEveOverlap.h:23
FWPopupMenu * setPopupMenu(int iX, int iY, TGLViewer *v, bool)
FWGeometryTableManagerBase * FWEveOverlap::tableManager ( )
overridevirtual

Reimplemented from FWGeoTopNode.

Definition at line 15 of file FWEveOverlap.cc.

References FWOverlapTableView::getTableManager(), and m_browser.

Referenced by ~FWEveOverlap().

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

Member Data Documentation

FWOverlapTableView* FWEveOverlap::m_browser
private