Data structure for PMT physical address.
More...
#include <JPMTPhysicalAddress.hh>
|
char | ring |
| ring number ['A','F']
|
|
int | position |
| position within ring [1,6]
|
|
Data structure for PMT physical address.
Definition at line 29 of file JPMTPhysicalAddress.hh.
◆ JPMTPhysicalAddress() [1/2]
JDETECTOR::JPMTPhysicalAddress::JPMTPhysicalAddress |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 36 of file JPMTPhysicalAddress.hh.
37 {
40 }
char ring
ring number ['A','F']
int position
position within ring [1,6]
◆ JPMTPhysicalAddress() [2/2]
JDETECTOR::JPMTPhysicalAddress::JPMTPhysicalAddress |
( |
const char | ring, |
|
|
const int | position ) |
|
inline |
◆ less()
Less than method.
- Parameters
-
address | PMT physical address |
- Returns
- true if this address before given address; else false
Definition at line 63 of file JPMTPhysicalAddress.hh.
64 {
65 if (this->
ring == address.ring)
66 return this->
position < address.position;
67 else
68 return this->
ring < address.ring;
69 }
◆ toString()
std::string JDETECTOR::JPMTPhysicalAddress::toString |
( |
| ) |
const |
|
inline |
Convert PMT physical address to string.
- Returns
- string
Definition at line 141 of file JPMTPhysicalAddress.hh.
142 {
143 std::ostringstream os;
144
145 os << *this;
146
147 return os.str();
148 }
◆ operator>> [1/2]
Read PMT physical address from input.
- Parameters
-
in | input stream |
object | PMT physical address |
- Returns
- input stream
Definition at line 79 of file JPMTPhysicalAddress.hh.
80 {
81 in >> object.ring;
82 in >> object.position;
83
84 return in;
85 }
◆ operator<< [1/2]
Write PMT physical address to output.
- Parameters
-
out | output stream |
object | PMT physical address |
- Returns
- output stream
Definition at line 95 of file JPMTPhysicalAddress.hh.
96 {
97 out << object.ring;
98 out << object.position;
99
100 return out;
101 }
◆ operator>> [2/2]
Read PMT physical address from input.
- Parameters
-
in | reader |
object | PMT physical address |
- Returns
- reader
Definition at line 111 of file JPMTPhysicalAddress.hh.
112 {
113 in >> object.ring;
114 in >> object.position;
115
116 return in;
117 }
◆ operator<< [2/2]
Write PMT physical address to output.
- Parameters
-
out | writer |
object | PMT physical address |
- Returns
- writer
Definition at line 127 of file JPMTPhysicalAddress.hh.
128 {
129 out << object.ring;
130 out << object.position;
131
132 return out;
133 }
◆ ring
char JDETECTOR::JPMTPhysicalAddress::ring |
◆ position
int JDETECTOR::JPMTPhysicalAddress::position |
The documentation for this class was generated from the following file: