Jpp 19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JDAQTriggeredHitIO.hh
Go to the documentation of this file.
1#ifndef __JDAQTRIGGEREDHIT_IO__
2#define __JDAQTRIGGEREDHIT_IO__
3
5
7
10
11/**
12 * \author mdejong
13 */
14namespace KM3NETDAQ {
15
16 /**
17 * Get size of type.
18 *
19 * \return number of bytes
20 */
21 template<>
23 {
24 return (getSizeof<JDAQKeyHit>() +
26 }
27
28
29 /**
30 * Read DAQ triggered hit from input.
31 *
32 * \param in reader
33 * \param hit DAQ triggered hit
34 * \return reader
35 */
37 {
38 in >> static_cast<JDAQKeyHit&> (hit);
39 in >> static_cast<JDAQTriggerMask&>(hit);
40
41 return in;
42 }
43
44
45 /**
46 * Write DAQ triggered hit to output.
47 *
48 * \param out writer
49 * \param hit DAQ triggered hit
50 * \return writer
51 */
52 inline JWriter& operator<<(JWriter& out, const JDAQTriggeredHit& hit)
53 {
54 out << static_cast<const JDAQKeyHit&> (hit);
55 out << static_cast<const JDAQTriggerMask&>(hit);
56
57 return out;
58 }
59}
60
61#endif
Interface for binary input.
Interface for binary output.
Auxiliary class for trigger mask.
KM3NeT DAQ data structures and auxiliaries.
Definition DataQueue.cc:39
size_t getSizeof< JDAQTriggerMask >()
Get size of type.
JWriter & operator<<(JWriter &out, const JDAQChronometer &chronometer)
Write DAQ chronometer to output.
JReader & operator>>(JReader &in, JDAQChronometer &chronometer)
Read DAQ chronometer from input.
size_t getSizeof< JDAQKeyHit >()
Get size of type.
size_t getSizeof< JDAQTriggeredHit >()
Get size of type.