Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JDAQSummaryFrameIO.hh
Go to the documentation of this file.
1#ifndef __JDAQSUMMARYFRAME_IO__
2#define __JDAQSUMMARYFRAME_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 {
26 NUMBER_OF_PMTS * sizeof(JDAQRate::JRate_t));
27 }
28
29
30 /**
31 * Read DAQ summary frame from input.
32 *
33 * \param in reader
34 * \param summary DAQ summary frame
35 * \return reader
36 */
38 {
39 in >> static_cast<JDAQModuleIdentifier&>(summary);
40 in >> static_cast<JDAQFrameStatus&> (summary);
41
42 in.read((char*) summary.data, NUMBER_OF_PMTS * sizeof(JDAQRate::JRate_t));
43
44 return in;
45 }
46
47
48 /**
49 * Write DAQ summary frame to output.
50 *
51 * \param out writer
52 * \param summary DAQ summary frame
53 * \return writer
54 */
55 inline JWriter& operator<<(JWriter& out, const JDAQSummaryFrame& summary)
56 {
57 out << static_cast<const JDAQModuleIdentifier&>(summary);
58 out << static_cast<const JDAQFrameStatus&> (summary);
59
60 out.write((char*) summary.data, NUMBER_OF_PMTS * sizeof(JDAQRate::JRate_t));
61
62 return out;
63 }
64}
65
66#endif
Interface for binary input.
Interface for binary output.
virtual int read(char *buffer, const int length)=0
Read byte array.
virtual int write(const char *buffer, const int length)=0
Write byte array.
Data storage class for rate measurements of all PMTs in one module.
JDAQRate data[NUMBER_OF_PMTS]
KM3NeT DAQ data structures and auxiliaries.
Definition DataQueue.cc:39
size_t getSizeof< JDAQModuleIdentifier >()
Get size of type.
JWriter & operator<<(JWriter &out, const JDAQChronometer &chronometer)
Write DAQ chronometer to output.
size_t getSizeof< JDAQSummaryFrame >()
Get size of type.
JReader & operator>>(JReader &in, JDAQChronometer &chronometer)
Read DAQ chronometer from input.
size_t getSizeof< JDAQFrameStatus >()
Get size of type.