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

#include <JPMTIdentifier_t.hh>

Inheritance diagram for JTRIGGER::JPMTIdentifier_t:
TObject

Public Member Functions

 JPMTIdentifier_t ()
 Default constructor. More...
 
 JPMTIdentifier_t (int id, int tdc)
 Constructor. More...
 
 JPMTIdentifier_t (const JDAQPMTIdentifier &pmt)
 Copy constructor. More...
 
virtual ~JPMTIdentifier_t ()
 Virtual destructor. More...
 
int getModuleID () const
 Get module identifier. More...
 
int getPMTAddress () const
 Get PMT address. More...
 
 operator JDAQPMTIdentifier () const
 Type conversion operator. More...
 
 ClassDef (JPMTIdentifier_t, 8)
 

Static Public Member Functions

static bool compare (const JPMTIdentifier_t &first, const JPMTIdentifier_t &second)
 Compare PMT identifiers. More...
 

Protected Attributes

int moduleID
 
int pmtAddress
 

Friends

std::istream & operator>> (std::istream &in, JPMTIdentifier_t &id)
 Read PMT identifier from input. More...
 
std::ostream & operator<< (std::ostream &out, const JPMTIdentifier_t &id)
 Write PMT identifier to output. More...
 

Detailed Description

Definition at line 21 of file JPMTIdentifier_t.hh.

Constructor & Destructor Documentation

JTRIGGER::JPMTIdentifier_t::JPMTIdentifier_t ( )
inline

Default constructor.

Definition at line 28 of file JPMTIdentifier_t.hh.

JTRIGGER::JPMTIdentifier_t::JPMTIdentifier_t ( int  id,
int  tdc 
)
inline

Constructor.

Parameters
idmodule identifier
tdcPMT readout channel

Definition at line 40 of file JPMTIdentifier_t.hh.

41  {
42  moduleID = id;
43  pmtAddress = tdc;
44  }
JTRIGGER::JPMTIdentifier_t::JPMTIdentifier_t ( const JDAQPMTIdentifier pmt)
inline

Copy constructor.

Parameters
pmtPMT identifier

Definition at line 52 of file JPMTIdentifier_t.hh.

53  {
54  moduleID = pmt.getModuleID();
55  pmtAddress = pmt.getPMTAddress();
56  }
int getModuleID() const
Get module identifier.
int getPMTAddress() const
Get PMT identifier.
virtual JTRIGGER::JPMTIdentifier_t::~JPMTIdentifier_t ( )
inlinevirtual

Virtual destructor.

Definition at line 62 of file JPMTIdentifier_t.hh.

63  {}

Member Function Documentation

int JTRIGGER::JPMTIdentifier_t::getModuleID ( ) const
inline

Get module identifier.

Returns
module identifier

Definition at line 71 of file JPMTIdentifier_t.hh.

72  {
73  return moduleID;
74  }
int JTRIGGER::JPMTIdentifier_t::getPMTAddress ( ) const
inline

Get PMT address.

Returns
PMT address

Definition at line 82 of file JPMTIdentifier_t.hh.

83  {
84  return pmtAddress;
85  }
static bool JTRIGGER::JPMTIdentifier_t::compare ( const JPMTIdentifier_t first,
const JPMTIdentifier_t second 
)
inlinestatic

Compare PMT identifiers.

The comparison is applied to the module identifer and to the PMT address. If the module identifier or PMT address is -1, the corresponding comparison evaluates to true.

Parameters
firstfirst PMT identifier
secondsecond PMT identifier
Returns
true if first and second PMT identifier are equal; else false

Definition at line 98 of file JPMTIdentifier_t.hh.

99  {
100  return ((first .getModuleID() == second.getModuleID() ||
101  first .getModuleID() == -1 ||
102  second.getModuleID() == -1)
103 
104  &&
105 
106  (first .getPMTAddress() == second.getPMTAddress() ||
107  first .getPMTAddress() == -1 ||
108  second.getPMTAddress() == -1));
109  }
int getPMTAddress() const
Get PMT address.
int getModuleID() const
Get module identifier.
JTRIGGER::JPMTIdentifier_t::operator JDAQPMTIdentifier ( ) const
inline

Type conversion operator.

Returns
PMT identifier

Definition at line 148 of file JPMTIdentifier_t.hh.

JTRIGGER::JPMTIdentifier_t::ClassDef ( JPMTIdentifier_t  ,
 
)

Friends And Related Function Documentation

std::istream& operator>> ( std::istream &  in,
JPMTIdentifier_t id 
)
friend

Read PMT identifier from input.

Parameters
ininput stream
idPMT identifier
Returns
input stream

Definition at line 119 of file JPMTIdentifier_t.hh.

120  {
121  in >> id.moduleID;
122  in >> id.pmtAddress;
123 
124  return in;
125  }
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:46
std::ostream& operator<< ( std::ostream &  out,
const JPMTIdentifier_t id 
)
friend

Write PMT identifier to output.

Parameters
outoutput stream
idPMT identifier
Returns
output stream

Definition at line 135 of file JPMTIdentifier_t.hh.

136  {
137  out << id.moduleID << ' ';
138  out << id.pmtAddress;
139 
140  return out;
141  }

Member Data Documentation

int JTRIGGER::JPMTIdentifier_t::moduleID
protected

Definition at line 157 of file JPMTIdentifier_t.hh.

int JTRIGGER::JPMTIdentifier_t::pmtAddress
protected

Definition at line 158 of file JPMTIdentifier_t.hh.


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