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
JDAQTriggeredHitIO.hh
Go to the documentation of this file.
1 #ifndef __JDAQTRIGGEREDHIT_IO__
2 #define __JDAQTRIGGEREDHIT_IO__
3 
5 
6 #include "JIO/JSerialisable.hh"
7 
8 #include "JDAQ/JDAQKeyHitIO.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<>
23  {
24  return (getSizeof<JDAQKeyHit>() +
26  }
27 
28 
29  /**
30  * Read DAQ triggered hit from input.
31  *
32  * \param in reader
33  * \param hit DAQ triggered hit
34  * \return reader
35  */
37  {
38  in >> static_cast<JDAQKeyHit&> (hit);
39  in >> static_cast<JDAQTriggerMask&>(hit);
40 
41  return in;
42  }
43 
44 
45  /**
46  * Write DAQ triggered hit to output.
47  *
48  * \param out writer
49  * \param hit DAQ triggered hit
50  * \return writer
51  */
52  inline JWriter& operator<<(JWriter& out, const JDAQTriggeredHit& hit)
53  {
54  out << static_cast<const JDAQKeyHit&> (hit);
55  out << static_cast<const JDAQTriggerMask&>(hit);
56 
57  return out;
58  }
59 }
60 
61 #endif
DAQ key hit.
Definition: JDAQKeyHit.hh:19
Interface for binary output.
Auxiliary class for trigger mask.
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< JDAQTriggerMask >()
Get size of type.
size_t getSizeof< JDAQTriggeredHit >()
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
size_t getSizeof< JDAQKeyHit >()
Get size of type.
Definition: JDAQKeyHitIO.hh:22