CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

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

Private Member Functions

 ClassDef (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 = 0
 
- Protected Member Functions inherited from FWGeoTopNode
void ClearSet (std::set< TGLPhysicalShape * > &sset)
 
virtual void ComputeBBox ()
 
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
virtual FWEveOverlap::~FWEveOverlap ( )
inlinevirtual

Definition at line 14 of file FWEveOverlap.h.

14 {}

Member Function Documentation

FWGeometryTableViewBase * FWEveOverlap::browser ( )
virtual

Reimplemented from FWGeoTopNode.

Definition at line 20 of file FWEveOverlap.cc.

References m_browser.

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

Definition at line 110 of file FWEveOverlap.cc.

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

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
virtual FWGeometryTableManagerBase * getTableManager()
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
std::set< TGLPhysicalShape * > fHted
Definition: FWGeoTopNode.h:73
static int tableIdx(TGLPhysicalShape *ps)
Definition: FWGeoTopNode.cc:59
void FWEveOverlap::Paint ( Option_t *  option = "")
virtual

Reimplemented from FWGeoTopNode.

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().

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

Reimplemented from FWGeoTopNode.

Definition at line 134 of file FWEveOverlap.cc.

References m_browser, and FWGeoTopNode::setPopupMenu().

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 ( )
virtual

Reimplemented from FWGeoTopNode.

Definition at line 15 of file FWEveOverlap.cc.

References FWOverlapTableView::getTableManager(), and m_browser.

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

Member Data Documentation

FWOverlapTableView* FWEveOverlap::m_browser
private