Jpp  19.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JPMTChannel.hh
Go to the documentation of this file.
1 #ifndef __JDETECTOR__JPMTCHANNEL__
2 #define __JDETECTOR__JPMTCHANNEL__
3 
4 #include <istream>
5 #include <ostream>
6 
8 
9 #include "JDetector/JLocation.hh"
11 
12 
13 /**
14  * \file
15  *
16  * Data structure to uniquely identify PMT readout channel.
17  * \author mdejong
18  */
19 namespace JDETECTOR {}
20 namespace JPP { using namespace JDETECTOR; }
21 
22 namespace JDETECTOR {
23 
25  using JLANG::JTYPELIST;
26 
27 
28  /**
29  * Auxiliary class to uniquely identify PMT readout channel.
30  */
31  class JPMTChannel :
32  public JLocation,
33  public JPMTReadoutAddress,
34  public JMultiComparable<JPMTChannel, JTYPELIST<JLocation, JPMTReadoutAddress>::typelist>
35  {
36  public:
37  /**
38  * Default constructor.
39  */
41  JLocation(),
43  {}
44 
45 
46  /**
47  * Constructor.
48  *
49  * \param location module location
50  * \param tdc PMT readout address
51  */
52  JPMTChannel(const JLocation& location,
53  const JPMTReadoutAddress& tdc) :
54  JLocation (location),
56  {}
57 
58 
59  /**
60  * Read PMT channel.
61  *
62  * \param in input stream
63  * \param object PMT channel
64  * \return input stream
65  */
66  friend inline std::istream& operator>>(std::istream& in, JPMTChannel& object)
67  {
68  in >> static_cast<JLocation&> (object);
69  in >> static_cast<JPMTReadoutAddress&>(object);
70 
71  return in;
72  }
73 
74 
75  /**
76  * Write PMT channel.
77  *
78  * \param out output stream
79  * \param object PMT channel
80  * \return output stream
81  */
82  friend inline std::ostream& operator<<(std::ostream& out, const JPMTChannel& object)
83  {
84  out << static_cast<const JLocation&> (object) << ' ';
85  out << static_cast<const JPMTReadoutAddress&>(object);
86 
87  return out;
88  }
89  };
90 }
91 
92 #endif
Auxiliary class to uniquely identify PMT readout channel.
Definition: JPMTChannel.hh:31
friend std::ostream & operator<<(std::ostream &out, const JPMTChannel &object)
Write PMT channel.
Definition: JPMTChannel.hh:82
JPMTChannel(const JLocation &location, const JPMTReadoutAddress &tdc)
Constructor.
Definition: JPMTChannel.hh:52
Logical location of module.
Definition: JLocation.hh:37
Auxiliary class for recursive type list generation.
Definition: JTypeList.hh:351
JPMTChannel()
Default constructor.
Definition: JPMTChannel.hh:40
Logical location of module.
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:48
Data structure for PMT readout address.
Template definition of auxiliary base class for composite data structures composed of base classes wi...
friend std::istream & operator>>(std::istream &in, JPMTChannel &object)
Read PMT channel.
Definition: JPMTChannel.hh:66