#ifndef HISTOGRAM_H_
#define HISTOGRAM_H_
/**
 *  \file histogram.h
 *  \brief a header for histogram.c
 *
 *
 *  \ingroup corefiles
 *  \date Jul 10, 2009
 *  \author Alexander Pimenov
 */

#ifdef __cplusplus
	extern "C" {
#endif

#include "g12buffer.h"
#include <stdint.h>

/**
 * \brief This structure holds the histogram for the G12Buffer
 */
typedef struct Histogram_TAG {
	uint32_t data[G12BUFFER_MAX_VALUE + 1];  /**< \brief the data*/
} Histogram;

Histogram *histogramCreateFromG12Buffer(G12Buffer *buf);
void histogramDelete(Histogram *toDelete);
uint32_t histogramGetMaximum(Histogram *hist);
uint32_t histogramGetIntervalSum(Histogram *hist, uint16_t start, uint16_t end);


#ifdef __cplusplus
	} // 	extern "C"
#endif

#endif  //HISTOGRAM_H_


