-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathEmptySource.h
More file actions
30 lines (23 loc) · 856 Bytes
/
EmptySource.h
File metadata and controls
30 lines (23 loc) · 856 Bytes
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
#if !defined(EmptySource_h)
#define EmptySource_h
#include "SharedSourceBase.h"
#include <iostream>
namespace cce::tf {
class EmptySource : public SharedSourceBase {
public:
explicit EmptySource(unsigned long long iNEvents):
SharedSourceBase(iNEvents) {}
size_t numberOfDataProducts() const final {return 0;}
std::vector<DataProductRetriever>& dataProducts(unsigned int iLane, long iEventIndex) final { return empty_;}
EventIdentifier eventIdentifier(unsigned int iLane, long iEventIndex) final {
return {1, 1, static_cast<unsigned long long>(iEventIndex+1)};
}
void printSummary() const final {std::cout <<"\nSource time: N/A"<<std::endl;}
private:
void readEventAsync(unsigned int iLane, long iEventIndex, OptionalTaskHolder iHolder) final {
iHolder.runNow();
}
std::vector<DataProductRetriever> empty_;
};
}
#endif