Jpp  17.1.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Friends | List of all members
JTRIGGER::JPMTSelector Struct Reference

Auxiliary data structure for set of PMT identifiers. More...

#include <JPMTSelector.hh>

Inheritance diagram for JTRIGGER::JPMTSelector:
std::vector< JPMTIdentifier_t > TObject

Public Member Functions

 JPMTSelector ()
 Default constructor. More...
 
virtual ~JPMTSelector ()
 Virtual destructor. More...
 
bool operator() (const JPMTIdentifier_t &pmt) const
 Test match with given PMT. More...
 
 ClassDef (JPMTSelector, 1)
 

Friends

std::istream & operator>> (std::istream &in, JPMTSelector &object)
 Read vector of PMT identifiers from input. More...
 
std::ostream & operator<< (std::ostream &out, const JPMTSelector &object)
 Write vector of PMT identifiers to output. More...
 

Detailed Description

Auxiliary data structure for set of PMT identifiers.

Definition at line 25 of file JPMTSelector.hh.

Constructor & Destructor Documentation

JTRIGGER::JPMTSelector::JPMTSelector ( )
inline

Default constructor.

Definition at line 32 of file JPMTSelector.hh.

33  {}
virtual JTRIGGER::JPMTSelector::~JPMTSelector ( )
inlinevirtual

Virtual destructor.

Definition at line 39 of file JPMTSelector.hh.

40  {}

Member Function Documentation

bool JTRIGGER::JPMTSelector::operator() ( const JPMTIdentifier_t pmt) const
inline

Test match with given PMT.

Parameters
pmtPMT
Returns
true if match; else false

Definition at line 49 of file JPMTSelector.hh.

50  {
51  for (const_iterator i = this->begin(); i != this->end(); ++i) {
52  if (JPMTIdentifier_t::compare(*i, pmt)) {
53  return true;
54  }
55  }
56 
57  return false;
58  }
static bool compare(const JPMTIdentifier_t &first, const JPMTIdentifier_t &second)
Compare PMT identifiers.
JTRIGGER::JPMTSelector::ClassDef ( JPMTSelector  ,
 
)

Friends And Related Function Documentation

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

Read vector of PMT identifiers from input.

Parameters
ininput stream
objectPMT identifiers
Returns
input stream

Definition at line 68 of file JPMTSelector.hh.

69  {
70  object.clear();
71 
72  for (JPMTIdentifier_t pmt; in >> pmt; ) {
73  object.push_back(pmt);
74  }
75 
76  return in;
77  }
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 JPMTSelector object 
)
friend

Write vector of PMT identifiers to output.

Parameters
outoutput stream
objectPMT identifiers
Returns
output stream

Definition at line 87 of file JPMTSelector.hh.

88  {
89  for (JPMTSelector::const_iterator i = object.begin(); i != object.end(); ++i) {
90  out << ' ' << i->getModuleID() << ' ' << i->getPMTAddress();
91  }
92 
93  return out;
94  }

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