Jpp  15.0.4
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JPMTReadoutAddress.hh
Go to the documentation of this file.
1 #ifndef __JDETECTOR__JPMTREADOUTADDRESS__
2 #define __JDETECTOR__JPMTREADOUTADDRESS__
3 
4 #include <istream>
5 #include <ostream>
6 
7 #include "JIO/JSerialisable.hh"
8 
9 
10 /**
11  * \author mdejong
12  */
13 
14 namespace JDETECTOR {}
15 namespace JPP { using namespace JDETECTOR; }
16 
17 namespace JDETECTOR {
18 
19 
20  using JIO::JReader;
21  using JIO::JWriter;
22 
23 
24  /**
25  * Data structure for PMT readout address.
26  */
28  {
29  public:
30  /**
31  * Default constructor.
32  */
34  {
35  this->tdc = -1;
36  }
37 
38 
39  /**
40  * Constructor.
41  *
42  * \param tdc TDC
43  */
45  {
46  this->tdc = tdc;
47  }
48 
49 
50  /**
51  * Get TDC.
52  *
53  * \return TDC
54  */
55  int getTDC() const
56  {
57  return tdc;
58  }
59 
60 
61  /**
62  * Read PMT readout address from input.
63  *
64  * \param in input stream
65  * \param object PMT readout address
66  * \return input stream
67  */
68  friend inline std::istream& operator>>(std::istream& in, JPMTReadoutAddress& object)
69  {
70  return in >> object.tdc;
71  }
72 
73 
74  /**
75  * Write PMT readout address to output.
76  *
77  * \param out output stream
78  * \param object PMT readout address
79  * \return output stream
80  */
81  friend inline std::ostream& operator<<(std::ostream& out, const JPMTReadoutAddress& object)
82  {
83  return out << object.tdc;
84  }
85 
86 
87  /**
88  * Read PMT readout address from input.
89  *
90  * \param in reader
91  * \param object PMT readout address
92  * \return reader
93  */
94  friend inline JReader& operator>>(JReader& in, JPMTReadoutAddress& object)
95  {
96  return in >> object.tdc;
97  }
98 
99 
100  /**
101  * Write PMT readout address to output.
102  *
103  * \param out writer
104  * \param object PMT readout address
105  * \return writer
106  */
107  friend inline JWriter& operator<<(JWriter& out, const JPMTReadoutAddress& object)
108  {
109  return out << object.tdc;
110  }
111 
112 
113  int tdc; //!< TDC channel
114  };
115 }
116 
117 #endif
Interface for binary output.
friend JWriter & operator<<(JWriter &out, const JPMTReadoutAddress &object)
Write PMT readout address to output.
JPMTReadoutAddress(const int tdc)
Constructor.
friend JReader & operator>>(JReader &in, JPMTReadoutAddress &object)
Read PMT readout address from input.
Interface for binary input.
Data structure for PMT readout address.
friend std::ostream & operator<<(std::ostream &out, const JPMTReadoutAddress &object)
Write PMT readout address to output.
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
JPMTReadoutAddress()
Default constructor.
friend std::istream & operator>>(std::istream &in, JPMTReadoutAddress &object)
Read PMT readout address from input.