src
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/interface/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
//delete m_timer;
46
}
47
48
//
49
// assignment operators
50
//
51
// const CmsShowTaskExecutorBase& CmsShowTaskExecutorBase::operator=(const CmsShowTaskExecutorBase& rhs)
52
// {
53
// //An exception safe implementation is
54
// CmsShowTaskExecutorBase temp(rhs);
55
// swap(rhs);
56
//
57
// return *this;
58
// }
59
60
//
61
// member functions
62
//
63
void
CmsShowTaskExecutorBase::requestNextTask
() {
64
//NOTE: If I use my own timer then the first time I call Start it works but the second
65
// time causes a segmentation fault
66
67
//Emit("requestNextTask()");
68
//m_timer->Start(1,kTRUE);
69
//std::cout <<"requestNextTask"<<std::endl;
70
m_taskTimer
->TurnOn();
71
}
72
73
void
CmsShowTaskExecutorBase::doNextTask
() {
74
m_taskTimer
->TurnOff();
75
doNextTaskImp
();
76
if
(
moreTasksAvailable
()) {
77
requestNextTask
();
78
}
else
{
79
tasksCompleted_
.emit();
80
}
81
}
82
83
//
84
// const member functions
85
//
86
87
//
88
// static member functions
89
//
CmsShowTaskExecutorBase::m_taskTimer
CmsShowTaskTimer * m_taskTimer
Definition:
CmsShowTaskExecutorBase.h:58
CmsShowTaskExecutorBase::tasksCompleted_
sigc::signal< void()> tasksCompleted_
Definition:
CmsShowTaskExecutorBase.h:45
CmsShowTaskExecutorBase::moreTasksAvailable
virtual bool moreTasksAvailable()=0
CmsShowTaskExecutorBase::requestNextTask
void requestNextTask()
Definition:
CmsShowTaskExecutorBase.cc:63
CmsShowTaskTimer
Definition:
CmsShowTaskTimer.h:29
CmsShowTaskExecutorBase::CmsShowTaskExecutorBase
CmsShowTaskExecutorBase()
Definition:
CmsShowTaskExecutorBase.cc:32
CmsShowTaskExecutorBase::doNextTask
void doNextTask()
Definition:
CmsShowTaskExecutorBase.cc:73
CmsShowTaskTimer.h
CmsShowTaskExecutorBase::doNextTaskImp
virtual void doNextTaskImp()=0
CmsShowTaskExecutorBase::~CmsShowTaskExecutorBase
virtual ~CmsShowTaskExecutorBase()
Definition:
CmsShowTaskExecutorBase.cc:44
CmsShowTaskExecutorBase.h
Generated for CMSSW Reference Manual by
1.8.14