Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JDAQUTCExtendedIO.hh
Go to the documentation of this file.
1#ifndef __JDAQUTCEXTENDED_IO__
2#define __JDAQUTCEXTENDED_IO__
3
5
7
8/**
9 * \author mdejong
10 */
11namespace KM3NETDAQ {
12
13 /**
14 * Get size of type.
15 *
16 * \return number of bytes
17 */
18 template<>
20 {
21 return (sizeof(JDAQUTCExtended::UTC_seconds) +
23 }
24
25
26 /**
27 * Read UTC from input.
28 *
29 * \param in reader
30 * \param utc UTC
31 * \return reader
32 */
34 {
35 in >> utc.UTC_seconds;
36 in >> utc.UTC_16nanosecondcycles;
37
38 return in;
39 }
40
41
42 /**
43 * Write UTC to output.
44 *
45 * \param out writer
46 * \param utc UTC
47 * \return writer
48 */
49 inline JWriter& operator<<(JWriter& out, const JDAQUTCExtended& utc)
50 {
51 out << utc.UTC_seconds;
52 out << utc.UTC_16nanosecondcycles;
53
54 return out;
55 }
56}
57
58#endif
Interface for binary input.
Interface for binary output.
Data structure for UTC time.
KM3NeT DAQ data structures and auxiliaries.
Definition DataQueue.cc:39
size_t getSizeof< JDAQUTCExtended >()
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.