#include <CmsShowMainBase.h>
This is the base class to be used for setting up the main loop and navigation. FF and standalone main should derive from this one, since it takes care of most of the set up and navigation logic. Concrete implementations are actually supposed to create a concrete instance of the Context, FWNavigatorBase and FWJobMetadataManager.
Definition at line 49 of file CmsShowMainBase.h.
CmsShowMainBase::CmsShowMainBase | ( | ) |
Definition at line 48 of file CmsShowMainBase.cc.
References sendVersionInfo().
: m_changeManager(new FWModelChangeManager), m_colorManager( new FWColorManager(m_changeManager.get())), m_configurationManager(new FWConfigurationManager), m_eiManager(new FWEventItemsManager(m_changeManager.get())), m_guiManager(0), m_selectionManager(new FWSelectionManager(m_changeManager.get())), m_startupTasks(new CmsShowTaskExecutor), m_viewManager(new FWViewManagerManager(m_changeManager.get(), m_colorManager.get())), m_autoLoadTimer(new SignalTimer()), m_navigatorPtr(0), m_metadataManagerPtr(0), m_contextPtr(0), m_autoLoadTimerRunning(kFALSE), m_forward(true), m_isPlaying(false), m_loop(false), m_playDelay(3.f) { sendVersionInfo(); }
CmsShowMainBase::~CmsShowMainBase | ( | ) | [virtual] |
Definition at line 71 of file CmsShowMainBase.cc.
{ }
virtual void CmsShowMainBase::autoLoadNewEvent | ( | ) | [pure virtual] |
Implemented in CmsShowMain, FWFFLooper, and FWFFService.
Referenced by setupActions().
FWModelChangeManager* CmsShowMainBase::changeManager | ( | ) | [inline] |
Definition at line 55 of file CmsShowMainBase.h.
References m_changeManager.
{return m_changeManager.get(); }
virtual void CmsShowMainBase::checkPosition | ( | ) | [pure virtual] |
Implemented in CmsShowMain, FWFFLooper, and FWFFService.
Referenced by doFirstEvent(), doLastEvent(), doNextEvent(), doPreviousEvent(), and goToRunEvent().
FWColorManager* CmsShowMainBase::colorManager | ( | ) | [inline] |
Definition at line 56 of file CmsShowMainBase.h.
References m_colorManager.
{ return m_colorManager.get(); }
const char* CmsShowMainBase::configFilename | ( | ) | const [inline] |
Definition at line 79 of file CmsShowMainBase.h.
References m_configFileName.
Referenced by CmsShowMain::CmsShowMain().
{ return m_configFileName.c_str(); };
FWConfigurationManager* CmsShowMainBase::configurationManager | ( | ) | [inline] |
Definition at line 57 of file CmsShowMainBase.h.
References m_configurationManager.
Referenced by setupViewManagers().
{ return m_configurationManager.get(); }
void CmsShowMainBase::doFirstEvent | ( | ) |
Definition at line 154 of file CmsShowMainBase.cc.
References checkPosition(), draw(), FWNavigatorBase::firstEvent(), and m_navigatorPtr.
Referenced by setupActions().
{ m_navigatorPtr->firstEvent(); checkPosition(); draw(); }
void CmsShowMainBase::doLastEvent | ( | ) |
Definition at line 177 of file CmsShowMainBase.cc.
References checkPosition(), draw(), FWNavigatorBase::lastEvent(), and m_navigatorPtr.
Referenced by setupActions().
{ m_navigatorPtr->lastEvent(); checkPosition(); draw(); }
void CmsShowMainBase::doNextEvent | ( | ) |
Definition at line 162 of file CmsShowMainBase.cc.
References checkPosition(), draw(), m_navigatorPtr, and FWNavigatorBase::nextEvent().
Referenced by setupActions().
{ m_navigatorPtr->nextEvent(); checkPosition(); draw(); }
void CmsShowMainBase::doPreviousEvent | ( | ) |
Definition at line 170 of file CmsShowMainBase.cc.
References checkPosition(), draw(), m_navigatorPtr, and FWNavigatorBase::previousEvent().
Referenced by setupActions().
{ m_navigatorPtr->previousEvent(); checkPosition(); draw(); }
void CmsShowMainBase::draw | ( | ) |
Definition at line 194 of file CmsShowMainBase.cc.
References FWBeamSpot::checkBeamSpot(), FWMagField::checkFieldInfo(), fwLog, fireworks::Context::getBeamSpot(), FWNavigatorBase::getCurrentEvent(), fireworks::Context::getField(), FWMagField::getSource(), fwlog::kDebug, FWMagField::kUser, m_autoSaveAllViewsFormat, m_contextPtr, m_eiManager, m_guiManager, m_navigatorPtr, and m_viewManager.
Referenced by CmsShowMain::appendData(), CmsShowMain::autoLoadNewEvent(), doFirstEvent(), doLastEvent(), doNextEvent(), doPreviousEvent(), FWFFLooper::duringLoop(), goToRunEvent(), CmsShowMain::notified(), CmsShowMain::openData(), CmsShowMain::openDataViaURL(), CmsShowMain::postFiltering(), FWFFService::postProcessEvent(), and CmsShowMain::setupDataHandling().
{ m_guiManager->updateStatus("loading event ..."); if (m_contextPtr->getField()->getSource() != FWMagField::kUser) { m_contextPtr->getField()->checkFieldInfo(m_navigatorPtr->getCurrentEvent()); } m_contextPtr->getBeamSpot()->checkBeamSpot(m_navigatorPtr->getCurrentEvent()); TStopwatch sw; m_viewManager->eventBegin(); m_eiManager->newEvent(m_navigatorPtr->getCurrentEvent()); m_viewManager->eventEnd(); sw.Stop(); fwLog(fwlog::kDebug) << "CmsShowMainBase::draw CpuTime " << sw.CpuTime() <<" RealTime " << sw.RealTime() << std::endl; if (!m_autoSaveAllViewsFormat.empty()) { m_guiManager->updateStatus("auto saving images ..."); m_guiManager->exportAllViews(m_autoSaveAllViewsFormat); } m_guiManager->clearStatus(); }
FWEventItemsManager* CmsShowMainBase::eiManager | ( | ) | [inline] |
Definition at line 58 of file CmsShowMainBase.h.
References m_eiManager.
Referenced by CmsShowMain::CmsShowMain(), FWFFLooper::FWFFLooper(), FWFFService::FWFFService(), CmsShowMain::setupDataHandling(), and setupViewManagers().
{ return m_eiManager.get(); }
void CmsShowMainBase::eventChangedImp | ( | ) | [protected, virtual] |
Reimplemented in CmsShowMain.
Definition at line 148 of file CmsShowMainBase.cc.
References FWGUIManager::eventChangedCallback(), and guiManager().
Referenced by eventChangedSlot().
{ guiManager()->eventChangedCallback(); }
void CmsShowMainBase::eventChangedSlot | ( | ) | [protected] |
Definition at line 142 of file CmsShowMainBase.cc.
References eventChangedImp().
Referenced by setupActions().
{ eventChangedImp(); }
bool CmsShowMainBase::forward | ( | ) | const [inline] |
Definition at line 104 of file CmsShowMainBase.h.
References m_forward.
Referenced by CmsShowMain::autoLoadNewEvent(), FWFFLooper::autoLoadNewEvent(), and CmsShowMain::notified().
{ return m_forward; }
const std::string& CmsShowMainBase::geometryFilename | ( | void | ) | [inline] |
Definition at line 92 of file CmsShowMainBase.h.
References m_geometryFilename.
Referenced by CmsShowMain::CmsShowMain(), FWFFLooper::FWFFLooper(), and FWFFService::FWFFService().
{ return m_geometryFilename; }
FWGeometry& CmsShowMainBase::getGeom | ( | ) | [inline] |
Definition at line 93 of file CmsShowMainBase.h.
References m_geom.
Referenced by FWFFLooper::beginRun(), and FWFFService::postBeginRun().
{ return m_geom; }
void CmsShowMainBase::goToRunEvent | ( | edm::RunNumber_t | run, |
edm::LuminosityBlockNumber_t | lumi, | ||
edm::EventNumber_t | event | ||
) |
Definition at line 185 of file CmsShowMainBase.cc.
References checkPosition(), draw(), FWNavigatorBase::goToRunEvent(), and m_navigatorPtr.
Referenced by setupActions().
{ m_navigatorPtr->goToRunEvent(run, lumi, event); checkPosition(); draw(); }
FWGUIManager* CmsShowMainBase::guiManager | ( | ) | [inline] |
Definition at line 62 of file CmsShowMainBase.h.
References m_guiManager.
Referenced by CmsShowMain::appendData(), FWFFLooper::attachTo(), CmsShowMain::autoLoadNewEvent(), FWFFLooper::autoLoadNewEvent(), FWFFLooper::beginRun(), CmsShowMain::checkLiveMode(), CmsShowMain::checkPosition(), FWFFService::checkPosition(), FWFFLooper::checkPosition(), CmsShowMain::CmsShowMain(), CmsShowMain::doExit(), CmsShowMain::eventChangedImp(), eventChangedImp(), CmsShowMain::fileChangedSlot(), CmsShowMain::filterButtonClicked(), loadGeometry(), CmsShowMain::navigatorChangedFilterState(), CmsShowMain::notified(), CmsShowMain::openData(), CmsShowMain::openDataViaURL(), playBackward(), playForward(), FWFFService::postBeginRun(), CmsShowMain::postFiltering(), CmsShowMain::preFiltering(), CmsShowMain::setupDataHandling(), setupViewManagers(), FWFFLooper::showPathsGUI(), CmsShowMain::stopPlaying(), and FWFFLooper::stopPlaying().
{ assert(m_guiManager.get() && "Call CmsShowMainBase::setup first!"); return m_guiManager.get(); }
bool CmsShowMainBase::isPlaying | ( | ) | const [inline] |
Definition at line 116 of file CmsShowMainBase.h.
References m_isPlaying.
Referenced by CmsShowMain::checkLiveMode(), CmsShowMain::checkPosition(), FWFFService::checkPosition(), FWFFLooper::checkPosition(), and CmsShowMain::notified().
{ return m_isPlaying; }
void CmsShowMainBase::loadGeometry | ( | ) |
Reimplemented in CmsShowMain.
Definition at line 477 of file CmsShowMainBase.cc.
References cmsRelvalreport::exit, fwLog, guiManager(), fwlog::kError, FWGeometry::loadMap(), m_contextPtr, m_geom, m_geometryFilename, fireworks::Context::setGeom(), and FWGUIManager::updateStatus().
Referenced by FWFFLooper::beginRun(), CmsShowMain::CmsShowMain(), FWFFService::FWFFService(), and FWFFLooper::loadDefaultGeometryFile().
{ // prepare geometry service // ATTN: this should be made configurable try { guiManager()->updateStatus("Loading geometry..."); m_geom.loadMap(m_geometryFilename.c_str()); m_contextPtr->setGeom(&m_geom); } catch (const std::runtime_error& iException) { fwLog(fwlog::kError) << "CmsShowMain::loadGeometry() caught exception: \n" << m_geometryFilename << " " << iException.what() << std::endl; exit(0); } }
bool CmsShowMainBase::loop | ( | ) | const [inline] |
Definition at line 105 of file CmsShowMainBase.h.
References m_loop.
Referenced by CmsShowMain::autoLoadNewEvent(), FWFFLooper::autoLoadNewEvent(), CmsShowMain::checkPosition(), FWFFService::checkPosition(), and FWFFLooper::checkPosition().
{ return m_loop; }
FWModelChangeManager* CmsShowMainBase::modelChangeManager | ( | ) | [inline] |
Definition at line 59 of file CmsShowMainBase.h.
References m_changeManager.
{ return m_changeManager.get(); }
void CmsShowMainBase::playBackward | ( | ) |
Definition at line 468 of file CmsShowMainBase.cc.
References FWGUIManager::enableActions(), guiManager(), m_forward, m_isPlaying, and startAutoLoadTimer().
Referenced by setupActions().
{ m_forward = false; m_isPlaying = true; guiManager()->enableActions(kFALSE); startAutoLoadTimer(); }
void CmsShowMainBase::playForward | ( | ) |
Definition at line 459 of file CmsShowMainBase.cc.
References FWGUIManager::enableActions(), guiManager(), m_forward, m_isPlaying, and startAutoLoadTimer().
Referenced by setupActions().
{ m_forward = true; m_isPlaying = true; guiManager()->enableActions(kFALSE); startAutoLoadTimer(); }
virtual void CmsShowMainBase::quit | ( | ) | [pure virtual] |
Implemented in CmsShowMain, FWFFLooper, and FWFFService.
Referenced by setupActions().
void CmsShowMainBase::registerPhysicsObject | ( | const FWPhysicsObjectDesc & | iItem | ) |
Definition at line 453 of file CmsShowMainBase.cc.
References m_eiManager.
{ m_eiManager->add(iItem); }
void CmsShowMainBase::reloadConfiguration | ( | const std::string & | config | ) |
Definition at line 277 of file CmsShowMainBase.cc.
References HDQMDatabaseProducer::config, alignCSCRings::e, SimpleSAXParser::ParserError::error(), fwLog, fwlog::kDebug, m_configFileName, m_configurationManager, m_eiManager, m_guiManager, lumiQueryAPI::msg, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by setup().
{ if (config.empty()) return; m_configFileName = config; std::string msg = "Reloading configuration " + config + "..."; fwLog(fwlog::kDebug) << msg << std::endl; m_guiManager->updateStatus(msg.c_str()); m_guiManager->subviewDestroyAll(); m_eiManager->clearItems(); m_configFileName = config; try { gEve->DisableRedraw(); m_configurationManager->readFromFile(config); gEve->EnableRedraw(); } catch (SimpleSAXParser::ParserError &e) { Int_t chosen; new TGMsgBox(gClient->GetDefaultRoot(), gClient->GetDefaultRoot(), "Bad configuration", ("Configuration " + config + " cannot be parsed: " + e.error()).c_str(), kMBIconExclamation, kMBCancel, &chosen); } catch (...) { Int_t chosen; new TGMsgBox(gClient->GetDefaultRoot(), gClient->GetDefaultRoot(), "Bad configuration", ("Configuration " + config + " cannot be parsed.").c_str(), kMBIconExclamation, kMBCancel, &chosen); } m_guiManager->updateStatus(""); }
FWSelectionManager* CmsShowMainBase::selectionManager | ( | ) | [inline] |
Definition at line 60 of file CmsShowMainBase.h.
References m_selectionManager.
Referenced by CmsShowMain::~CmsShowMain().
{ return m_selectionManager.get(); }
void CmsShowMainBase::sendVersionInfo | ( | ) | [protected] |
Definition at line 496 of file CmsShowMainBase.cc.
References flags, h, lumiQueryAPI::msg, sd, and fireworks::setPath().
Referenced by CmsShowMainBase().
{ // Send version info to xrootd.t2.ucsd.edu receiver on port 9698. // receiver struct hostent* h = gethostbyname("xrootd.t2.ucsd.edu"); if (!h) return; struct sockaddr_in remoteServAddr; remoteServAddr.sin_family = h->h_addrtype; memcpy((char *) &remoteServAddr.sin_addr.s_addr, h->h_addr_list[0], h->h_length); remoteServAddr.sin_port = htons(9698); // socket creation int sd = socket(AF_INET,SOCK_DGRAM, 0); if (sd < 0) { // std::cout << "can't create socket \n"; return; } // bind any port // printf("bind port\n"); struct sockaddr_in cliAddr; cliAddr.sin_family = AF_INET; cliAddr.sin_addr.s_addr = htonl(INADDR_ANY); cliAddr.sin_port = htons(0); int rc = bind(sd, (struct sockaddr *) &cliAddr, sizeof(cliAddr)); if (rc < 0) { // std::cout << "can't bind port %d " << rc << std::endl; return; } // send data SysInfo_t sInfo; gSystem->GetSysInfo(&sInfo); char msg[128]; if (gSystem->Getenv("CMSSW_VERSION")) { snprintf(msg, 64,"%s %s", gSystem->Getenv("CMSSW_VERSION"), sInfo.fOS.Data()); } else { TString versionFileName("data/version.txt"); fireworks::setPath(versionFileName); ifstream fs(versionFileName); TString infoText; infoText.ReadLine(fs); fs.close(); snprintf(msg, 64,"Standalone %s %s", infoText.Data(), sInfo.fOS.Data() ); } int flags = 0; sendto(sd, msg, strlen(msg), flags, (struct sockaddr *) &remoteServAddr, sizeof(remoteServAddr)); }
void CmsShowMainBase::setAutoSaveAllViewsFormat | ( | const std::string & | fmt | ) | [inline] |
Definition at line 124 of file CmsShowMainBase.h.
References fmt, and m_autoSaveAllViewsFormat.
Referenced by CmsShowMain::CmsShowMain().
{ m_autoSaveAllViewsFormat = fmt; }
void CmsShowMainBase::setConfigFilename | ( | const std::string & | f | ) | [inline] |
Definition at line 78 of file CmsShowMainBase.h.
References f, and m_configFileName.
Referenced by CmsShowMain::CmsShowMain(), FWFFLooper::FWFFLooper(), and FWFFService::FWFFService().
{ m_configFileName = f; };
void CmsShowMainBase::setGeometryFilename | ( | const std::string & | filename | ) | [inline] |
Definition at line 91 of file CmsShowMainBase.h.
References lut2db_cfg::filename, and m_geometryFilename.
Referenced by FWFFLooper::beginRun(), CmsShowMain::CmsShowMain(), FWFFLooper::FWFFLooper(), and FWFFService::FWFFService().
{m_geometryFilename = filename; }
void CmsShowMainBase::setIsPlaying | ( | bool | value | ) | [inline] |
Definition at line 117 of file CmsShowMainBase.h.
References m_isPlaying, and relativeConstraints::value.
Referenced by FWFFLooper::autoLoadNewEvent(), CmsShowMain::stopPlaying(), and FWFFLooper::stopPlaying().
{ m_isPlaying = value; }
void CmsShowMainBase::setPlayDelay | ( | Float_t | val | ) |
Definition at line 410 of file CmsShowMainBase.cc.
References m_playDelay.
Referenced by setupActions().
{ m_playDelay = val; }
void CmsShowMainBase::setPlayLoop | ( | ) |
Definition at line 423 of file CmsShowMainBase.cc.
References m_guiManager, m_loop, and setPlayLoopImp().
Referenced by CmsShowMain::CmsShowMain().
{ if(!m_loop) { setPlayLoopImp(); m_guiManager->loopAction()->activated(); } }
void CmsShowMainBase::setPlayLoopImp | ( | ) | [private] |
Definition at line 441 of file CmsShowMainBase.cc.
References m_loop.
Referenced by setPlayLoop(), and setupActions().
{ m_loop = true; }
void CmsShowMainBase::setSimGeometryFilename | ( | const std::string & | filename | ) | [inline] |
Definition at line 95 of file CmsShowMainBase.h.
References lut2db_cfg::filename, and m_simGeometryFilename.
Referenced by CmsShowMain::CmsShowMain().
void CmsShowMainBase::setup | ( | FWNavigatorBase * | navigator, |
fireworks::Context * | context, | ||
FWJobMetadataManager * | metadataManager | ||
) |
Definition at line 222 of file CmsShowMainBase.cc.
References newFWLiteAna::base, FWGUIManager::clearStatus(), fireworks::Context::commonPrefs(), fireworks::Context::initEveElements(), m_changeManager, m_colorManager, m_configurationManager, m_contextPtr, m_eiManager, m_guiManager, m_metadataManagerPtr, m_navigatorPtr, m_startupTasks, m_viewManager, FWModelChangeManager::newItemSlot(), FWViewManagerManager::registerEventItem(), reloadConfiguration(), AlCaHLTBitMon_QueryRunRegistry::string, and writeToConfigFile().
Referenced by CmsShowMain::CmsShowMain(), FWFFLooper::FWFFLooper(), and FWFFService::FWFFService().
{ m_navigatorPtr = navigator; m_contextPtr = context; m_metadataManagerPtr = metadataManager; m_colorManager->initialize(); m_contextPtr->initEveElements(); m_guiManager.reset(new FWGUIManager(m_contextPtr, m_viewManager.get(), m_navigatorPtr)); m_eiManager->newItem_.connect(boost::bind(&FWModelChangeManager::newItemSlot, m_changeManager.get(), _1) ); m_eiManager->newItem_.connect(boost::bind(&FWViewManagerManager::registerEventItem, m_viewManager.get(), _1)); m_configurationManager->add("EventItems",m_eiManager.get()); m_configurationManager->add("GUI",m_guiManager.get()); m_configurationManager->add("EventNavigator", m_navigatorPtr); m_configurationManager->add("CommonPreferences", m_contextPtr->commonPrefs()); // must be after GUIManager in alphabetical order m_guiManager->writeToConfigurationFile_.connect(boost::bind(&CmsShowMainBase::writeToConfigFile, this,_1)); m_guiManager->loadFromConfigurationFile_.connect(boost::bind(&CmsShowMainBase::reloadConfiguration, this, _1)); std::string macPath(gSystem->Getenv("CMSSW_BASE")); macPath += "/src/Fireworks/Core/macros"; const char* base = gSystem->Getenv("CMSSW_RELEASE_BASE"); if(0!=base) { macPath+=":"; macPath +=base; macPath +="/src/Fireworks/Core/macros"; } gROOT->SetMacroPath((std::string("./:")+macPath).c_str()); m_startupTasks->tasksCompleted_.connect(boost::bind(&FWGUIManager::clearStatus, m_guiManager.get()) ); }
void CmsShowMainBase::setupActions | ( | ) |
Definition at line 76 of file CmsShowMainBase.cc.
References autoLoadNewEvent(), doFirstEvent(), doLastEvent(), doNextEvent(), doPreviousEvent(), eventChangedSlot(), goToRunEvent(), m_autoLoadTimer, m_guiManager, m_navigatorPtr, m_playDelay, FWNavigatorBase::newEvent_, playBackward(), playForward(), quit(), setPlayDelay(), setPlayLoopImp(), cmsshow::sGotoFirstEvent, cmsshow::sGotoLastEvent, cmsshow::sNextEvent, cmsshow::sPreviousEvent, cmsshow::sQuit, stopPlaying(), unsetPlayLoopImp(), and writeToCurrentConfigFile().
Referenced by FWFFLooper::beginRun(), FWFFService::postBeginRun(), and CmsShowMain::setupDataHandling().
{ m_guiManager->writeToPresentConfigurationFile_.connect(sigc::mem_fun(*this, &CmsShowMainBase::writeToCurrentConfigFile)); // init TGSlider state before signals are connected m_guiManager->setDelayBetweenEvents(m_playDelay); m_navigatorPtr->newEvent_.connect(boost::bind(&CmsShowMainBase::eventChangedSlot, this)); if (m_guiManager->getAction(cmsshow::sNextEvent) != 0) m_guiManager->getAction(cmsshow::sNextEvent)->activated.connect(sigc::mem_fun(*this, &CmsShowMainBase::doNextEvent)); if (m_guiManager->getAction(cmsshow::sPreviousEvent) != 0) m_guiManager->getAction(cmsshow::sPreviousEvent)->activated.connect(sigc::mem_fun(*this, &CmsShowMainBase::doPreviousEvent)); if (m_guiManager->getAction(cmsshow::sGotoFirstEvent) != 0) m_guiManager->getAction(cmsshow::sGotoFirstEvent)->activated.connect(sigc::mem_fun(*this, &CmsShowMainBase::doFirstEvent)); if (m_guiManager->getAction(cmsshow::sGotoLastEvent) != 0) m_guiManager->getAction(cmsshow::sGotoLastEvent)->activated.connect(sigc::mem_fun(*this, &CmsShowMainBase::doLastEvent)); if (m_guiManager->getAction(cmsshow::sQuit) != 0) m_guiManager->getAction(cmsshow::sQuit)->activated.connect(sigc::mem_fun(*this, &CmsShowMainBase::quit)); m_guiManager->changedEventId_.connect(boost::bind(&CmsShowMainBase::goToRunEvent,this,_1,_2,_3)); m_guiManager->playEventsAction()->started_.connect(sigc::mem_fun(*this, &CmsShowMainBase::playForward)); m_guiManager->playEventsBackwardsAction()->started_.connect(sigc::mem_fun(*this,&CmsShowMainBase::playBackward)); m_guiManager->loopAction()->started_.connect(sigc::mem_fun(*this,&CmsShowMainBase::setPlayLoopImp)); m_guiManager->loopAction()->stopped_.connect(sigc::mem_fun(*this,&CmsShowMainBase::unsetPlayLoopImp)); m_guiManager->changedDelayBetweenEvents_.connect(boost::bind(&CmsShowMainBase::setPlayDelay,this,_1)); m_guiManager->playEventsAction()->stopped_.connect(sigc::mem_fun(*this,&CmsShowMainBase::stopPlaying)); m_guiManager->playEventsBackwardsAction()->stopped_.connect(sigc::mem_fun(*this,&CmsShowMainBase::stopPlaying)); m_autoLoadTimer->timeout_.connect(boost::bind(&CmsShowMainBase::autoLoadNewEvent, this)); }
void CmsShowMainBase::setupAutoLoad | ( | float | x | ) |
Definition at line 324 of file CmsShowMainBase.cc.
References m_guiManager, m_playDelay, and x.
Referenced by CmsShowMain::CmsShowMain().
{ m_playDelay = x; m_guiManager->setDelayBetweenEvents(m_playDelay); if (!m_guiManager->playEventsAction()->isEnabled()) m_guiManager->playEventsAction()->enable(); m_guiManager->playEventsAction()->switchMode(); }
void CmsShowMainBase::setupConfiguration | ( | ) |
Definition at line 351 of file CmsShowMainBase.cc.
References alignCSCRings::e, SimpleSAXParser::ParserError::error(), cmsRelvalreport::exit, fwLog, fwlog::kError, fwlog::kInfo, m_configFileName, m_configurationManager, and m_guiManager.
Referenced by FWFFLooper::beginRun(), CmsShowMain::CmsShowMain(), and FWFFService::postBeginRun().
{ m_guiManager->updateStatus("Setting up configuration..."); if(m_configFileName.empty() ) { fwLog(fwlog::kInfo) << "no configuration is loaded." << std::endl; m_guiManager->getMainFrame()->MapSubwindows(); m_guiManager->getMainFrame()->Layout(); m_guiManager->getMainFrame()->MapRaised(); m_configFileName = "newconfig.fwc"; m_guiManager->createView("Rho Phi"); m_guiManager->createView("Rho Z"); } else { char* whereConfig = gSystem->Which(TROOT::GetMacroPath(), m_configFileName.c_str(), kReadPermission); if(0==whereConfig) { fwLog(fwlog::kInfo) <<"unable to load configuration file '"<<m_configFileName<<"' will load default instead."<<std::endl; whereConfig = gSystem->Which(TROOT::GetMacroPath(), "default.fwc", kReadPermission); assert(whereConfig && "Default configuration cannot be found. Malformed Fireworks installation?"); } m_configFileName = whereConfig; delete [] whereConfig; try { gEve->DisableRedraw(); m_configurationManager->readFromFile(m_configFileName); gEve->EnableRedraw(); } catch (SimpleSAXParser::ParserError &e) { fwLog(fwlog::kError) <<"Unable to load configuration file '" << m_configFileName << "': " << e.error() << std::endl; exit(1); } catch (std::runtime_error &e) { fwLog(fwlog::kError) <<"Unable to load configuration file '" << m_configFileName << "' which was specified on command line. Quitting." << std::endl; exit(1); } } /* if(not m_configFileName.empty() ) { //when the program quits we will want to save the configuration automatically m_guiManager->goingToQuit_.connect( boost::bind(&FWConfigurationManager::writeToFile, m_configurationManager.get(), m_configFileName)); } */ }
void CmsShowMainBase::setupDebugSupport | ( | ) |
Definition at line 416 of file CmsShowMainBase.cc.
References m_guiManager.
Referenced by CmsShowMain::CmsShowMain().
{ m_guiManager->updateStatus("Setting up Eve debug window..."); m_guiManager->openEveBrowserForDebugging(); }
void CmsShowMainBase::setupViewManagers | ( | ) |
Definition at line 108 of file CmsShowMainBase.cc.
References FWConfigurationManager::add(), FWViewManagerManager::add(), configurationManager(), eiManager(), FWEventItemsManager::goingToClearItems_, guiManager(), FWJobMetadataManager::initReps(), m_contextPtr, m_metadataManagerPtr, m_simGeometryFilename, FWTableViewManager::removeAllItems(), AlCaHLTBitMon_QueryRunRegistry::string, FWGUIManager::updateStatus(), and viewManager().
Referenced by FWFFLooper::beginRun(), CmsShowMain::CmsShowMain(), and FWFFService::postBeginRun().
{ guiManager()->updateStatus("Setting up view manager..."); boost::shared_ptr<FWViewManagerBase> eveViewManager(new FWEveViewManager(guiManager())); eveViewManager->setContext(m_contextPtr); viewManager()->add(eveViewManager); boost::shared_ptr<FWTableViewManager> tableViewManager(new FWTableViewManager(guiManager())); configurationManager()->add(std::string("Tables"), tableViewManager.get()); viewManager()->add(tableViewManager); eiManager()->goingToClearItems_.connect(boost::bind(&FWTableViewManager::removeAllItems, tableViewManager.get())); boost::shared_ptr<FWTriggerTableViewManager> triggerTableViewManager(new FWTriggerTableViewManager(guiManager())); configurationManager()->add(std::string("TriggerTables"), triggerTableViewManager.get()); configurationManager()->add(std::string("L1TriggerTables"), triggerTableViewManager.get()); // AMT: added for backward compatibilty triggerTableViewManager->setContext(m_contextPtr); viewManager()->add(triggerTableViewManager); boost::shared_ptr<FWGeometryTableViewManager> geoTableViewManager(new FWGeometryTableViewManager(guiManager(), m_simGeometryFilename)); geoTableViewManager->setContext(m_contextPtr); viewManager()->add(geoTableViewManager); // Unfortunately, due to the plugin mechanism, we need to delay // until here the creation of the FWJobMetadataManager, because // otherwise the supportedTypesAndRepresentations map is empty. // FIXME: should we have a signal for whenever the above mentioned map // changes? Can that actually happer (maybe if we add support // for loading plugins on the fly??). m_metadataManagerPtr->initReps(viewManager()->supportedTypesAndRepresentations()); }
void CmsShowMainBase::startAutoLoadTimer | ( | ) |
Definition at line 335 of file CmsShowMainBase.cc.
References m_autoLoadTimer, m_autoLoadTimerRunning, and m_playDelay.
Referenced by CmsShowMain::autoLoadNewEvent(), FWFFLooper::duringLoop(), playBackward(), and playForward().
{ m_autoLoadTimer->SetTime((Long_t)(m_playDelay*1000)); m_autoLoadTimer->Reset(); m_autoLoadTimer->TurnOn(); m_autoLoadTimerRunning = kTRUE; }
CmsShowTaskExecutor* CmsShowMainBase::startupTasks | ( | ) | [inline] |
Definition at line 68 of file CmsShowMainBase.h.
References m_startupTasks.
Referenced by CmsShowMain::CmsShowMain(), FWFFService::FWFFService(), FWFFLooper::loadDefaultGeometryFile(), FWFFService::postBeginJob(), and FWFFLooper::startingNewLoop().
{ return m_startupTasks.get(); }
void CmsShowMainBase::stopAutoLoadTimer | ( | ) |
Definition at line 344 of file CmsShowMainBase.cc.
References m_autoLoadTimer, and m_autoLoadTimerRunning.
Referenced by CmsShowMain::autoLoadNewEvent(), FWFFLooper::autoLoadNewEvent(), CmsShowMain::stopPlaying(), and FWFFLooper::stopPlaying().
{ m_autoLoadTimer->TurnOff(); m_autoLoadTimerRunning = kFALSE; }
virtual void CmsShowMainBase::stopPlaying | ( | ) | [pure virtual] |
Implemented in CmsShowMain, FWFFLooper, and FWFFService.
Referenced by setupActions().
void CmsShowMainBase::unsetPlayLoop | ( | ) |
Definition at line 432 of file CmsShowMainBase.cc.
References m_guiManager, m_loop, and unsetPlayLoopImp().
{ if(m_loop) { unsetPlayLoopImp(); m_guiManager->loopAction()->stop(); } }
void CmsShowMainBase::unsetPlayLoopImp | ( | ) | [private] |
Definition at line 447 of file CmsShowMainBase.cc.
References m_loop.
Referenced by setupActions(), and unsetPlayLoop().
{ m_loop = false; }
FWViewManagerManager* CmsShowMainBase::viewManager | ( | ) | [inline] |
Definition at line 61 of file CmsShowMainBase.h.
References m_viewManager.
Referenced by setupViewManagers().
{ return m_viewManager.get(); }
void CmsShowMainBase::writeToConfigFile | ( | const std::string & | config | ) |
Definition at line 264 of file CmsShowMainBase.cc.
References m_configFileName, m_configurationManager, and mergeVDriftHistosByStation::name.
Referenced by setup().
{ m_configFileName = name; m_configurationManager->writeToFile(m_configFileName); }
void CmsShowMainBase::writeToCurrentConfigFile | ( | ) |
Definition at line 271 of file CmsShowMainBase.cc.
References m_configFileName, and m_configurationManager.
Referenced by setupActions().
{ m_configurationManager->writeToFile(m_configFileName); }
std::auto_ptr<SignalTimer> CmsShowMainBase::m_autoLoadTimer [private] |
Definition at line 154 of file CmsShowMainBase.h.
Referenced by setupActions(), startAutoLoadTimer(), and stopAutoLoadTimer().
bool CmsShowMainBase::m_autoLoadTimerRunning [private] |
Definition at line 166 of file CmsShowMainBase.h.
Referenced by startAutoLoadTimer(), and stopAutoLoadTimer().
std::string CmsShowMainBase::m_autoSaveAllViewsFormat [private] |
Definition at line 165 of file CmsShowMainBase.h.
Referenced by draw(), and setAutoSaveAllViewsFormat().
std::auto_ptr<FWModelChangeManager> CmsShowMainBase::m_changeManager [private] |
Definition at line 143 of file CmsShowMainBase.h.
Referenced by changeManager(), modelChangeManager(), and setup().
std::auto_ptr<FWColorManager> CmsShowMainBase::m_colorManager [private] |
Definition at line 144 of file CmsShowMainBase.h.
Referenced by colorManager(), and setup().
std::string CmsShowMainBase::m_configFileName [private] |
Definition at line 171 of file CmsShowMainBase.h.
Referenced by configFilename(), reloadConfiguration(), setConfigFilename(), setupConfiguration(), writeToConfigFile(), and writeToCurrentConfigFile().
std::auto_ptr<FWConfigurationManager> CmsShowMainBase::m_configurationManager [private] |
Definition at line 145 of file CmsShowMainBase.h.
Referenced by configurationManager(), reloadConfiguration(), setup(), setupConfiguration(), writeToConfigFile(), and writeToCurrentConfigFile().
fireworks::Context* CmsShowMainBase::m_contextPtr [private] |
Definition at line 160 of file CmsShowMainBase.h.
Referenced by draw(), loadGeometry(), setup(), and setupViewManagers().
std::auto_ptr<FWEventItemsManager> CmsShowMainBase::m_eiManager [private] |
Definition at line 146 of file CmsShowMainBase.h.
Referenced by draw(), eiManager(), registerPhysicsObject(), reloadConfiguration(), and setup().
bool CmsShowMainBase::m_forward [private] |
Definition at line 167 of file CmsShowMainBase.h.
Referenced by forward(), playBackward(), and playForward().
FWGeometry CmsShowMainBase::m_geom [private] |
Definition at line 173 of file CmsShowMainBase.h.
Referenced by getGeom(), and loadGeometry().
std::string CmsShowMainBase::m_geometryFilename [private] |
Definition at line 172 of file CmsShowMainBase.h.
Referenced by geometryFilename(), loadGeometry(), and setGeometryFilename().
std::auto_ptr<FWGUIManager> CmsShowMainBase::m_guiManager [private] |
Definition at line 147 of file CmsShowMainBase.h.
Referenced by draw(), guiManager(), reloadConfiguration(), setPlayLoop(), setup(), setupActions(), setupAutoLoad(), setupConfiguration(), setupDebugSupport(), and unsetPlayLoop().
bool CmsShowMainBase::m_isPlaying [private] |
Definition at line 168 of file CmsShowMainBase.h.
Referenced by isPlaying(), playBackward(), playForward(), and setIsPlaying().
bool CmsShowMainBase::m_loop [private] |
Definition at line 169 of file CmsShowMainBase.h.
Referenced by loop(), setPlayLoop(), setPlayLoopImp(), unsetPlayLoop(), and unsetPlayLoopImp().
Definition at line 159 of file CmsShowMainBase.h.
Referenced by setup(), and setupViewManagers().
FWNavigatorBase* CmsShowMainBase::m_navigatorPtr [private] |
Definition at line 158 of file CmsShowMainBase.h.
Referenced by doFirstEvent(), doLastEvent(), doNextEvent(), doPreviousEvent(), draw(), goToRunEvent(), setup(), and setupActions().
Float_t CmsShowMainBase::m_playDelay [private] |
Definition at line 170 of file CmsShowMainBase.h.
Referenced by setPlayDelay(), setupActions(), setupAutoLoad(), and startAutoLoadTimer().
std::auto_ptr<FWSelectionManager> CmsShowMainBase::m_selectionManager [private] |
Definition at line 148 of file CmsShowMainBase.h.
Referenced by selectionManager().
std::string CmsShowMainBase::m_simGeometryFilename [private] |
Definition at line 174 of file CmsShowMainBase.h.
Referenced by setSimGeometryFilename(), and setupViewManagers().
std::auto_ptr<CmsShowTaskExecutor> CmsShowMainBase::m_startupTasks [private] |
Definition at line 149 of file CmsShowMainBase.h.
Referenced by setup(), and startupTasks().
std::auto_ptr<FWViewManagerManager> CmsShowMainBase::m_viewManager [private] |
Definition at line 150 of file CmsShowMainBase.h.
Referenced by draw(), setup(), and viewManager().