CMS 3D CMS Logo

Classes | Functions

/data/refman/pasoursint/CMSSW_5_3_1/src/Fireworks/Core/src/FWEveViewManager.cc File Reference

#include "TEveManager.h"
#include "TEveSelection.h"
#include "TEveScene.h"
#include "TEveViewer.h"
#include "TEveCalo.h"
#include "TGLViewer.h"
#include "Fireworks/Core/interface/FWEveViewManager.h"
#include "Fireworks/Core/interface/FWSelectionManager.h"
#include "Fireworks/Core/interface/FWColorManager.h"
#include "Fireworks/Core/interface/Context.h"
#include "Fireworks/Core/interface/FWInteractionList.h"
#include "Fireworks/Core/interface/CmsShowCommon.h"
#include "Fireworks/Core/interface/fwLog.h"
#include "Fireworks/Core/interface/FWEDProductRepresentationChecker.h"
#include "Fireworks/Core/interface/FWSimpleRepresentationChecker.h"
#include "Fireworks/Core/interface/FWTypeToRepresentations.h"
#include "Fireworks/Core/interface/FWEventItem.h"
#include "Fireworks/Core/interface/FWProxyBuilderFactory.h"
#include "Fireworks/Core/interface/FWGUIManager.h"
#include "Fireworks/Core/interface/FWISpyView.h"
#include "Fireworks/Core/interface/FW3DView.h"
#include "Fireworks/Core/interface/FWGlimpseView.h"
#include "Fireworks/Core/interface/FWEveLegoView.h"
#include "Fireworks/Core/interface/FWHFView.h"
#include "Fireworks/Core/interface/FWRPZView.h"
#include <boost/bind.hpp>
#include "TH2F.h"
#include "TAxis.h"
#include "TEveCaloData.h"

Go to the source code of this file.

Classes

class  EveSelectionSentry

Functions

void addElements (const FWEventItem *item, FWEveView *view, int viewType, TEveElementList *product)
FWFromEveSelectorBasegetSelector (TEveElement *iElement)

Function Documentation

void addElements ( const FWEventItem item,
FWEveView view,
int  viewType,
TEveElementList *  product 
)

Helper function to add products from a given builder to a given view. FWRPZView is a base class for all projected views (name derives from FWViewType::RPhi and FWViewType::RhoZ projection).

Definition at line 152 of file FWEveViewManager.cc.

References FWEveView::eventScene(), FWRPZView::importElements(), FWViewType::isProjected(), and FWEventItem::layer().

Referenced by FWEveViewManager::newItem().

{
   if (FWViewType::isProjected(viewType))
   {
      FWRPZView* rpzView = dynamic_cast<FWRPZView*>(view);
      assert(rpzView);
      rpzView->importElements(product, item->layer(), rpzView->eventScene());
   }
   else
   {
      view->eventScene()->AddElement(product);
   }
}
FWFromEveSelectorBase* getSelector ( TEveElement *  iElement)

Helper function to extract the FWFromEveSelectorBase * from an TEveElement.

Definition at line 632 of file FWEveViewManager.cc.

Referenced by FWEveViewManager::selectionAdded(), and FWEveViewManager::selectionRemoved().

{
   if (!iElement)
      return 0;

   //std::cout <<"  non null"<<std::endl;
   void* userData = iElement->GetUserData();
   //std::cout <<"  user data "<<userData<<std::endl;
   if (!userData)
      return 0;

   //std::cout <<"    have userData"<<std::endl;
   //std::cout <<"      calo"<<std::endl;
   EveSelectionSentry();
   return reinterpret_cast<FWFromEveSelectorBase*> (userData);   
}