1 #ifndef EUDAQ_INCLUDED_DataCollector
2 #define EUDAQ_INCLUDED_DataCollector
9 #include "eudaq/TransportServer.hh"
10 #include "eudaq/CommandReceiver.hh"
11 #include "eudaq/Event.hh"
12 #include "eudaq/FileWriter.hh"
13 #include "eudaq/Configuration.hh"
15 #include "eudaq/Platform.hh"
24 DataCollector(
const std::string &name,
const std::string &runcontrol,
25 const std::string &listenaddress,
26 const std::string &runnumberfile =
"../data/runnumber.dat");
30 virtual void OnServer();
31 virtual void OnGetRun();
33 virtual void OnPrepareRun(
unsigned runnumber);
34 virtual void OnStopRun();
35 virtual void OnReceive(
const ConnectionInfo &
id, std::shared_ptr<Event> ev);
36 virtual void OnCompleteEvent();
37 virtual void OnStatus();
44 std::shared_ptr<ConnectionInfo> id;
45 std::list<std::shared_ptr<Event>> events;
53 bool m_done, m_listening;
57 std::unique_ptr<std::thread> m_thread;
58 std::vector<Info> m_buffer;
62 unsigned m_runnumber, m_eventnumber;
63 std::shared_ptr<FileWriter> m_writer;
69 #endif // EUDAQ_INCLUDED_DataCollector
Definition: TransportBase.hh:80
Definition: CommandReceiver.hh:20
Definition: Configuration.hh:12
Definition: DataCollector.hh:22
Definition: TransportServer.hh:10
Definition: TransportBase.hh:22