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