Scope
Inputs.h
1 #pragma once
2 
3 #include "ScopeDefines.h"
4 
5 // Forward declarations
6 namespace scope {
7  class DaqChunk;
8 }
9 
10 namespace scope {
11 
13 class Inputs {
14 
15 protected:
17  const uint32_t area;
18 
21 
22 public:
24  Inputs(const uint32_t& _area);
25 
26  virtual ~Inputs(void);
27 
29  virtual void Start() = 0;
30 
32  virtual void Stop() = 0;
33 
35  virtual uint32_t RequestedSamples() const;
36 
38  virtual uint32_t StandardChunkSize() const { return 128u*128u; }
39 
45  virtual int32_t Read(DaqChunk& _chunk, bool& _timedout, const double& _timeout) = 0;
46 };
47 
48 }
Wraps hardware connection for signal input from PMTs.
Definition: Inputs.h:13
const uint32_t area
the area
Definition: Inputs.h:17
virtual int32_t Read(DaqChunk &_chunk, bool &_timedout, const double &_timeout)=0
Reads one chunk of samples for one area.
Inputs(const uint32_t &_area)
get the area and set up everything
Definition: Inputs.cpp:7
uint32_t requested_samples
the total number of samples that should be read (in case of nframes mode) otherwise the buffer size (...
Definition: Inputs.h:20
virtual uint32_t RequestedSamples() const
Definition: Inputs.cpp:16
virtual void Stop()=0
Stops task.
A DaqChunk contains data from all channels sequentially.
Definition: DaqChunk.h:9
virtual uint32_t StandardChunkSize() const
Definition: Inputs.h:38
virtual void Start()=0
Start task.