geirs2Panic  Richard J. Mathar
Fits header keyword batch editor
 All Classes Files Functions Variables Macros Pages
Histo.h
Go to the documentation of this file.
1 #ifndef HISTO_H
2 #define HISTO_H
3 /*
4 * MPIA - GEIRS project
5 *
6 * "@(#) $Id$"
7 *
8 */
9 
10 #include <string>
11 #include <vector>
12 #include <valarray>
13 
14 using namespace std ;
15 
20 class Histo {
21 
22 public:
26  vector<int> cts ;
27 
32  vector<int> cumCts ;
33 
36  double strt ;
37 
40  double stride ;
41 
46  double perc[7] ;
47 
51  double mimax[3] ;
52 
55  string name ;
56 
57  Histo() ;
58  Histo(const valarray<float> & arr, const int Nbin, const double range[], string & nam) ;
59  Histo(const valarray<float> & arr, const int Nbin, string & nam) ;
60  Histo(const valarray<float> & arr, string & nam) ;
61 
62  static int valRange(const valarray<float> & arr, double mimax[2]) ;
63 
64  // ~Histo() ;
65 
66  void dumpFil(const char *fname) ;
67 
68 
69 protected:
70 
71 private:
72  void init(const valarray<float> & arr, const int Nbin, const double range[]) ;
73 
74 } ; /* Histo */
75 
76 int fsort(const void * v1, const void * v2) ;
77 
78 #endif /* HISTO_H */
Definition: Histo.h:20
string name
Some kind of file name or tag attached to this statistics.
Definition: Histo.h:55
int fsort(const void *v1, const void *v2)
Support of the qsort call in init().
Definition: Histo.cxx:256
vector< int > cumCts
The cumulative counts on a per-bin basis.
Definition: Histo.h:32
vector< int > cts
The counts on a per-bin basis.
Definition: Histo.h:26
double stride
The width of each bin.
Definition: Histo.h:40
double strt
The smallest range of the first bin.
Definition: Histo.h:36