1 #ifndef __JHISTOGRAM1D__ 
    2 #define __JHISTOGRAM1D__ 
   18 namespace JPP { 
using namespace JTOOLS; }
 
   28   template<
class JElement_t>
 
   67   template<
class JElement_t>
 
   93       return (first.getY() + second.getY() < 
__y);
 
  107   template<
class JElement_t,
 
  108            template<
class, 
class> 
class JContainer_t,
 
  111     public JContainer_t<JElement_t, JDistance_t>,
 
  112     public JHistogram<typename JElement_t::abscissa_type, typename JElement_t::ordinate_type>,
 
  113     public JMATH::JMath< JHistogram1D<JElement_t, JContainer_t, JDistance_t> >
 
  127     typedef typename collection_type::iterator                                   
iterator;
 
  193       if      (p == this->begin())
 
  195       else if (p == this->end())
 
  207     template<
class JRebin_t>
 
  210       if (this->size() > 1
u) {
 
  218           while (++i != this->end() && merge(*out,*i)) {
 
  219             out->getY() += i->getY();
 
  227         if (this->
getDistance(__rbegin->getX(), this->rbegin()->getX()) > 0.0) {
 
  229           *out = *(this->rbegin());
 
  247       collection_type::add(static_cast<const collection_type&>(histogram));
 
  262       collection_type::sub(static_cast<const collection_type&>(histogram));
 
  277       collection_type::mul(value);
 
  292       collection_type::div(value);
 
  324       out << static_cast<const histogram_type&> (object);
 
  325       out << static_cast<const collection_type&>(object);
 
  337   template<
class JAbscissa_t,
 
  339            template<
class, 
class> 
class JContainer_t,
 
  342     public JContainer_t<JBin2D<JAbscissa_t, JContents_t>, JDistance_t>,
 
  344     public JMATH::JMath< JHistogram1D<JBin2D<JAbscissa_t, JContents_t>, JContainer_t, JDistance_t> >
 
  359     typedef typename collection_type::iterator                                   
iterator;
 
  414       if      (p == this->begin())
 
  416       else if (p == this->end())
 
  428     template<
class JRebin_t>
 
  431       if (this->size() > 1
u) {
 
  439           while (++i != this->end() && merge(*out,*i)) {
 
  448         if (
getDistance(__rbegin->getX(), this->rbegin()->getX()) > 0.0) {
 
  450           *out = *(this->rbegin());
 
  467       for (
iterator i = this->begin(); i != this->end(); ++i) {
 
  484       for (
iterator i = this->begin(); i != this->end(); ++i) {
 
  519       out << static_cast<const histogram_type&> (object);
 
  520       out << static_cast<const collection_type&>(object);
 
  542   template<
class JElement_t, 
 
  543            template<
class, 
class> 
class JContainer_t,
 
  548     typedef typename JElement_t::abscissa_type                                            abscissa_type;
 
  549     typedef typename JElement_t::ordinate_type                                            ordinate_type;
 
  552     if (input.getSize() > 1) {
 
  554       for (const_iterator 
j = input.begin(), i = 
j++; 
j != input.end(); ++i, ++
j) {
 
  556         const abscissa_type x = 0.5 * (i->getX() + 
j->getX());
 
  557         const ordinate_type y = i->getY();
 
  558         const double        w = input.getDistance(i->getX(), 
j->getX());
 
  574   template<
class JAbscissa_t,
 
  576            template<
class, 
class> 
class JContainer_t,
 
  581     typedef JAbscissa_t                                                                                         abscissa_type;
 
  582     typedef JContents_t                                                                                         contents_type;
 
  585     if (input.getSize() > 1) {
 
  587       for (const_iterator 
j = input.begin(), i = 
j++; 
j != input.end(); ++i, ++
j) {
 
  589         const abscissa_type x = i->getBinCenter();
 
  590         const contents_type y = i->getY();
 
  591         const double        w = input.getDistance(i->getX(), 
j->getX());
 
  608   template<
class JElement_t,
 
  609            template<
class, 
class> 
class JContainer_t,
 
  611   inline typename JElement_t::ordinate_type
 
  615     typedef typename JElement_t::ordinate_type                                            ordinate_type;
 
  620     if (input.getSize() > 1) {
 
  622       output.
put(input.begin()->getX(), V);
 
  624       for (const_iterator 
j = input.begin(), i = 
j++; 
j != input.end(); ++i, ++
j) {
 
  628         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
 
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
 
JContainer_t< element_type, JDistance_t > collection_type
 
static const JZero zero
Function object to assign zero value. 
 
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
 
alias put_queue eval echo n
 
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
 
bool operator()(const value_type &first, const value_type &second) const 
Test whether bins should be merged. 
 
void rebin(JRebin_t merge)
Rebin histogram.