Jpp  15.0.5
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JDAQPreambleIO.hh
Go to the documentation of this file.
1 #ifndef __JDAQPREAMBLE_IO__
2 #define __JDAQPREAMBLE_IO__
3 
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<JDAQPreamble>()
20  {
21  return (sizeof(JDAQPreamble::length) +
22  sizeof(JDAQPreamble::type));
23  }
24 
25 
26  /**
27  * Read DAQ preamble from input.
28  *
29  * Note that JDAQAbstractPreamble::length is read first.
30  *
31  * \param in reader
32  * \param preamble DAQ preamble
33  * \return reader
34  */
35  inline JReader& operator>>(JReader& in, JDAQPreamble& preamble)
36  {
37  in >> preamble.length;
38  in >> preamble.type;
39 
40  return in;
41  }
42 
43 
44  /**
45  * Write DAQ preamble to output.
46  *
47  * Note that JDAQPreamble::getSize() is written first.
48  *
49  * \param out writer
50  * \param preamble DAQ preamble
51  * \return writer
52  */
53  inline JWriter& operator<<(JWriter& out, const JDAQPreamble& preamble)
54  {
55  out << preamble.length;
56  out << preamble.type;
57 
58  return out;
59  }
60 }
61 
62 #endif
Interface for binary output.
JWriter & operator<<(JWriter &out, const JDAQChronometer &chronometer)
Write DAQ chronometer to output.
Interface for binary input.
JReader & operator>>(JReader &in, JDAQChronometer &chronometer)
Read DAQ chronometer from input.
size_t getSizeof< JDAQPreamble >()
Get size of type.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:41