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
FWEveDetectorGeo Class Reference

#include <FWEveDetectorGeo.h>

Inheritance diagram for FWEveDetectorGeo:
FWGeoTopNode

Public Member Functions

virtual FWGeometryTableViewBasebrowser ()
 
 FWEveDetectorGeo (FWGeometryTableView *v)
 
virtual TString GetHighlightTooltip ()
 
virtual void Paint (Option_t *option="")
 
virtual void popupMenu (int x, int y, TGLViewer *)
 
virtual
FWGeometryTableManagerBase
tableManager ()
 
virtual ~FWEveDetectorGeo ()
 
- 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 (FWEveDetectorGeo, 0)
 
bool paintChildNodesRecurse (FWGeometryTableManagerBase::Entries_i pIt, Int_t idx, const TGeoHMatrix &mtx)
 

Private Attributes

FWGeometryTableViewm_browser
 
bool m_filterOff
 
int m_maxLevel
 

Additional Inherited Members

- Public Types inherited from FWGeoTopNode
enum  MenuOptions {
  kSetTopNode, kSetTopNodeCam, kVisSelfOff, kVisChldOn,
  kVisChldOff, 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 FWEveDetectorGeo.h.

Constructor & Destructor Documentation

FWEveDetectorGeo::FWEveDetectorGeo ( FWGeometryTableView v)

Definition at line 13 of file FWEveDetectorGeo.cc.

13  :
15 {
16 }
FWGeometryTableView * m_browser
virtual FWEveDetectorGeo::~FWEveDetectorGeo ( )
inlinevirtual

Definition at line 14 of file FWEveDetectorGeo.h.

14 {}

Member Function Documentation

FWGeometryTableViewBase * FWEveDetectorGeo::browser ( )
virtual

Reimplemented from FWGeoTopNode.

Definition at line 23 of file FWEveDetectorGeo.cc.

References m_browser.

24 {
25  return m_browser;
26 }
FWGeometryTableView * m_browser
FWEveDetectorGeo::ClassDef ( FWEveDetectorGeo  ,
 
)
private
TString FWEveDetectorGeo::GetHighlightTooltip ( )
virtual

Definition at line 126 of file FWEveDetectorGeo.cc.

References data, FWGeoTopNode::fHted, FWGeometryTableView::getTableManager(), customizeTrackingMonitorSeedNumber::idx, m_browser, FWGeometryTableManagerBase::NodeInfo::name(), FWGeometryTableManagerBase::refEntries(), and FWGeoTopNode::tableIdx().

127 {
128  std::set<TGLPhysicalShape*>::iterator it = fHted.begin();
129  int idx = tableIdx(*it);
130  if (idx > 0)
131  {
133  return data.name();
134  }
135  return "error";
136 }
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
std::set< TGLPhysicalShape * > fHted
Definition: FWGeoTopNode.h:72
FWGeometryTableView * m_browser
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
static int tableIdx(TGLPhysicalShape *ps)
Definition: FWGeoTopNode.cc:60
virtual FWGeometryTableManagerBase * getTableManager()
void FWEveDetectorGeo::Paint ( Option_t *  option = "")
virtual

Reimplemented from FWGeoTopNode.

Definition at line 29 of file FWEveDetectorGeo.cc.

References FWGeometryTableView::getFilter(), FWGeometryTableViewManager::getGeoMangeur(), FWGeometryTableManagerBase::getLevelOffset(), FWGeometryTableManagerBase::getNodeMatrix(), FWGeometryTableView::getTableManager(), FWGeometryTableViewBase::getTopNodeIdx(), FWGeometryTableView::getVisLevel(), FWGeometryTableView::getVolumeMode(), FWGeometryTableManagerBase::kVisNodeSelf, m_browser, m_filterOff, m_maxLevel, FWGeoTopNode::Paint(), paintChildNodesRecurse(), FWGeoTopNode::paintShape(), FWGeometryTableManagerBase::refEntries(), and tableManager().

30 {
32 
33  // printf("PAINPAINTPAINTPAINTPAINTPAINTPAINTPAINTPAINTPAINTT %d/%d \n", m_browser->getTopNodeIdx(), (int)m_browser->getTableManager()->refEntries().size());
34  if (m_browser->getTableManager()->refEntries().empty()) return;
35 
36  TEveGeoManagerHolder gmgr( FWGeometryTableViewManager::getGeoMangeur());
37 
39 
40  m_filterOff = m_browser->getFilter().empty();
41 
42  Int_t topIdx = m_browser->getTopNodeIdx();
44 
45  TGeoHMatrix mtx;
46  if (topIdx >= 0)
47  {
48  std::advance(sit, topIdx);
50  }
51 
52  bool drawsChildren = 0;
53 
54  if ( ((FWGeometryTableManager*)tableManager())->getVisibilityChld(*sit))
55  drawsChildren = paintChildNodesRecurse( sit, topIdx, mtx);
56 
57  if (sit->testBit(FWGeometryTableManagerBase::kVisNodeSelf) && ((FWGeometryTableManager*)tableManager())->getVisibility(*sit))
58  paintShape( topIdx,mtx, m_browser->getVolumeMode(), drawsChildren );
59 
60 
61  fflush(stdout);
62 }
bool paintChildNodesRecurse(FWGeometryTableManagerBase::Entries_i pIt, Int_t idx, const TGeoHMatrix &mtx)
virtual FWGeometryTableManagerBase * tableManager()
void getNodeMatrix(const NodeInfo &nodeInfo, TGeoHMatrix &mat) const
std::string getFilter() const
virtual void Paint(Option_t *option="")
bool getVolumeMode() const
void paintShape(Int_t idx, const TGeoHMatrix &nm, bool volumeColor, bool parentNode)
FWGeometryTableView * m_browser
virtual FWGeometryTableManagerBase * getTableManager()
bool FWEveDetectorGeo::paintChildNodesRecurse ( FWGeometryTableManagerBase::Entries_i  pIt,
Int_t  idx,
const TGeoHMatrix &  mtx 
)
private

Definition at line 66 of file FWEveDetectorGeo.cc.

References FWGeometryTableView::getIgnoreVisLevelWhenFilter(), FWGeometryTableManagerBase::getNNodesTotal(), FWGeometryTableView::getVolumeMode(), FWGeometryTableView::isSelectedByRegion(), m_browser, m_filterOff, m_maxLevel, n, FWGeoTopNode::paintShape(), and tableManager().

Referenced by Paint().

67 {
68  TGeoNode* parentNode = pIt->m_node;
69  int nD = parentNode->GetNdaughters();
70 
71  int dOff=0;
72 
73  pIt++;
74  int pcnt = cnt+1;
75 
76  bool drawsChildNodes = 0;
77 
79  for (int n = 0; n != nD; ++n)
80  {
81  it = pIt;
82  std::advance(it,n + dOff);
83  cnt = pcnt + n+dOff;
84 
85  TGeoHMatrix nm = parentMtx;
86  nm.Multiply(it->m_node->GetMatrix());
87 
88  bool drawsChildNodesSecondGen = false;
90  {
91  if ( ((FWGeometryTableManager*)tableManager())->getVisibilityChld(*it) && ( it->m_level < m_maxLevel)) {
92  drawsChildNodesSecondGen = paintChildNodesRecurse(it,cnt , nm);
93  }
94 
95  if ( ((FWGeometryTableManager*)tableManager())->getVisibility(*it))
96  {
97  paintShape(cnt , nm, m_browser->getVolumeMode(), drawsChildNodesSecondGen );
98  drawsChildNodes = true;
99  }
100 
101  }
102  else
103  {
104  if ( ((FWGeometryTableManager*)tableManager())->getVisibilityChld(*it) && ( it->m_level < m_maxLevel || m_browser->getIgnoreVisLevelWhenFilter() ))
105  {
106  drawsChildNodesSecondGen = paintChildNodesRecurse(it,cnt , nm);
107  }
108 
109  ((FWGeometryTableManager*)tableManager())->assertNodeFilterCache(*it);
110  if ( ((FWGeometryTableManager*)tableManager())->getVisibility(*it))
111  {
112  paintShape(cnt , nm, m_browser->getVolumeMode(), drawsChildNodesSecondGen );
113  drawsChildNodes = true;
114  }
115  }
116 
117  drawsChildNodes |= drawsChildNodesSecondGen;
118  FWGeometryTableManagerBase::getNNodesTotal(parentNode->GetDaughter(n), dOff);
119  }
120 
121  return drawsChildNodes;
122 }
bool paintChildNodesRecurse(FWGeometryTableManagerBase::Entries_i pIt, Int_t idx, const TGeoHMatrix &mtx)
virtual FWGeometryTableManagerBase * tableManager()
bool isSelectedByRegion() const
bool getIgnoreVisLevelWhenFilter() const
static void getNNodesTotal(TGeoNode *geoNode, int &off)
bool getVolumeMode() const
void paintShape(Int_t idx, const TGeoHMatrix &nm, bool volumeColor, bool parentNode)
FWGeometryTableView * m_browser
void FWEveDetectorGeo::popupMenu ( int  x,
int  y,
TGLViewer *  v 
)
virtual

Reimplemented from FWGeoTopNode.

Definition at line 140 of file FWEveDetectorGeo.cc.

References m_browser, and FWGeoTopNode::setPopupMenu().

141 {
142  FWPopupMenu* nodePopup = FWGeoTopNode::setPopupMenu(x, y, v, false);
143 
144  if (nodePopup) nodePopup->Connect("Activated(Int_t)",
145  "FWGeometryTableView",
146  m_browser,
147  "chosenItem(Int_t)");
148 }
FWPopupMenu * setPopupMenu(int iX, int iY, TGLViewer *v, bool)
FWGeometryTableView * m_browser
Definition: DDAxes.h:10
FWGeometryTableManagerBase * FWEveDetectorGeo::tableManager ( )
virtual

Reimplemented from FWGeoTopNode.

Definition at line 18 of file FWEveDetectorGeo.cc.

References FWGeometryTableView::getTableManager(), and m_browser.

Referenced by Paint(), and paintChildNodesRecurse().

19 {
20  return m_browser->getTableManager();
21 }
FWGeometryTableView * m_browser
virtual FWGeometryTableManagerBase * getTableManager()

Member Data Documentation

FWGeometryTableView* FWEveDetectorGeo::m_browser
private
bool FWEveDetectorGeo::m_filterOff
private

Definition at line 37 of file FWEveDetectorGeo.h.

Referenced by Paint(), and paintChildNodesRecurse().

int FWEveDetectorGeo::m_maxLevel
private

Definition at line 36 of file FWEveDetectorGeo.h.

Referenced by Paint(), and paintChildNodesRecurse().