Jpp
externals
km3net-dataformat
online
JDAQAbstractPreamble.hh
Go to the documentation of this file.
1
#ifndef __JDAQABSTRACTPREAMBLE__
2
#define __JDAQABSTRACTPREAMBLE__
3
4
#include "
JDAQDataTypes.hh
"
5
#include "
JDAQRoot.hh
"
6
7
8
/**
9
* \author rbruijn
10
*/
11
12
namespace
KM3NETDAQ
{
13
14
15
/**
16
* Simple data structure for the DAQ preamble required for a correct calculation
17
* of the object size for binary I/O.
18
*
19
* Note that JDAQPreamble derives from this and adds I/O and ROOT functionality.
20
*/
21
class
JDAQAbstractPreamble
{
22
protected
:
23
/**
24
* Constructor.
25
*
26
* \param type data type of derived class
27
*/
28
template
<
class
T>
29
JDAQAbstractPreamble
(
JDAQType<T>
type
) :
30
length
(0),
31
type
(
KM3NETDAQ
::
getDataType
(
type
))
32
{}
33
34
public
:
35
/**
36
* Default constuctor
37
*/
38
JDAQAbstractPreamble
() :
39
length
(0),
40
type
(0)
41
{}
42
43
44
/**
45
* Get length.
46
*
47
* \return number of bytes
48
*/
49
int
getLength
()
const
50
{
51
return
length
;
52
}
53
54
55
/**
56
* Get data type.
57
*
58
* \return data type
59
*/
60
int
getDataType
()
const
61
{
62
return
type
;
63
}
64
65
66
ClassDefNV
(
JDAQAbstractPreamble
,1);
67
68
protected
:
69
int
length
;
70
int
type
;
71
};
72
}
73
74
#endif
KM3NETDAQ::JDAQAbstractPreamble::JDAQAbstractPreamble
JDAQAbstractPreamble()
Default constuctor.
Definition:
JDAQAbstractPreamble.hh:38
KM3NETDAQ::JDAQAbstractPreamble::length
int length
Definition:
JDAQAbstractPreamble.hh:69
KM3NETDAQ::JDAQAbstractPreamble::getLength
int getLength() const
Get length.
Definition:
JDAQAbstractPreamble.hh:49
KM3NETDAQ::JDAQAbstractPreamble::getDataType
int getDataType() const
Get data type.
Definition:
JDAQAbstractPreamble.hh:60
JDAQDataTypes.hh
JDAQRoot.hh
KM3NETDAQ::JDAQAbstractPreamble
Simple data structure for the DAQ preamble required for a correct calculation of the object size for ...
Definition:
JDAQAbstractPreamble.hh:21
KM3NETDAQ::JDAQType
Auxiliary class for a DAQ type holder.
Definition:
JDAQDataTypes.hh:15
KM3NETDAQ
KM3NeT DAQ data structures and auxiliaries.
Definition:
DataQueue.cc:39
KM3NETDAQ::JDAQAbstractPreamble::type
int type
Definition:
JDAQAbstractPreamble.hh:70
KM3NETDAQ::JDAQAbstractPreamble::JDAQAbstractPreamble
JDAQAbstractPreamble(JDAQType< T > type)
Constructor.
Definition:
JDAQAbstractPreamble.hh:29
KM3NETDAQ::JDAQAbstractPreamble::ClassDefNV
ClassDefNV(JDAQAbstractPreamble, 1)
Generated by
1.8.16