forked from Dr15Jones/root_serialization
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathLane.h
More file actions
45 lines (32 loc) · 1.42 KB
/
Lane.h
File metadata and controls
45 lines (32 loc) · 1.42 KB
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
#if !defined(Lane_h)
#define Lane_h
#include <vector>
#include <atomic>
#include <memory>
#include "tbb/task_group.h"
#include "SharedSourceBase.h"
#include "OutputerBase.h"
#include "WaiterBase.h"
namespace cce::tf {
class Lane {
public:
Lane(unsigned int iIndex, SharedSourceBase* iSource, WaiterBase const* iWaiter);
void processEventsAsync(std::atomic<long>& index, tbb::task_group& group, const OutputerBase& outputer, TaskHolder finalTask);
void setVerbose(bool iSet) { verbose_ = iSet; }
std::vector<DataProductRetriever> const& dataProducts() const { return source_->dataProducts(index_, presentEventIndex_); }
long presentEventIndex() const { return presentEventIndex_;}
private:
std::vector<DataProductRetriever>& mutableDataProducts() { return source_->dataProducts(index_, presentEventIndex_); }
TaskHolder makeWaiterTask(tbb::task_group& group, size_t index, TaskHolder holder) ;
TaskHolder makeTaskForDataProduct(tbb::task_group& group, size_t index, DataProductRetriever& iDP, OutputerBase const& outputer, TaskHolder holder) ;
void processEventAsync(tbb::task_group& group, TaskHolder iCallback, const OutputerBase& outputer);
void doNextEvent(std::atomic<long>& index, tbb::task_group& group, const OutputerBase& outputer,
TaskHolder finalTask);
SharedSourceBase* source_;
WaiterBase const* waiter_;
long presentEventIndex_ = -1;
unsigned int index_;
bool verbose_ = false;
};
}
#endif