Belle II Software  release-08-01-10
Fifo.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #ifndef _Belle2_Fifo_hh
9 #define _Belle2_Fifo_hh
10 
11 #include "daq/slc/system/FileDescriptor.h"
12 
13 #include <cstddef>
14 #include <string>
15 
16 namespace Belle2 {
22  class Fifo : public FileDescriptor {
23 
24  public:
25  static Fifo mkfifo(const std::string& path);
26 
27  public:
28  Fifo() {}
29  virtual ~Fifo() {}
30 
31  public:
32  void open(const std::string& path,
33  const std::string& mode = "r");
34  void unlink(const std::string& path);
35  virtual size_t write(const void* v, size_t count);
36  virtual size_t read(void* v, size_t count);
37 
38  };
39 
41 }
42 
43 #endif
Abstract base class for different kinds of events.