Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
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
11
12
13/**
14 * \file
15 *
16 * Data structure to uniquely identify PMT readout channel.
17 * \author mdejong
18 */
19namespace JDETECTOR {}
20namespace JPP { using namespace JDETECTOR; }
21
22namespace JDETECTOR {
23
25 using JLANG::JTYPELIST;
26
27
28 /**
29 * Auxiliary class to uniquely identify PMT readout channel.
30 */
32 public JLocation,
33 public JPMTReadoutAddress,
34 public JMultiComparable<JPMTChannel, JTYPELIST<JLocation, JPMTReadoutAddress>::typelist>
35 {
36 public:
37 /**
38 * Default constructor.
39 */
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
Logical location of module.
Logical location of module.
Definition JLocation.hh:40
Auxiliary class to uniquely identify PMT readout channel.
friend std::istream & operator>>(std::istream &in, JPMTChannel &object)
Read PMT channel.
JPMTChannel()
Default constructor.
JPMTChannel(const JLocation &location, const JPMTReadoutAddress &tdc)
Constructor.
friend std::ostream & operator<<(std::ostream &out, const JPMTChannel &object)
Write PMT channel.
Data structure for PMT readout address.
file Auxiliary data structures and methods for detector calibration.
Definition JAnchor.hh:12
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Template definition of auxiliary base class for composite data structures composed of base classes wi...
Auxiliary class for recursive type list generation.
Definition JTypeList.hh:351