Jpp 19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JDETECTOR::JModuleAddress Class Reference

Address of module in detector data structure. More...

#include <JModuleAddress.hh>

Inheritance diagram for JDETECTOR::JModuleAddress:
JLANG::JEquals< JFirst_t, JSecond_t > JDETECTOR::JModuleAttributes< JAttributes_t > JDETECTOR::JPMTAddress

Public Member Functions

 JModuleAddress ()
 Default constructor.
 
 JModuleAddress (const int index)
 Constructor.
 
bool equals (const JModuleAddress &address) const
 Equal method.
 

Public Attributes

int first
 index of module in detector data structure
 

Friends

std::istream & operator>> (std::istream &in, JModuleAddress &object)
 Read module address from input.
 
std::ostream & operator<< (std::ostream &out, const JModuleAddress &object)
 Write module address to output.
 

Detailed Description

Address of module in detector data structure.

The address of a module consists of a single integer value JModuleAddress::first which refers to the index of the module in the detector data structure.

This class implements the JLANG::JEquals interface.

Definition at line 30 of file JModuleAddress.hh.

Constructor & Destructor Documentation

◆ JModuleAddress() [1/2]

JDETECTOR::JModuleAddress::JModuleAddress ( )
inline

Default constructor.

Definition at line 37 of file JModuleAddress.hh.

37 :
38 first(-1)
39 {}
int first
index of module in detector data structure

◆ JModuleAddress() [2/2]

JDETECTOR::JModuleAddress::JModuleAddress ( const int index)
inlineexplicit

Constructor.

Parameters
indexindex

Definition at line 47 of file JModuleAddress.hh.

47 :
48 first(index)
49 {}

Member Function Documentation

◆ equals()

bool JDETECTOR::JModuleAddress::equals ( const JModuleAddress & address) const
inline

Equal method.

Parameters
addressmodule address
Returns
true if this module address equal to given module address; else false

Definition at line 58 of file JModuleAddress.hh.

59 {
60 return this->first == address.first;
61 }

Friends And Related Symbol Documentation

◆ operator>>

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

Read module address from input.

Parameters
ininput stream
objectmodule address
Returns
input stream

Definition at line 71 of file JModuleAddress.hh.

72 {
73 return in >> object.first;
74 }

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const JModuleAddress & object )
friend

Write module address to output.

Parameters
outoutput stream
objectmodule address
Returns
output stream

Definition at line 84 of file JModuleAddress.hh.

85 {
86 return out << object.first;
87 }

Member Data Documentation

◆ first

int JDETECTOR::JModuleAddress::first

index of module in detector data structure

Definition at line 90 of file JModuleAddress.hh.


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