forked from cms-patatrack/pixeltrack-standalone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Source.h
40 lines (33 loc) · 1.07 KB
/
Source.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
#ifndef Source_h
#define Source_h
#include <atomic>
#include <filesystem>
#include <string>
#include <memory>
#include "Framework/Event.h"
#include "DataFormats/FEDRawDataCollection.h"
#include "DataFormats/DigiClusterCount.h"
#include "DataFormats/TrackCount.h"
#include "DataFormats/VertexCount.h"
namespace edm {
class Source {
public:
explicit Source(int maxEvents, ProductRegistry& reg, std::filesystem::path const& datadir, bool validation);
int maxEvents() const { return maxEvents_; }
// thread safe
std::unique_ptr<Event> produce(int streamId, ProductRegistry const& reg);
private:
int maxEvents_;
std::atomic<int> numEvents_;
EDPutTokenT<FEDRawDataCollection> const rawToken_;
EDPutTokenT<DigiClusterCount> digiClusterToken_;
EDPutTokenT<TrackCount> trackToken_;
EDPutTokenT<VertexCount> vertexToken_;
std::vector<FEDRawDataCollection> raw_;
std::vector<DigiClusterCount> digiclusters_;
std::vector<TrackCount> tracks_;
std::vector<VertexCount> vertices_;
bool const validation_;
};
} // namespace edm
#endif