DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
InputStream.hpp
Go to the documentation of this file.
1/*
2 * InputStream.h
3 * ers
4 *
5 * Created by Serguei Kolos on 02.08.05.
6 * Copyright 2004 CERN. All rights reserved.
7 *
8 */
9
10#ifndef ERS_INPUT_STREAM_H
11#define ERS_INPUT_STREAM_H
12
13#include <string>
14#include <ers/Issue.hpp>
15#include <ers/IssueReceiver.hpp>
16
21namespace ers {
22 class Issue;
23
30 friend class StreamManager;
31
32 public:
33 virtual ~InputStream() {
34 ;
35 }
36
37 protected:
39
41 void receive(const Issue &issue);
42
43 private:
44 InputStream(const InputStream &other) = delete;
46
47 void set_receiver(IssueReceiver *receiver) {
48 m_receiver = receiver;
49 }
50
52 };
53}
54
55#include <ers/StreamFactory.hpp>
56
57#define ERS_REGISTER_INPUT_STREAM( class, name, params ) \
58namespace { \
59 struct InputStreamRegistrator { \
60 static ers::InputStream * create( const std::initializer_list<std::string> & params ) \
61 { return new class( params ); } \
62 InputStreamRegistrator() \
63 { ers::StreamFactory::instance().register_in_stream( name, create ); } \
64 } registrator_mp; \
65}
66
67#endif
68
ERS Issue input stream interface.
InputStream & operator=(const InputStream &)=delete
InputStream(const InputStream &other)=delete
virtual ~InputStream()
void set_receiver(IssueReceiver *receiver)
IssueReceiver * m_receiver
InputStream()
Will be called when a new issue is received.
void receive(const Issue &issue)
ERS Issue receiver interface.
Base class for any user define issue.
Definition Issue.hpp:69
This class manages and provides access to ERS streams.
CTB Buffer Issue