Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77550
b: "refs/heads/CMSSW_7_1_X"
c: 4405d00
h: "refs/heads/CMSSW_7_1_X"
v: v3
  • Loading branch information
Alja Mrak Tadel committed Nov 10, 2009
1 parent 7e4c841 commit 74efc1e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e
"refs/heads/CMSSW_7_1_X": b6a74292bf13caa5c7aedff7e08a94b9844da16c
"refs/heads/CMSSW_7_1_X": 4405d00d43c898f15ece29ad055d5d4fab8c9028
44 changes: 21 additions & 23 deletions trunk/Fireworks/Core/src/CmsShowMain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -328,13 +327,11 @@ CmsShowMain::CmsShowMain(int argc, char *argv[]) :
f=boost::bind(&CmsShowNavigator::setMaxNumberOfFilesToChain, m_navigator, vm[kChainCommandOpt].as<unsigned int>());
m_startupTasks->addTask(f);
}
if(vm.count(kLiveCommandOpt)) m_liveMode = true;
if (vm.count(kPlayOpt)) {
m_playDelay = vm[kPlayOpt].as<float>();
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 "<<iException.what()<<std::endl;
Expand Down Expand Up @@ -829,14 +826,9 @@ CmsShowMain::setupDataHandling()
m_guiManager->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...");
Expand All @@ -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)
{
Expand Down Expand Up @@ -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;
Expand All @@ -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
//

5 changes: 3 additions & 2 deletions trunk/Fireworks/Core/src/CmsShowMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -144,6 +144,8 @@ class CmsShowMain
void setPlayDelay(Float_t);
void checkLiveMode();

void setLiveMode();

void startAutoLoadTimer();
void stopAutoLoadTimer();

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 74efc1e

Please sign in to comment.