1#ifndef __JDB__JPRODUCTROUTER__
2#define __JDB__JPRODUCTROUTER__
36 for (JDetectorIntegration_t::const_iterator product = detector.begin(); product != detector.end(); ++product) {
37 if (product->is_set()) {
38 for (JPBSSequences::const_iterator i = pbs.begin(); i != pbs.end(); ++i) {
39 if (
insert(detector, *product, *i)) {
56 const_iterator p = this->find(upi);
81 JPBSSequence::const_iterator i = pbs.begin();
91 if (
distance(range.first, range.second) == 1) {
108 if (i == pbs.end()) {
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Auxiliary classes and methods for database I/O.
bool is_base_module(const JPBS_t &pbs)
Test if given PBS corresponds to a base module.
bool is_string(const JPBS_t &pbs)
Test if given PBS corresponds to a string.
bool is_detector(const JPBS_t &pbs)
Test if given PBS corresponds to a detector.
bool is_optical_module(const JPBS_t &pbs)
Test if given PBS corresponds to a optical module.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
range_type find(const JUPI_t &upi) const
Find range of products with given UPI.
Auxiliary data structure for location of product in detector.
int string
position in detector
int floor
position in string
int position
position in floor
Auxiliary data structure for a sequence of PBS values.
Auxiliary data structure for set of PBS sequences.
const JPBS_t & getPBS() const
Get PBS.
Auxiliary class for product integration data.
Auxiliary class to map UPI to location in detector.
JProductRouter(const JDetectorIntegration_t &detector, const JPBSSequences &pbs)
Constructor.
bool insert(const JDetectorIntegration_t &detector, const JProductIntegration_t &product, const JPBSSequence &pbs)
Insert product.
JLocation_t getLocation(const JUPI_t &upi) const
Get location of product with given UPI.
Universal product identifier (UPI).
const JUPI_t & getUPI() const
Get UPI.