CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

FWEveOverlap Class Reference

#include <FWEveOverlap.h>

Inheritance diagram for FWEveOverlap:
FWGeoTopNode

List of all members.

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

Private Member Functions

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

Private Attributes

FWOverlapTableViewm_browser

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.

                                               :
   m_browser(v)
{
} 
virtual FWEveOverlap::~FWEveOverlap ( ) [inline, virtual]

Definition at line 14 of file FWEveOverlap.h.

{}

Member Function Documentation

FWGeometryTableViewBase * FWEveOverlap::browser ( ) [virtual]

Reimplemented from FWGeoTopNode.

Definition at line 20 of file FWEveOverlap.cc.

References m_browser.

{
   return m_browser;
}
FWEveOverlap::ClassDef ( FWEveOverlap  ,
 
) [private]
TString FWEveOverlap::GetHighlightTooltip ( ) [virtual]
void FWEveOverlap::Paint ( Option_t *  option = "") [virtual]
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, n, FWGeoTopNode::paintShape(), and FWGenericParameter< T >::value().

Referenced by Paint().

{

   TGeoNode* parentNode =  pIt->m_node;
   int nD = parentNode->GetNdaughters();
   
   int dOff=0;
   
   pIt++;
   int pcnt = cnt+1;
   
   bool  drawsChildren = false;
   
   FWGeometryTableManagerBase::Entries_i it;
   for (int n = 0; n != nD; ++n)
   {
      it =  pIt;
      std::advance(it,n + dOff);
      cnt = pcnt + n+dOff;
      
      TGeoHMatrix nm = parentMtx;
      nm.Multiply(it->m_node->GetMatrix());
      
      bool  drawsChildrenSecondGen = false;
      if ( it->testBit(FWGeometryTableManagerBase::kVisNodeChld) && it->testBit(FWOverlapTableManager::kOverlapChild))
         drawsChildrenSecondGen = paintChildNodesRecurse(it,cnt , nm);
      
      if (it->testBit(FWGeometryTableManagerBase::kVisNodeSelf))
      {
         if (it->testBit(FWOverlapTableManager::kOverlap))
         {
            int nno;it->m_node->GetOverlaps(nno);
            if ( (m_browser->m_rnrOverlap.value() && ((nno & BIT(1)) == BIT(1)) ) 
                || (m_browser->m_rnrExtrusion.value() && ((nno & BIT(2)) == BIT(2)) ))
            {
               paintShape(cnt , nm, false, drawsChildrenSecondGen);
               drawsChildren = true;
            }
            
         }
         else
         {
            paintShape(cnt , nm, false, drawsChildrenSecondGen);
            drawsChildren = true;
         }
      }
      
      drawsChildren |= drawsChildrenSecondGen;
      FWGeometryTableManagerBase::getNNodesTotal(parentNode->GetDaughter(n), dOff);  
   }
   return drawsChildren;
}
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().

{
   FWPopupMenu* nodePopup = setPopupMenu(x, y,v, true);
   
   if (nodePopup)  nodePopup->Connect("Activated(Int_t)",
                                      "FWOverlapTableView",
                                      m_browser,
                                      "chosenItem(Int_t)");
}
FWGeometryTableManagerBase * FWEveOverlap::tableManager ( ) [virtual]

Reimplemented from FWGeoTopNode.

Definition at line 15 of file FWEveOverlap.cc.

References FWOverlapTableView::getTableManager(), and m_browser.

{
   return m_browser->getTableManager();
}

Member Data Documentation