1 #ifndef __JHISTOGRAM1D__ 
    2 #define __JHISTOGRAM1D__ 
   18 namespace JPP { 
using namespace JTOOLS; }
 
   29   template<
class JElement_t>
 
   68   template<
class JElement_t>
 
   94       return (first.getY() + second.getY() < 
__y);
 
  108   template<
class JElement_t,
 
  109            template<
class, 
class> 
class JContainer_t,
 
  112     public JContainer_t<JElement_t, JDistance_t>,
 
  113     public JHistogram<typename JElement_t::abscissa_type, typename JElement_t::ordinate_type>,
 
  114     public JMath< JHistogram1D<JElement_t, JContainer_t, JDistance_t> >
 
  128     typedef typename collection_type::iterator                                   
iterator;
 
  175       for (
iterator i = this->begin(); i != this->end(); ++i) {
 
  207       if      (p == this->begin())
 
  209       else if (p == this->end())
 
  221     template<
class JRebin_t>
 
  224       if (this->size() > 1
u) {
 
  232           while (++i != this->end() && merge(*out,*i)) {
 
  233             out->getY() += i->getY();
 
  241         if (this->
getDistance(__rbegin->getX(), this->rbegin()->getX()) > 0.0) {
 
  243           *out = *(this->rbegin());
 
  261       collection_type::add(static_cast<const collection_type&>(histogram));
 
  276       collection_type::sub(static_cast<const collection_type&>(histogram));
 
  291       collection_type::mul(value);
 
  306       collection_type::div(value);
 
  338       out << static_cast<const histogram_type&> (object);
 
  339       out << static_cast<const collection_type&>(object);
 
  351   template<
class JAbscissa_t,
 
  353            template<
class, 
class> 
class JContainer_t,
 
  356     public JContainer_t<JBin2D<JAbscissa_t, JContents_t>, JDistance_t>,
 
  358     public JMath< JHistogram1D<JBin2D<JAbscissa_t, JContents_t>, JContainer_t, JDistance_t> >
 
  373     typedef typename collection_type::iterator                                   
iterator;
 
  428       if      (p == this->begin())
 
  430       else if (p == this->end())
 
  442     template<
class JRebin_t>
 
  445       if (this->size() > 1
u) {
 
  453           while (++i != this->end() && merge(*out,*i)) {
 
  462         if (
getDistance(__rbegin->getX(), this->rbegin()->getX()) > 0.0) {
 
  464           *out = *(this->rbegin());
 
  481       for (
iterator i = this->begin(); i != this->end(); ++i) {
 
  498       for (
iterator i = this->begin(); i != this->end(); ++i) {
 
  533       out << static_cast<const histogram_type&> (object);
 
  534       out << static_cast<const collection_type&>(object);
 
  556   template<
class JElement_t, 
 
  557            template<
class, 
class> 
class JContainer_t,
 
  562     typedef typename JElement_t::abscissa_type                                            abscissa_type;
 
  563     typedef typename JElement_t::ordinate_type                                            ordinate_type;
 
  566     if (input.getSize() > 1) {
 
  568       for (const_iterator 
j = input.begin(), i = 
j++; 
j != input.end(); ++i, ++
j) {
 
  570         const abscissa_type 
x = 0.5 * (i->getX() + 
j->getX());
 
  571         const ordinate_type y = i->getY();
 
  572         const double        w = input.getDistance(i->getX(), 
j->getX());
 
  588   template<
class JAbscissa_t,
 
  590            template<
class, 
class> 
class JContainer_t,
 
  595     typedef JAbscissa_t                                                                                         abscissa_type;
 
  596     typedef JContents_t                                                                                         contents_type;
 
  599     if (input.getSize() > 1) {
 
  601       for (const_iterator 
j = input.begin(), i = 
j++; 
j != input.end(); ++i, ++
j) {
 
  603         const abscissa_type 
x = i->getBinCenter();
 
  604         const contents_type y = i->getY();
 
  605         const double        w = input.getDistance(i->getX(), 
j->getX());
 
  622   template<
class JElement_t,
 
  623            template<
class, 
class> 
class JContainer_t,
 
  625   inline typename JElement_t::ordinate_type
 
  629     typedef typename JElement_t::ordinate_type                                            ordinate_type;
 
  634     if (input.getSize() > 1) {
 
  636       output.
put(input.begin()->getX(), 
V);
 
  638       for (const_iterator 
j = input.begin(), i = 
j++; 
j != input.end(); ++i, ++
j) {
 
  642         output.
put(
j->getX(), 
V);
 
Interface for binary output. 
 
friend JReader & operator>>(JReader &in, JHistogram1D &object)
Read histogram from input. 
 
Auxiliary base class for aritmetic operations of derived class types. 
 
JContent(const contents_type y)
Constructor. 
 
The elements in a collection are sorted according to their abscissa values and a given distance opera...
 
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance. 
 
JTOOLS::JRebin< value_type > JRebin
 
JContainer_t< element_type, JDistance_t > collection_type
 
static const JZero zero
Function object to assign zero value. 
 
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
 
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
 
double getDistance(const JFirst_t &first, const JSecond_t &second)
Get distance between objects. 
 
JHistogram1D(const JAbstractCollection< abscissa_type > &bounds)
Constructor. 
 
JBin2D< JAbscissa_t, JContents_t > element_type
 
JHistogram< abscissa_type, ordinate_type > histogram_type
 
JArgument< T >::argument_type argument_type
 
JElement_t::ordinate_type contents_type
 
JHistogram1D & mul(const double value)
Scale contents. 
 
virtual void evaluate(const abscissa_type *pX, typename JClass< contents_type >::argument_type w)
Fill histogram. 
 
General purpose class for a collection of sorted elements. 
 
JHistogram1D()
Default constructor. 
 
Interface for binary input. 
 
Auxiliary class for merging of consecutive bins until minimal content is reached. ...
 
collection_type::ordinate_type ordinate_type
 
collection_type::const_iterator const_iterator
 
JHistogram1D & div(const double value)
Scale contents. 
 
Template for generic class types. 
 
collection_type::iterator iterator
 
collection_type::abscissa_type abscissa_type
 
collection_type::reverse_iterator reverse_iterator
 
void fill(typename JClass< abscissa_type >::argument_type x, typename JClass< contents_type >::argument_type w)
Fill histogram. 
 
JTOOLS::JContent< value_type > JContent
 
Base class for data structures with artithmetic capabilities. 
 
collection_type::const_reverse_iterator const_reverse_iterator
 
histogram_type::contents_type contents_type
 
friend JWriter & operator<<(JWriter &out, const JHistogram1D &object)
Write histogram to output. 
 
collection_type::value_type value_type
 
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
 
bool operator()(const value_type &first, const value_type &second) const 
Test whether bins should be merged. 
 
void rebin(JRebin_t merge)
Rebin histogram.