Jpp  19.0.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 | Static Protected Member Functions | 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::JMultiComparable< JClass_t, JTypelist_t > JLANG::JComparable< JObjectID > JLANG::JComparable< JObjectID, int > JLANG::JComparable< JFirst_t, JSecond_t >

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...
 
bool less (const JPMTReadoutAddress &address) const
 Less than method. More...
 
int getTDC () const
 Get TDC. More...
 

Public Attributes

int tdc
 TDC channel. More...
 

Static Protected Member Functions

template<class JHead_t , class JTail_t >
static bool lt (const JClass_t &first, const JClass_t &second, const JType< JTypeList< JHead_t, JTail_t > > &type)
 Less than method for composite data types. More...
 
template<class JHead_t >
static bool lt (const JClass_t &first, const JClass_t &second, const JType< JTypeList< JHead_t, JNullType > > &type)
 Less than method for composite data types. 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 35 of file JPMTIdentifier.hh.

Constructor & Destructor Documentation

JDETECTOR::JPMTIdentifier::JPMTIdentifier ( )
inline

Default constructor.

Definition at line 44 of file JPMTIdentifier.hh.

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

Constructor.

Parameters
idmodule identifier
tdcTDC

Definition at line 56 of file JPMTIdentifier.hh.

57  :
58  JModuleIdentifier (id),
60  {}
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 68 of file JPMTIdentifier.hh.

69  {
70  return static_cast<const JPMTIdentifier&>(*this);
71  }
void JDETECTOR::JPMTIdentifier::setPMTIdentifier ( const JPMTIdentifier id)
inline

Set PMT identifier.

Parameters
idPMT identifier

Definition at line 79 of file JPMTIdentifier.hh.

80  {
81  static_cast<JPMTIdentifier&>(*this) = id;
82  }
int JDETECTOR::JPMTIdentifier::getModuleID ( ) const
inline

Get module identifier.

Returns
module identifier

Definition at line 90 of file JPMTIdentifier.hh.

91  {
92  return getID();
93  }
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 101 of file JPMTIdentifier.hh.

102  {
103  return tdc;
104  }
bool JDETECTOR::JPMTIdentifier::is_valid ( ) const
inline

Check validity.

Returns
true if PMT identifier is valid; else false

Definition at line 112 of file JPMTIdentifier.hh.

113  {
114  return !(getID() < 0 || tdc < 0);
115  }
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
bool JDETECTOR::JPMTReadoutAddress::less ( const JPMTReadoutAddress address) const
inlineinherited

Less than method.

Parameters
addressPMT readout address
Returns
true if this address before given address; else false

Definition at line 58 of file JPMTReadoutAddress.hh.

59  {
60  return this->tdc < address.tdc;
61  }
int JDETECTOR::JPMTReadoutAddress::getTDC ( ) const
inlineinherited

Get TDC.

Returns
TDC

Definition at line 69 of file JPMTReadoutAddress.hh.

70  {
71  return tdc;
72  }
template<class JClass_t, class JTypelist_t>
template<class JHead_t , class JTail_t >
static bool JLANG::JMultiComparable< JClass_t, JTypelist_t >::lt ( const JClass_t &  first,
const JClass_t &  second,
const JType< JTypeList< JHead_t, JTail_t > > &  type 
)
inlinestaticprotectedinherited

Less than method for composite data types.

Parameters
firstfirst object
secondsecond object
typetype
Returns
true if first object is less than second object; else false

Definition at line 43 of file JMultiComparable.hh.

46  {
47  if (static_cast<const JHead_t&>(first) <
48  static_cast<const JHead_t&>(second))
49  return true;
50  else if (static_cast<const JHead_t&>(second) <
51  static_cast<const JHead_t&>(first))
52  return false;
53  else
54  return lt(first, second, JType<JTail_t>());
55  }
Auxiliary class for a type holder.
Definition: JType.hh:19
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
static bool lt(const JClass_t &first, const JClass_t &second, const JType< JTypeList< JHead_t, JTail_t > > &type)
Less than method for composite data types.
template<class JClass_t, class JTypelist_t>
template<class JHead_t >
static bool JLANG::JMultiComparable< JClass_t, JTypelist_t >::lt ( const JClass_t &  first,
const JClass_t &  second,
const JType< JTypeList< JHead_t, JNullType > > &  type 
)
inlinestaticprotectedinherited

Less than method for composite data types.

Parameters
firstfirst object
secondsecond object
typetype
Returns
true if first object is less than second object; else false

Definition at line 67 of file JMultiComparable.hh.

70  {
71  return (static_cast<const JHead_t&>(first) <
72  static_cast<const JHead_t&>(second));
73  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first

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 125 of file JPMTIdentifier.hh.

126  {
127  in >> static_cast<JModuleIdentifier&> (object);
128  in >> static_cast<JPMTReadoutAddress&>(object);
129 
130  return in;
131  }
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
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 141 of file JPMTIdentifier.hh.

142  {
143  using namespace std;
144 
145  out << setw(10) << static_cast<const JModuleIdentifier&> (object) << ' ';
146  out << setw(2) << static_cast<const JPMTReadoutAddress&>(object);
147 
148  return out;
149  }
JReader& operator>> ( JReader in,
JPMTIdentifier object 
)
friend

Read PMT identifier from input.

Parameters
inreader
objectPMT identifier
Returns
reader

Definition at line 159 of file JPMTIdentifier.hh.

160  {
161  in >> static_cast<JModuleIdentifier&> (object);
162  in >> static_cast<JPMTReadoutAddress&>(object);
163 
164  return in;
165  }
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
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 175 of file JPMTIdentifier.hh.

176  {
177  out << static_cast<const JModuleIdentifier&> (object);
178  out << static_cast<const JPMTReadoutAddress&>(object);
179 
180  return out;
181  }

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 127 of file JPMTReadoutAddress.hh.


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