Go to the documentation of this file.    1 #ifndef __JDETECTOR__JMODULEADDRESSMAP__ 
    2 #define __JDETECTOR__JMODULEADDRESSMAP__ 
   66     std::string 
toString(
const std::string& fmt, 
const std::string target = 
"%")
 const 
  103     bool has(
const int index)
 const 
  105       return (index >= 0 && index < (
int) this->size());
 
  117       return (tdc >= 0 && tdc < (
int) 
router.size() && 
router[tdc] != -1);
 
  131       const_iterator p = lower_bound(this->begin(), this->end(), address, less<JPMTPhysicalAddress>());
 
  133       return (p != this->end() && *p == address);
 
  144       sort(this->begin(), this->end(), less<JPMTPhysicalAddress>());
 
  146       for (const_iterator i = this->begin(); i != this->end(); ++i) {
 
  148         if (i->tdc >= (
int) 
router.size()) {
 
  149           router.resize(i->tdc + 1, -1);
 
  163     void swap(
const int i1, 
const int i2)
 
  165       std::swap(
router[at(i1).tdc], 
 
  168       std::swap(static_cast<JPMTReadoutAddress&>(at(i1)), 
 
  169                 static_cast<JPMTReadoutAddress&>(at(i2)));
 
  181       std::swap(static_cast<JPMTReadoutAddress&>(at(
router[tdc1])), 
 
  182                 static_cast<JPMTReadoutAddress&>(at(
router[tdc2])));
 
  224       const_iterator p = lower_bound(this->begin(), this->end(), address, less<JPMTPhysicalAddress>());
 
  226       if (p != this->end() && *p == address)
 
 
void swapTDC(const int tdc1, const int tdc2)
Swap physical addresses corresponding to TDCs.
 
JModuleAddressMap()
Default constructor.
 
Exception for accessing an index in a collection that is outside of its range.
 
JString & replace(const char target, const char replacement, const std::size_t max=std::numeric_limits< std::size_t >::max())
Replace characters.
 
void swap(const int i1, const int i2)
Swap readout addresses corresponding to indices.
 
bool has(const int index) const
Test whether index is available.
 
const JPMTAddressTranslator & getAddressTranslator(const JPMTPhysicalAddress &address) const
Get PMT address translator.
 
Data structure for PMT physical address.
 
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
 
Lookup table for PMT addresses in optical module.
 
const JPMTAddressTranslator & getAddressTranslator(const int tdc) const
Get PMT address translator.
 
std::string toString() const
Convert PMT address translator to string.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
char ring
ring number ['A','F']
 
int position
position within ring [1,6]
 
Wrapper class around STL string class.
 
bool hasTDC(const int tdc) const
Test whether TDC is available.
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
 
bool hasPMT(const JPMTPhysicalAddress &address) const
Test whether PMT is available.
 
void configure()
Configure internal router.
 
std::vector< int > router
 
JPMTAddressTranslator(const JPMTReadoutAddress &readout, const JPMTPhysicalAddress &address)
Constructor.
 
std::string toString(const std::string &fmt, const std::string target="%") const
Convert PMT address translator to string.
 
Data structure to translate PMT physical to readout address.
 
Data structure for PMT readout address.
 
Auxiliary classes and methods for detector calibration.
 
int getIndex(const int tdc) const
Get PMT logical index for given TDC channel.