IHisto.hpp
1 #ifndef OPALS_IHISTO_HPP_INCLUDED
2 #define OPALS_IHISTO_HPP_INCLUDED
3 
4 #include <opals/IModuleBase.hpp>
5 
6 #if !defined(OPALS_EXPORTS) && !defined(OPALS_MODULE_EXPORTS)
7  #if defined _DEBUG && !defined OPALS_NO_DEBUG
8  #pragma comment(lib, "opalsHisto_d.lib")
9  #else
10  #pragma comment(lib, "opalsHisto.lib")
11  #endif
12 #endif
13 
14 #include <opals/String.hpp>
15 #include <opals/Path.hpp>
16 #include <opals/Array.hpp>
17 #include <opals/Vector.hpp>
18 #include <opals/HistoMode.hpp>
19 #include <opals/HistoStats.hpp>
20 
23 
24 namespace opals {
25 
26  namespace opts
27  {
28  namespace Histo
29  {
30  /// Options of \ref ModuleHisto
31  typedef IGroup< Names::_, false, Cons<
32  ILeaf< Names::inFile, false, opals::Vector<opals::Path> >, Cons<
33  ILeaf< Names::attribute, false, opals::Vector<opals::String> >, Cons<
34  ILeaf< Names::histogram, true, opals::Vector<opals::HistoStats> >, Cons<
35  ILeaf< Names::nBins, false, unsigned >, Cons<
36  ILeaf< Names::binWidth, false, float >, Cons<
37  ILeaf< Names::sampleRange, false, ArrayF2 >, Cons<
38  ILeaf< Names::densityRange, false, ArrayF2 >, Cons<
39  ILeaf< Names::limit, false, ArrayD4 >, Cons<
40  ILeaf< Names::filter, false, opals::String >, Cons<
41  ILeaf< Names::plotFile, false, opals::Vector<opals::Path> >, Cons<
42  ILeaf< Names::probabilities, false, opals::Vector<double> >, Cons<
43  ILeaf< Names::procMode, false, opals::HistoMode::Type >, Cons<
44  ILeaf< Names::exactComputation, false, bool >
45  > > > > > > > > > > > > > > Options;
46  }
47  }
48 
49  /// Derives histograms and descriptive statistics (min, max, mean, r.m.s, etc.) for ODM or grid/raster data sets and stores the results graphically (SVG) and numerically (XML).
50  /** The boost::accumulator framework is used to analyze the data, to calculate
51  standard statistics (min max, mean, median, quantiles,...) and to create the
52  histogram itself. Finally, if requested by the user, a plot file in SVG format
53  is generated using boost::svg_plot (not yet part of the boost library). */
54  /// \see \ref ModuleHisto
55  class OPALS_API IHisto : virtual public IModuleBase
56  {
57 
58  public:
59  static IHisto* New();
60  static IHisto* New( IControlObject &controlObject );
61  static IHisto* New( const IModuleBase &parent );
62  static IHisto* New( const IModuleBase &parent, IControlObject &controlObject );
63 
64  virtual ~IHisto() {}
65 
66  /// \name Access to module-specific options.
67  ///@{
69  virtual Options& opts() = 0;
70  virtual const Options& opts() const = 0;
71  ///}@
72 
73  };
74 
75 };
76 
77 #endif