1 #ifndef __JDB__JDETECTORINTEGRATION_T__ 
    2 #define __JDB__JDETECTORINTEGRATION_T__ 
   23 #include "dbclient/KM3NeTDBClient.h" 
   29 namespace JDATABASE {}
 
   30 namespace JPP { 
using namespace JDATABASE; }
 
   53     return out << 
"(" << 
object.getLowerLimit() << 
"," << 
object.getUpperLimit() << 
")";
 
  133       in >> 
object.operation
 
  155       out << 
object.operation  << 
' ' 
  156           << 
object.container  << 
' ' 
  157           << 
object.content    << 
' ' 
  158           << 
object.position   << 
' ' 
  159           << 
object.start_date << 
' ' 
  193     typedef  std::pair<map_type::const_iterator,
 
  227       for (
size_t index = 0; index != this->size(); ++index) {
 
  237       for (
iterator product = this->begin(); product != this->end(); ++product) {
 
  238         if (product->operation == detid) {
 
  250       for (
size_t index = 0; index != this->size(); ++index) {
 
  274       if (upi.
getPBS() >= pbs) {
 
  278         switch (
distance(range.first, range.second)) {
 
  318       for (map_type::const_iterator 
i = 
range.first; 
i != 
range.second; ++
i) {
 
  320         out << upi << 
" -> ";
 
  322         print(out, (*
this)[
i->second]);
 
  325       range = down.equal_range(upi);
 
  328         out << 
"<- " << (*this)[
i->second] << endl; 
 
  349       for (map_type::const_iterator 
i = 
range.first; 
i != 
range.second; ++
i) {
 
  350         print(out, (*
this)[
i->second]);
 
  374         detector.
up  .insert(make_pair(product.
content  .
getUPI(), detector.size()));
 
  377         detector.push_back(product);
 
  399       ifstream 
in(file_name);
 
  401       in.ignore(numeric_limits<streamsize>::max(), 
'\n');
 
  403       for (
string buffer; 
getline(in, buffer); ) {
 
  405         istringstream 
is(buffer);
 
  407         const locale 
loc(is.getloc(), 
new JWhiteSpacesFacet(is.getloc(), 
separator));
 
  414         is >> buffer;  istringstream(
trim(buffer)) >> parameters.
CITY;
 
  415         is >> buffer;  istringstream(
trim(buffer)) >> parameters.
LOCATIONID;
 
  416         is >> buffer;  istringstream(
trim(buffer)) >> parameters.
LOGIN;
 
  417         is >> buffer;  istringstream(
trim(buffer)) >> parameters.
USERID;
 
  418         is >> buffer;  istringstream(
trim(buffer)) >> parameters.
STARTD;
 
  419         is >> buffer;  istringstream(
trim(buffer)) >> parameters.
ENDD;
 
  421         is >> buffer;  istringstream(
trim(buffer)) >> parameters.
POSITION;
 
  426         this->up  .insert(make_pair(product.
content  .
getUPI(), this->size()));
 
  427         this->down.insert(make_pair(product.
container.
getUPI(), this->size()));
 
  429         this->push_back(product);
 
  449         object.up  .insert(make_pair(product.content  .getUPI(), 
object.size()));
 
  450         object.down.insert(make_pair(product.container.getUPI(), 
object.size()));
 
  452         object.push_back(product);
 
  468       for (const_iterator 
i = 
object.begin(); 
i != 
object.end(); ++
i) {
 
  469         out << *
i << std::endl;
 
  486       return up.equal_range(upi);
 
  503       while (q != up.end() && (*this)[q->second].content.getPBS() <= pbs) {
 
  521       return down.equal_range(upi);
 
  548           if (zmap.count(
object.position) == 0 || 
object.start_date > (*this)[zmap[
object.position]].start_date) {
 
  549             zmap[
object.position] = 
i->second;
 
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member. 
 
void unset()
Unset product status. 
 
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance. 
 
JProductIntegration_t(const JProductIntegration &input)
Constructor. 
 
friend std::ostream & operator<<(std::ostream &out, const JDetectorIntegration_t &object)
Write detector integration to output stream. 
 
map_type up
up link UPI to integration data 
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
void configure(JProductIntegration_t &product, const JPeriod_t &period)
Configure detector integration for given detector identifier. 
 
void print(std::ostream &out, const JUPI_t &upi) const 
Print product trace. 
 
void load(const char *const file_name, const std::string &separator=";")
Load detector integration from CSV formatted input file. 
 
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
 
Universal product identifier (UPI). 
 
void set()
Set product status. 
 
range_type find(const JPBS_t &pbs) const 
Find range of products with given PBS. 
 
JProductIntegration_t()
Default constructor. 
 
const JPBS_t & getPBS() const 
Get PBS. 
 
const JUPI_t & getUPI() const 
Get UPI. 
 
std::string trim(const std::string &buffer)
Trim string. 
 
std::pair< map_type::const_iterator, map_type::const_iterator > range_type
 
map_type::const_iterator range_const_iterator
 
static const char *const getName()
Table name. 
 
friend std::istream & operator>>(std::istream &in, JDetectorIntegration_t &object)
Read detector integration from input stream. 
 
std::ostream & separator(std::ostream &out)
Print separator. 
 
const JProductIntegration_t & trace(const JUPI_t &upi, const JPBS_t &pbs=PBS::DETECTOR) const 
Trace product up to given integration level. 
 
JTOOLS::JRange< JDate_t > JPeriod_t
Type definition of period. 
 
friend bool operator>>(ResultSet &rs, JDetectorIntegration_t &detector)
Read detector integration from result set. 
 
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line. 
 
range_type find(const JUPI_t &upi) const 
Find range of products with given UPI. 
 
std::multimap< JUPI_t, int > map_type
 
JDetectorIntegration_t()
Default constructor. 
 
z range($ZMAX-$ZMIN)< $MINIMAL_DZ." fi fi typeset -Z 4 STRING typeset -Z 2 FLOOR JPlot1D -f $
 
map_type down
down link UPI to integration data 
 
Auxiliary class to define a range between two values. 
 
map_type::const_iterator range_iterator
 
bool is_set() const 
Check product status. 
 
void configure(const std::string &detid, const bool option=false)
Configure detector integration for given detector identifier. 
 
Product breakdown structure (PBS). 
 
do set_variable DETECTOR_TXT $WORKDIR detector
 
static const char *const getName()
Table name. 
 
JDateAndTime_t start_date
 
friend std::ostream & operator<<(std::ostream &out, const JProductIntegration_t &object)
Write product integration to output stream. 
 
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
 
void print(std::ostream &out, const JProductIntegration_t &product) const 
Print product trace. 
 
friend std::istream & operator>>(std::istream &in, JProductIntegration_t &object)
Read product integration from input stream. 
 
Auxiliary class for product integration data.