Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
Fireworks
Core
src
CmsShowTaskExecutorBase.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: Core
4
// Class : CmsShowTaskExecutorBase
5
//
6
// Implementation:
7
// <Notes on implementation>
8
//
9
// Original Author: Chris Jones
10
// Created: Fri Jul 11 12:09:41 EDT 2008
11
//
12
13
// system include files
14
#include <iostream>
15
#include <TTimer.h>
16
17
// user include files
18
#include "
Fireworks/Core/src/CmsShowTaskExecutorBase.h
"
19
#include "
Fireworks/Core/src/CmsShowTaskTimer.h
"
20
21
//
22
// constants, enums and typedefs
23
//
24
25
//
26
// static data member definitions
27
//
28
29
//
30
// constructors and destructor
31
//
32
CmsShowTaskExecutorBase::CmsShowTaskExecutorBase
()
33
//:m_timer( new TTimer(1) )
34
{
35
//m_timer->Connect("Timeout()","CmsShowTaskExecutorBase",this,"doNextTask()");
36
m_taskTimer
=
new
CmsShowTaskTimer
(
this
, 10);
37
}
38
39
// CmsShowTaskExecutorBase::CmsShowTaskExecutorBase(const CmsShowTaskExecutorBase& rhs)
40
// {
41
// // do actual copying here;
42
// }
43
44
CmsShowTaskExecutorBase::~CmsShowTaskExecutorBase
()
45
{
46
//delete m_timer;
47
}
48
49
//
50
// assignment operators
51
//
52
// const CmsShowTaskExecutorBase& CmsShowTaskExecutorBase::operator=(const CmsShowTaskExecutorBase& rhs)
53
// {
54
// //An exception safe implementation is
55
// CmsShowTaskExecutorBase temp(rhs);
56
// swap(rhs);
57
//
58
// return *this;
59
// }
60
61
//
62
// member functions
63
//
64
void
65
CmsShowTaskExecutorBase::requestNextTask
()
66
{
67
//NOTE: If I use my own timer then the first time I call Start it works but the second
68
// time causes a segmentation fault
69
70
//Emit("requestNextTask()");
71
//m_timer->Start(1,kTRUE);
72
//std::cout <<"requestNextTask"<<std::endl;
73
m_taskTimer
->TurnOn();
74
}
75
76
void
77
CmsShowTaskExecutorBase::doNextTask
()
78
{
79
m_taskTimer
->TurnOff();
80
doNextTaskImp
();
81
if
(
moreTasksAvailable
()) {
82
requestNextTask
();
83
}
84
else
{
85
tasksCompleted_
.emit();
86
}
87
}
88
89
//
90
// const member functions
91
//
92
93
//
94
// static member functions
95
//
CmsShowTaskExecutorBase::m_taskTimer
CmsShowTaskTimer * m_taskTimer
Definition:
CmsShowTaskExecutorBase.h:58
CmsShowTaskExecutorBase::moreTasksAvailable
virtual bool moreTasksAvailable()=0
CmsShowTaskExecutorBase::requestNextTask
void requestNextTask()
Definition:
CmsShowTaskExecutorBase.cc:65
CmsShowTaskTimer
Definition:
CmsShowTaskTimer.h:29
CmsShowTaskExecutorBase::CmsShowTaskExecutorBase
CmsShowTaskExecutorBase()
Definition:
CmsShowTaskExecutorBase.cc:32
CmsShowTaskExecutorBase::doNextTask
void doNextTask()
Definition:
CmsShowTaskExecutorBase.cc:77
CmsShowTaskTimer.h
CmsShowTaskExecutorBase::doNextTaskImp
virtual void doNextTaskImp()=0
CmsShowTaskExecutorBase::tasksCompleted_
sigc::signal< void > tasksCompleted_
Definition:
CmsShowTaskExecutorBase.h:46
CmsShowTaskExecutorBase::~CmsShowTaskExecutorBase
virtual ~CmsShowTaskExecutorBase()
Definition:
CmsShowTaskExecutorBase.cc:44
CmsShowTaskExecutorBase.h
Generated for CMSSW Reference Manual by
1.8.5