otsdaq
v2_01_00
Main Page
Namespaces
Classes
Files
File List
CircularBufferBase.h
1
#ifndef _ots_CircularBufferBase_h_
2
#define _ots_CircularBufferBase_h_
3
4
#include <string>
5
6
namespace
ots
7
{
8
9
class
DataProcessor;
10
11
//CircularBufferBase
12
// This class is the base class for the otsdaq Buffer
13
class
CircularBufferBase
14
{
15
public
:
16
enum
ConsumerPriority
17
{
18
LowConsumerPriority,
//If the buffers are full because a low priority consumer didn't emptied them then overwrite
19
HighConsumerPriority
//Can't overwrite but need to wait for sometime before writing a buffer
20
};
21
22
CircularBufferBase
();
23
virtual
~
CircularBufferBase
();
24
25
virtual
void
reset (
void
) = 0;
26
void
registerProducer (
DataProcessor
* producer,
unsigned
int
numberOfSubBuffers=100);
27
void
registerConsumer (
DataProcessor
* consumer);
28
void
unregisterConsumer(
DataProcessor
* consumer);
29
//void registerConsumer(std::string name, ConsumerPriority priority);
30
31
virtual
bool
isEmpty (
void
) = 0;
32
virtual
unsigned
int
getNumberOfBuffers(
void
) = 0;
33
34
protected
:
35
virtual
void
registerProducer (std::string producerID,
unsigned
int
numberOfSubBuffers=100) = 0;
36
virtual
void
registerConsumer (std::string consumerID, ConsumerPriority priority) = 0;
37
virtual
void
unregisterConsumer(std::string consumerID) = 0;
38
};
39
}
40
#endif
ots::DataProcessor
Definition:
DataProcessor.h:14
ots::CircularBufferBase
Definition:
CircularBufferBase.h:13
src
otsdaq-core
DataManager
CircularBufferBase.h
Generated on Tue May 29 2018 18:12:36 for otsdaq by
1.8.5