-
Notifications
You must be signed in to change notification settings - Fork 0
/
Stream.h
66 lines (50 loc) · 1.28 KB
/
Stream.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef Subsystem_Package_Stream_h
#define Subsystem_Package_Stream_h
// -*- C++ -*-
//
// Package: Package
// Class : Stream
//
/**\class Stream Stream.h "Stream.h"
Description: [one line class summary]
Usage:
<usage>
*/
//
// Original Author: Chris Jones
// Created: Thu, 14 Mar 2013 19:03:52 GMT
// $Id$
//
// system include files
// user include files
#include "Event.h"
// forward declarations
namespace tbb {
class task;
}
class Run;
class GlobalWatcher;
class Stream {
public:
Stream(unsigned int iID, GlobalWatcher*);
enum States {kInitialized,kBeginRun,kEvent,kEndRun,kFinished};
void processBeginRun(Run const* iRun);
void processEvent();
void processEndRun();
void processEndStream(tbb::task* iDoneTask);
States state() const { return m_state;}
unsigned int id() const {return m_id;}
//Coordinator looks at this and compares it to next transition
// to see if processEndRun must be called
unsigned int runTransitionID() const {return m_runTransitionID;}
const Run* run() const {return m_run;}
Event& event() {return m_event;}
private:
unsigned int m_id;
States m_state;
unsigned int m_runTransitionID;
Run const* m_run;
Event m_event;
GlobalWatcher* m_watcher;
};
#endif