Jpp  18.3.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
JDETECTOR::JPMTIdentifier Class Reference

PMT identifier. More...

#include <JPMTIdentifier.hh>

Inheritance diagram for JDETECTOR::JPMTIdentifier:
JLANG::JObjectID JDETECTOR::JPMTReadoutAddress JLANG::JComparable< JObjectID > JLANG::JComparable< JObjectID, int >

Public Member Functions

 JPMTIdentifier ()
 Default constructor. More...
 
 JPMTIdentifier (const JModuleIdentifier &id, const int tdc)
 Constructor. More...
 
const JPMTIdentifiergetPMTIdentifier () const
 Get PMT identifier. More...
 
void setPMTIdentifier (const JPMTIdentifier &id)
 Set PMT identifier. More...
 
int getModuleID () const
 Get module identifier. More...
 
int getPMTAddress () const
 Get PMT address (= TDC). More...
 
bool is_valid () const
 Check validity. More...
 
int getID () const
 Get identifier. More...
 
int & getID ()
 Get identifier. More...
 
void setID (const int id)
 Set identifier. More...
 
bool less (const JObjectID &object) const
 Less than method. More...
 
bool less (const int id) const
 Less than method. More...
 
bool more (const int id) const
 More than method. More...
 
int getTDC () const
 Get TDC. More...
 

Public Attributes

int tdc
 TDC channel. More...
 

Protected Attributes

int __id
 

Friends

std::istream & operator>> (std::istream &in, JPMTIdentifier &object)
 Read PMT identifier from input. More...
 
std::ostream & operator<< (std::ostream &out, const JPMTIdentifier &object)
 Write PMT identifier to output. More...
 
JReaderoperator>> (JReader &in, JPMTIdentifier &object)
 Read PMT identifier from input. More...
 
JWriteroperator<< (JWriter &out, const JPMTIdentifier &object)
 Write PMT identifier to output. More...
 

Detailed Description

PMT identifier.

Definition at line 31 of file JPMTIdentifier.hh.

Constructor & Destructor Documentation

JDETECTOR::JPMTIdentifier::JPMTIdentifier ( )
inline

Default constructor.

Definition at line 39 of file JPMTIdentifier.hh.

39  :
42  {}
JLANG::JObjectID JModuleIdentifier
JPMTReadoutAddress()
Default constructor.
JDETECTOR::JPMTIdentifier::JPMTIdentifier ( const JModuleIdentifier id,
const int  tdc 
)
inline

Constructor.

Parameters
idmodule identifier
tdcTDC

Definition at line 51 of file JPMTIdentifier.hh.

52  :
53  JModuleIdentifier (id),
55  {}
JLANG::JObjectID JModuleIdentifier
JPMTReadoutAddress()
Default constructor.

Member Function Documentation

const JPMTIdentifier& JDETECTOR::JPMTIdentifier::getPMTIdentifier ( ) const
inline

Get PMT identifier.

Returns
PMT identifier

Definition at line 63 of file JPMTIdentifier.hh.

64  {
65  return static_cast<const JPMTIdentifier&>(*this);
66  }
void JDETECTOR::JPMTIdentifier::setPMTIdentifier ( const JPMTIdentifier id)
inline

Set PMT identifier.

Parameters
idPMT identifier

Definition at line 74 of file JPMTIdentifier.hh.

75  {
76  static_cast<JPMTIdentifier&>(*this) = id;
77  }
int JDETECTOR::JPMTIdentifier::getModuleID ( ) const
inline

Get module identifier.

Returns
module identifier

Definition at line 85 of file JPMTIdentifier.hh.

86  {
87  return getID();
88  }
int getID() const
Get identifier.
Definition: JObjectID.hh:50
int JDETECTOR::JPMTIdentifier::getPMTAddress ( ) const
inline

Get PMT address (= TDC).

Returns
PMT address

Definition at line 96 of file JPMTIdentifier.hh.

97  {
98  return tdc;
99  }
bool JDETECTOR::JPMTIdentifier::is_valid ( ) const
inline

Check validity.

Returns
true if PMT identifier is valid; else false

Definition at line 107 of file JPMTIdentifier.hh.

108  {
109  return !(getID() < 0 || tdc < 0);
110  }
int getID() const
Get identifier.
Definition: JObjectID.hh:50
int JLANG::JObjectID::getID ( ) const
inlineinherited

Get identifier.

Returns
identifier

Definition at line 50 of file JObjectID.hh.

51  {
52  return __id;
53  }
int& JLANG::JObjectID::getID ( )
inlineinherited

Get identifier.

Returns
identifier

Definition at line 61 of file JObjectID.hh.

62  {
63  return __id;
64  }
void JLANG::JObjectID::setID ( const int  id)
inlineinherited

Set identifier.

Parameters
ididentifier

Definition at line 72 of file JObjectID.hh.

73  {
74  this->__id = id;
75  }
bool JLANG::JObjectID::less ( const JObjectID object) const
inlineinherited

Less than method.

Parameters
objectobject identifier
Returns
true if this identifier less than given identifier; else false

Definition at line 84 of file JObjectID.hh.

85  {
86  return this->getID() < object.getID();
87  }
int getID() const
Get identifier.
Definition: JObjectID.hh:50
bool JLANG::JObjectID::less ( const int  id) const
inlineinherited

Less than method.

Parameters
ididentifier
Returns
true if this identifier less than given identifier; else false

Definition at line 96 of file JObjectID.hh.

97  {
98  return this->getID() < id;
99  }
int getID() const
Get identifier.
Definition: JObjectID.hh:50
bool JLANG::JObjectID::more ( const int  id) const
inlineinherited

More than method.

Parameters
ididentifier
Returns
true if this identifier greater than given identifier; else false

Definition at line 108 of file JObjectID.hh.

109  {
110  return this->getID() > id;
111  }
int getID() const
Get identifier.
Definition: JObjectID.hh:50
int JDETECTOR::JPMTReadoutAddress::getTDC ( ) const
inlineinherited

Get TDC.

Returns
TDC

Definition at line 55 of file JPMTReadoutAddress.hh.

56  {
57  return tdc;
58  }

Friends And Related Function Documentation

std::istream& operator>> ( std::istream &  in,
JPMTIdentifier object 
)
friend

Read PMT identifier from input.

Parameters
ininput stream
objectPMT identifier
Returns
input stream

Definition at line 120 of file JPMTIdentifier.hh.

121  {
122  in >> static_cast<JModuleIdentifier&> (object);
123  in >> static_cast<JPMTReadoutAddress&>(object);
124 
125  return in;
126  }
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 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
Auxiliary class for object identification.
Definition: JObjectID.hh:22
Data structure for PMT readout address.
std::ostream& operator<< ( std::ostream &  out,
const JPMTIdentifier object 
)
friend

Write PMT identifier to output.

Parameters
outoutput stream
objectPMT identifier
Returns
output stream

Definition at line 136 of file JPMTIdentifier.hh.

137  {
138  using namespace std;
139 
140  out << setw(10) << static_cast<const JModuleIdentifier&> (object) << ' ';
141  out << setw(2) << static_cast<const JPMTReadoutAddress&>(object);
142 
143  return out;
144  }
JReader& operator>> ( JReader in,
JPMTIdentifier object 
)
friend

Read PMT identifier from input.

Parameters
inreader
objectPMT identifier
Returns
reader

Definition at line 154 of file JPMTIdentifier.hh.

155  {
156  in >> static_cast<JModuleIdentifier&> (object);
157  in >> static_cast<JPMTReadoutAddress&>(object);
158 
159  return in;
160  }
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 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
Auxiliary class for object identification.
Definition: JObjectID.hh:22
Data structure for PMT readout address.
JWriter& operator<< ( JWriter out,
const JPMTIdentifier object 
)
friend

Write PMT identifier to output.

Parameters
outwriter
objectPMT identifier
Returns
writer

Definition at line 170 of file JPMTIdentifier.hh.

171  {
172  out << static_cast<const JModuleIdentifier&> (object);
173  out << static_cast<const JPMTReadoutAddress&>(object);
174 
175  return out;
176  }

Member Data Documentation

int JLANG::JObjectID::__id
protectedinherited

Definition at line 140 of file JObjectID.hh.

int JDETECTOR::JPMTReadoutAddress::tdc
inherited

TDC channel.

Definition at line 113 of file JPMTReadoutAddress.hh.


The documentation for this class was generated from the following file: