Jpp
software
JDAQ
JDAQHitIO.hh
Go to the documentation of this file.
1
#ifndef __JDAQHIT_IO__
2
#define __JDAQHIT_IO__
3
4
#include "
km3net-dataformat/online/JDAQHit.hh
"
5
6
#include "
JIO/JSerialisable.hh
"
7
8
/**
9
* \author mdejong
10
*/
11
namespace
KM3NETDAQ
{
12
13
/**
14
* Get size of type.
15
*
16
* \return number of bytes
17
*/
18
template
<>
19
inline
size_t
getSizeof<JDAQHit>
()
20
{
21
return
(
sizeof
(
JDAQHit::pmt
) +
22
sizeof
(
JDAQHit::tdc
) +
23
sizeof
(
JDAQHit::tot
));
24
}
25
26
27
/**
28
* Read DAQ hit from input.
29
*
30
* \param in reader
31
* \param hit DAQ hit
32
* \return reader
33
*/
34
inline
JReader
&
operator>>
(
JReader
& in,
JDAQHit
& hit)
35
{
36
in >> hit.
pmt
;
37
in >> hit.
tdc
;
38
in >> hit.
tot
;
39
40
return
in;
41
}
42
43
44
/**
45
* Write DAQ hit to output.
46
*
47
* \param out writer
48
* \param hit DAQ hit
49
* \return writer
50
*/
51
inline
JWriter
&
operator<<
(
JWriter
& out,
const
JDAQHit
& hit)
52
{
53
out << hit.
pmt
;
54
out << hit.
tdc
;
55
out << hit.
tot
;
56
57
return
out;
58
}
59
}
60
61
#endif
KM3NETDAQ::JDAQHit::pmt
JPMT_t pmt
PMT readout channel in FPGA.
Definition:
JDAQHit.hh:158
JIO::JReader
Interface for binary input.
Definition:
JSerialisable.hh:62
KM3NETDAQ::JDAQHit::tot
JTOT_t tot
time over threshold [ns]
Definition:
JDAQHit.hh:160
KM3NETDAQ::operator>>
JReader & operator>>(JReader &in, JDAQChronometer &chronometer)
Read DAQ chronometer from input.
Definition:
JDAQChronometerIO.hh:37
JSerialisable.hh
JIO::JWriter
Interface for binary output.
Definition:
JSerialisable.hh:131
KM3NETDAQ
KM3NeT DAQ data structures and auxiliaries.
Definition:
DataQueue.cc:39
KM3NETDAQ::JDAQHit
Hit data structure.
Definition:
JDAQHit.hh:34
JDAQHit.hh
KM3NETDAQ::JDAQHit::tdc
JTDC_t tdc
leading edge [ns]
Definition:
JDAQHit.hh:159
KM3NETDAQ::operator<<
JWriter & operator<<(JWriter &out, const JDAQChronometer &chronometer)
Write DAQ chronometer to output.
Definition:
JDAQChronometerIO.hh:55
KM3NETDAQ::getSizeof< JDAQHit >
size_t getSizeof< JDAQHit >()
Get size of type.
Definition:
JDAQHitIO.hh:19
Generated by
1.8.16