Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JDAQPMTIdentifierIO.hh
Go to the documentation of this file.
1 #ifndef __JDAQPMTIDENTIFIER_IO__
2 #define __JDAQPMTIDENTIFIER_IO__
3 
5 
6 #include "JIO/JSerialisable.hh"
7 
9 
10 /**
11  * \author mdejong
12  */
13 namespace KM3NETDAQ {
14 
15  /**
16  * Get size of type.
17  *
18  * \return number of bytes
19  */
20  template<>
22  {
25  }
26 
27 
28  /**
29  * Read PMT identifier from input.
30  *
31  * \param in reader
32  * \param pmt PMT identifier
33  * \return reader
34  */
36  {
37  in >> static_cast<JDAQModuleIdentifier&>(pmt);
38  in >> pmt.address;
39 
40  return in;
41  }
42 
43 
44  /**
45  * Write PMT identifier to output.
46  *
47  * \param out writer
48  * \param pmt PMT identifier
49  * \return writer
50  */
52  {
53  out << static_cast<const JDAQModuleIdentifier&>(pmt);
54  out << pmt.address;
55 
56  return out;
57  }
58 }
59 
60 #endif
Interface for binary output.
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition: JSirene.sh:45
JWriter & operator<<(JWriter &out, const JDAQChronometer &chronometer)
Write DAQ chronometer to output.
esac $JPP_DIR examples JDetector JTransitTime o $OUTPUT_FILE n N $NPE T $TTS_NS d $DEBUG for HISTOGRAM in tts tt2 pmt
Definition: JTransitTime.sh:36
size_t getSizeof< JDAQPMTIdentifier >()
Get size of type.
Interface for binary input.
JReader & operator>>(JReader &in, JDAQChronometer &chronometer)
Read DAQ chronometer from input.
size_t getSizeof< JDAQModuleIdentifier >()
Get size of type.