#include <Fireworks/Core/interface/FWGeometryTableViewManager.h>
Public Member Functions | |
FWViewBase * | buildView (TEveWindowSlot *iParent, const std::string &type) |
virtual void | colorsChanged () |
FWGeometryTableViewManager (FWGUIManager *, std::string fileName) | |
TList * | getListOfVolumes () const |
TGeoNode * | getTopTGeoNode () |
virtual void | newItem (const FWEventItem *) |
virtual FWTypeToRepresentations | supportedTypesAndRepresentations () const |
virtual | ~FWGeometryTableViewManager () |
Static Public Member Functions | |
static TGeoManager * | getGeoMangeur () |
static void | setGeoManagerRuntime (TGeoManager *) |
Protected Member Functions | |
virtual void | modelChangesComing () |
virtual void | modelChangesDone () |
Protected Attributes | |
std::vector< boost::shared_ptr < FWGeometryTableViewBase > > | m_views |
Private Member Functions | |
void | beingDestroyed (const FWViewBase *iView) |
FWGeometryTableViewManager (const FWGeometryTableViewManager &) | |
const FWGeometryTableViewManager & | operator= (const FWGeometryTableViewManager &) |
void | setGeoManagerFromFile () |
Private Attributes | |
std::string | m_fileName |
Static Private Attributes | |
static TGeoManager * | s_geoManager = 0 |
Description: [one line class summary]
Usage: <usage>
Definition at line 30 of file FWGeometryTableViewManager.h.
FWGeometryTableViewManager::FWGeometryTableViewManager | ( | FWGUIManager * | iGUIMgr, |
std::string | fileName | ||
) |
Definition at line 34 of file FWGeometryTableViewManager.cc.
References buildView(), f, FWViewType::idToName(), FWViewType::kGeometryTable, FWViewType::kOverlapTable, and FWGUIManager::registerViewBuilder().
: FWViewManagerBase(), m_fileName(fileName) { FWGUIManager::ViewBuildFunctor f; f=boost::bind(&FWGeometryTableViewManager::buildView, this, _1, _2); iGUIMgr->registerViewBuilder(FWViewType::idToName(FWViewType::kGeometryTable), f); iGUIMgr->registerViewBuilder(FWViewType::idToName(FWViewType::kOverlapTable), f); }
FWGeometryTableViewManager::~FWGeometryTableViewManager | ( | ) | [virtual] |
Definition at line 44 of file FWGeometryTableViewManager.cc.
{ }
FWGeometryTableViewManager::FWGeometryTableViewManager | ( | const FWGeometryTableViewManager & | ) | [private] |
void FWGeometryTableViewManager::beingDestroyed | ( | const FWViewBase * | iView | ) | [private] |
Definition at line 70 of file FWGeometryTableViewManager.cc.
References m_views.
Referenced by buildView().
FWViewBase * FWGeometryTableViewManager::buildView | ( | TEveWindowSlot * | iParent, |
const std::string & | type | ||
) |
Definition at line 50 of file FWGeometryTableViewManager.cc.
References beingDestroyed(), FWViewManagerBase::colorManager(), FWViewType::kGeometryTable, FWViewType::kOverlapTable, m_views, s_geoManager, setGeoManagerFromFile(), and FWViewType::sName.
Referenced by FWGeometryTableViewManager().
{ if (!s_geoManager) setGeoManagerFromFile(); boost::shared_ptr<FWGeometryTableViewBase> view; FWViewType::EType typeId = (type == FWViewType::sName[FWViewType::kGeometryTable]) ? FWViewType::kGeometryTable : FWViewType::kOverlapTable; if (typeId == FWViewType::kGeometryTable) view.reset( new FWGeometryTableView(iParent, &colorManager())); else view.reset( new FWOverlapTableView(iParent, &colorManager())); view->setBackgroundColor(); m_views.push_back(boost::shared_ptr<FWGeometryTableViewBase> (view)); view->beingDestroyed_.connect(boost::bind(&FWGeometryTableViewManager::beingDestroyed, this,_1)); return view.get(); }
void FWGeometryTableViewManager::colorsChanged | ( | ) | [virtual] |
Implements FWViewManagerBase.
Definition at line 81 of file FWGeometryTableViewManager.cc.
References m_views.
TGeoManager * FWGeometryTableViewManager::getGeoMangeur | ( | ) | [static] |
Definition at line 89 of file FWGeometryTableViewManager.cc.
References s_geoManager.
Referenced by FWOverlapTableManager::cellRenderer(), FWGeometryTableManager::checkRegionOfInterest(), FWGeoMaterialValidator::fillOptions(), FWGeometryTableView::FWGeometryTableView(), FWGeometryTableViewManager_GetGeoManager(), FWOverlapTableManager::getOverlapTitles(), FWOverlapTableManager::importOverlaps(), FWEveOverlap::Paint(), FWEveDetectorGeo::Paint(), FWOverlapTableManager::printOverlaps(), FWGeometryTableManager::setVisibility(), and FWGeometryTableManager::setVisibilityChld().
{ // Function used in geomtery table views. assert( s_geoManager); return s_geoManager; }
TList* FWGeometryTableViewManager::getListOfVolumes | ( | ) | const |
TGeoNode* FWGeometryTableViewManager::getTopTGeoNode | ( | ) |
virtual void FWGeometryTableViewManager::modelChangesComing | ( | ) | [inline, protected, virtual] |
called when models have changed and so the display must be updated
Implements FWViewManagerBase.
Definition at line 51 of file FWGeometryTableViewManager.h.
{}
virtual void FWGeometryTableViewManager::modelChangesDone | ( | ) | [inline, protected, virtual] |
virtual void FWGeometryTableViewManager::newItem | ( | const FWEventItem * | ) | [inline, virtual] |
const FWGeometryTableViewManager& FWGeometryTableViewManager::operator= | ( | const FWGeometryTableViewManager & | ) | [private] |
void FWGeometryTableViewManager::setGeoManagerFromFile | ( | ) | [private] |
Definition at line 108 of file FWGeometryTableViewManager.cc.
References alignCSCRings::e, cmsRelvalreport::exit, mergeVDriftHistosByStation::file, FWGeometry::findFile(), fwLog, fwlog::kError, m_fileName, and s_geoManager.
Referenced by buildView().
{ TFile* file = FWGeometry::findFile( m_fileName.c_str() ); try { if ( ! file ) throw std::runtime_error("No root file."); file->ls(); s_geoManager = (TGeoManager*) file->Get("cmsGeo;1"); if ( ! s_geoManager) throw std::runtime_error("Can't find TGeoManager object in selected file."); } catch (std::runtime_error &e) { fwLog(fwlog::kError) << "Failed to find simulation geomtery file. Please set the file path with --sim-geom-file option.\n"; exit(0); } }
void FWGeometryTableViewManager::setGeoManagerRuntime | ( | TGeoManager * | x | ) | [static] |
Definition at line 99 of file FWGeometryTableViewManager.cc.
References s_geoManager, and x.
Referenced by FWFFLooper::remakeGeometry().
{ // Function called from FWFFLooper to set geometry created in runtime. s_geoManager = x; }
virtual FWTypeToRepresentations FWGeometryTableViewManager::supportedTypesAndRepresentations | ( | ) | const [inline, virtual] |
Implements FWViewManagerBase.
Definition at line 37 of file FWGeometryTableViewManager.h.
{ return FWTypeToRepresentations();}
std::string FWGeometryTableViewManager::m_fileName [private] |
Definition at line 62 of file FWGeometryTableViewManager.h.
Referenced by setGeoManagerFromFile().
std::vector<boost::shared_ptr<FWGeometryTableViewBase> > FWGeometryTableViewManager::m_views [protected] |
Definition at line 54 of file FWGeometryTableViewManager.h.
Referenced by beingDestroyed(), buildView(), and colorsChanged().
TGeoManager * FWGeometryTableViewManager::s_geoManager = 0 [static, private] |
Definition at line 61 of file FWGeometryTableViewManager.h.
Referenced by buildView(), getGeoMangeur(), setGeoManagerFromFile(), and setGeoManagerRuntime().