Jpp  16.0.0-rc.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JDAQSummaryFrameIO.hh
Go to the documentation of this file.
1 #ifndef __JDAQSUMMARYFRAME_IO__
2 #define __JDAQSUMMARYFRAME_IO__
3 
5 
6 #include "JIO/JSerialisable.hh"
7 
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<>
23  {
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 output.
JDAQRate data[NUMBER_OF_PMTS]
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.
size_t getSizeof< JDAQFrameStatus >()
Get size of type.
JWriter & operator<<(JWriter &out, const JDAQChronometer &chronometer)
Write DAQ chronometer to output.
Data storage class for rate measurements of all PMTs in one module.
size_t getSizeof< JDAQSummaryFrame >()
Get size of type.
Interface for binary input.
JReader & operator>>(JReader &in, JDAQChronometer &chronometer)
Read DAQ chronometer from input.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
size_t getSizeof< JDAQModuleIdentifier >()
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:42