DABC (Data Acquisition Backbone Core)  2.9.9
api.h
Go to the documentation of this file.
1 // $Id: api.h 3862 2018-05-11 10:06:18Z linev $
2 
3 /************************************************************
4  * The Data Acquisition Backbone Core (DABC) *
5  ************************************************************
6  * Copyright (C) 2009 - *
7  * GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
8  * Planckstr. 1, 64291 Darmstadt, Germany *
9  * Contact: http://dabc.gsi.de *
10  ************************************************************
11  * This software can be used under the GPL license *
12  * agreements as stated in LICENSE.txt file *
13  * which is part of the distribution. *
14  ************************************************************/
15 
16 #ifndef HADAQ_api
17 #define HADAQ_api
18 
19 #ifndef MBS_api
20 #include "mbs/api.h"
21 #endif
22 
23 #ifndef HADAQ_Iterator
24 #include "hadaq/Iterator.h"
25 #endif
26 
27 namespace hadaq {
28 
29  class ReadoutHandle;
30 
32  protected:
33 
34  friend class ReadoutHandle;
35 
37 
38  int AcceptBuffer(dabc::Buffer& buf);
39 
40  public:
41 
42  ReadoutModule(const std::string &name, dabc::Command cmd);
43 
44  };
45 
46 
47  class ReadoutHandle : protected mbs::ReadoutHandle {
48 
50 
51 
52  static ReadoutHandle Connect(const std::string &url);
53 
55  bool null() const { return mbs::ReadoutHandle::null(); }
56 
59 
61  hadaq::RawEvent* NextEvent(double tm = 1.0, double maxage = -1.);
62 
65  };
66 
67 }
68 
69 
70 #endif
#define DABC_REFERENCE(RefClass, ParentClass, T)
Definition: Reference.h:222
Reference on memory from memory pool.
Definition: Buffer.h:135
Represents command with its arguments.
Definition: Command.h:99
Read iterator for HADAQ events/subevents.
Definition: Iterator.h:39
hadaq::RawEvent * GetEvent()
Get current event pointer.
Definition: api.cxx:69
hadaq::RawEvent * NextEvent(double tm=1.0, double maxage=-1.)
Retrieve next event from the server.
Definition: api.cxx:47
bool Disconnect()
Disconnect from MBS server.
Definition: api.h:58
static ReadoutHandle Connect(const std::string &url)
Connect with data source.
Definition: api.cxx:35
ReadoutModule(const std::string &name, dabc::Command cmd)
Definition: api.cxx:18
hadaq::ReadIterator fIter2
iterator over HADAQ buffers
Definition: api.h:36
int AcceptBuffer(dabc::Buffer &buf)
Definition: api.cxx:24
Handle to organize readout of MBS data source.
Definition: api.h:74
bool null() const
Check if handle is initialized.
Definition: api.h:85
bool Disconnect()
Disconnect from MBS server.
Definition: api.cxx:171
Module, used to readout MBS data source and provide data to the user.
Definition: api.h:42
Support for HADAQ - HADES DAQ
Definition: api.h:27
Hadaq event structure.
Definition: defines.h:443