Jpp
JDAQKeyHitIO.hh
Go to the documentation of this file.
1 #ifndef __JDAQKEYHIT_IO__
2 #define __JDAQKEYHIT_IO__
3 
5 
6 #include "JIO/JSerialisable.hh"
7 
9 #include "JDAQ/JDAQHitIO.hh"
10 
11 /**
12  * \author mdejong
13  */
14 namespace KM3NETDAQ {
15 
16  /**
17  * Get size of type.
18  *
19  * \return number of bytes
20  */
21  template<>
22  inline size_t getSizeof<JDAQKeyHit>()
23  {
26  }
27 
28 
29  /**
30  * Read JDAQKeyHit from input.
31  *
32  * \param in JReader
33  * \param hit JDAQKeyHit
34  * \return JReader
35  */
36  inline JReader& operator>>(JReader& in, JDAQKeyHit& hit)
37  {
38  in >> static_cast<JDAQModuleIdentifier&>(hit);
39  in >> static_cast<JDAQHit&> (hit);
40 
41  return in;
42  }
43 
44 
45  /**
46  * Write JDAQKeyHit to output.
47  *
48  * \param out JWriter
49  * \param hit JDAQKeyHit
50  * \return JWriter
51  */
52  inline JWriter& operator<<(JWriter& out, const JDAQKeyHit& hit)
53  {
54  out << static_cast<const JDAQModuleIdentifier&>(hit);
55  out << static_cast<const JDAQHit&> (hit);
56 
57  return out;
58  }
59 }
60 
61 #endif
JIO::JReader
Interface for binary input.
Definition: JSerialisable.hh:62
KM3NETDAQ::getSizeof< JDAQKeyHit >
size_t getSizeof< JDAQKeyHit >()
Get size of type.
Definition: JDAQKeyHitIO.hh:22
JDAQHitIO.hh
KM3NETDAQ::operator>>
JReader & operator>>(JReader &in, JDAQChronometer &chronometer)
Read DAQ chronometer from input.
Definition: JDAQChronometerIO.hh:37
JDAQKeyHit.hh
JSerialisable.hh
KM3NETDAQ::getSizeof< JDAQModuleIdentifier >
size_t getSizeof< JDAQModuleIdentifier >()
Get size of type.
Definition: JDAQModuleIdentifierIO.hh:19
JIO::JWriter
Interface for binary output.
Definition: JSerialisable.hh:131
KM3NETDAQ::JDAQKeyHit
DAQ key hit.
Definition: JDAQKeyHit.hh:19
KM3NETDAQ
KM3NeT DAQ data structures and auxiliaries.
Definition: DataQueue.cc:39
JDAQModuleIdentifierIO.hh
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