diff --git a/[refs] b/[refs] index d7cce33a395d2..40578181c9fc6 100644 --- a/[refs] +++ b/[refs] @@ -1,3 +1,3 @@ --- refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e -"refs/heads/CMSSW_7_1_X": b6a74292bf13caa5c7aedff7e08a94b9844da16c +"refs/heads/CMSSW_7_1_X": 4405d00d43c898f15ece29ad055d5d4fab8c9028 diff --git a/trunk/Fireworks/Core/src/CmsShowMain.cc b/trunk/Fireworks/Core/src/CmsShowMain.cc index ff524313c6804..a2824ffe23d1b 100644 --- a/trunk/Fireworks/Core/src/CmsShowMain.cc +++ b/trunk/Fireworks/Core/src/CmsShowMain.cc @@ -8,7 +8,7 @@ // // Original Author: // Created: Mon Dec 3 08:38:38 PST 2007 -// $Id: CmsShowMain.cc,v 1.99 2009/11/05 22:06:02 dmytro Exp $ +// $Id: CmsShowMain.cc,v 1.100 2009/11/10 14:38:11 amraktad Exp $ // // system include files @@ -164,7 +164,6 @@ CmsShowMain::CmsShowMain(int argc, char *argv[]) : m_autoLoadTimer(0), m_autoLoadTimerRunning(kFALSE), m_liveTimer(0), - m_liveMode(false), m_isPlaying(false), m_forward(true), m_rewindMode(false), @@ -328,13 +327,11 @@ CmsShowMain::CmsShowMain(int argc, char *argv[]) : f=boost::bind(&CmsShowNavigator::setMaxNumberOfFilesToChain, m_navigator, vm[kChainCommandOpt].as()); m_startupTasks->addTask(f); } - if(vm.count(kLiveCommandOpt)) m_liveMode = true; - if (vm.count(kPlayOpt)) { - m_playDelay = vm[kPlayOpt].as(); - f=boost::bind(&CSGContinuousAction::switchMode,m_guiManager->playEventsAction()); + if(vm.count(kLiveCommandOpt)) + { + f=boost::bind(&CmsShowMain::setLiveMode, this); m_startupTasks->addTask(f); } - m_startupTasks->startDoingTasks(); } catch(std::exception& iException) { std::cerr <<"CmsShowMain caught exception "<changedEventId_.connect(boost::bind(&CmsShowNavigator::goToEvent,m_navigator,_1,_2)); m_guiManager->showEventFilter_.connect(boost::bind(&CmsShowNavigator::showEventFilter,m_navigator,_1)); m_guiManager->changedEventFilterStatus_.connect(boost::bind(&CmsShowNavigator::enableEventFiltering,m_navigator,_1)); - - { - m_autoLoadTimer = new SignalTimer(); - ((SignalTimer*) m_autoLoadTimer)->timeout_.connect(boost::bind(&CmsShowMain::autoLoadNewEvent,this)); - - m_liveTimer = new SignalTimer(); - ((SignalTimer*)m_liveTimer)->timeout_.connect(boost::bind(&CmsShowMain::checkLiveMode,this)); - } + + m_autoLoadTimer = new SignalTimer(); + ((SignalTimer*) m_autoLoadTimer)->timeout_.connect(boost::bind(&CmsShowMain::autoLoadNewEvent,this)); if(m_inputFileName.size()) { m_guiManager->updateStatus("loading data file..."); @@ -853,6 +845,17 @@ CmsShowMain::setupDataHandling() } } +void +CmsShowMain::setLiveMode() +{ + m_liveTimer = new SignalTimer(); + ((SignalTimer*)m_liveTimer)->timeout_.connect(boost::bind(&CmsShowMain::checkLiveMode,this)); + + m_live->SetTime(600000); + m_liveTimer->Reset(); + m_liveTimer->TurnOn(); +} + void CmsShowMain::setPlayDelay(Float_t val) { @@ -995,9 +998,7 @@ CmsShowMain::postFiltering() void CmsShowMain::checkLiveMode() { - m_liveTimer->Reset(); - m_liveTimer->Start(600000, kFALSE); - if ( m_guiManager->playEventsAction()->isRunning()) return; + if (m_isPlaying) return; Window_t rootw, childw; Int_t root_x, root_y, win_x, win_y; @@ -1009,13 +1010,10 @@ CmsShowMain::checkLiveMode() mask); if ( m_lastPointerPositionX == root_x && m_lastPointerPositionY == root_y ) + { m_guiManager->playEventsAction()->switchMode(); + } m_lastPointerPositionX = root_x; m_lastPointerPositionY = root_y; } - -// -// static member functions -// - diff --git a/trunk/Fireworks/Core/src/CmsShowMain.h b/trunk/Fireworks/Core/src/CmsShowMain.h index 3d3252ac7a5d3..6dd6e06f2d725 100644 --- a/trunk/Fireworks/Core/src/CmsShowMain.h +++ b/trunk/Fireworks/Core/src/CmsShowMain.h @@ -16,7 +16,7 @@ // // Original Author: // Created: Mon Dec 3 08:34:30 PST 2007 -// $Id: CmsShowMain.h,v 1.29 2009/10/27 10:33:48 dmytro Exp $ +// $Id: CmsShowMain.h,v 1.30 2009/11/10 14:38:11 amraktad Exp $ // // system include files @@ -144,6 +144,8 @@ class CmsShowMain void setPlayDelay(Float_t); void checkLiveMode(); + void setLiveMode(); + void startAutoLoadTimer(); void stopAutoLoadTimer(); @@ -175,7 +177,6 @@ class CmsShowMain Bool_t m_autoLoadTimerRunning; TTimer* m_liveTimer; - bool m_liveMode; bool m_isPlaying; bool m_forward; bool m_rewindMode;