MINT2
HyperBinningAlgorithms.h
Go to the documentation of this file.
1 
23 #ifndef HYPERBINNINGALGORITHMS_HH
24 #define HYPERBINNINGALGORITHMS_HH
25 
26 // HyperPlot includes
28 #include "Mint/MessageService.h"
29 
30 // Root includes
31 
32 // std includes
33 
34 
35 class AlgOption{
36 
37  public:
38 
41  enum OptionName{
55  FUNC,
59  };
60 
61 
62  private:
63 
65  bool _bool;
66  int _int;
67  double _double;
68  std::vector<double> _doublevector;
69  std::vector<int> _intvector;
72  TString _string;
78  AlgOption();
79 
80  public:
81 
82  static AlgOption Empty ();
83  static AlgOption StartDimension (int dim );
84  static AlgOption BinningDimensions (std::vector<int> dims);
85  static AlgOption RandomSeed (int seed);
86  static AlgOption MinBinWidth (double width);
87  static AlgOption MinBinWidth (HyperPoint widths);
88  static AlgOption MinBinContent (double val );
89  static AlgOption MinShadowBinContent(double val );
90  static AlgOption UseWeights (bool val = true);
91  static AlgOption UseShadowData (const HyperPointSet& data);
92  static AlgOption DrawAlgorithm (TString path);
93  static AlgOption AxisTitles (HyperName name);
94  static AlgOption UseFunction (HyperFunction* func);
95  static AlgOption GridMultiplier (int val);
96  static AlgOption GridMultiplier (HyperPoint val);
97  static AlgOption SnapToGrid (bool val);
98  static AlgOption NumPhaseBinPairs (int val);
99  static AlgOption PhaseBinEdges (std::vector<double> val);
100  static AlgOption StartBinning (const HyperBinning& binning);
101 
102 
103  bool isEmpty();
104 
106  bool getBoolOpt ();
107  int getIntOpt ();
108  double getDoubleOpt ();
109  TString getStringOpt ();
110  std::vector<int> getIntVectorOpt ();
111  std::vector<double> getDoubleVectorOpt ();
117 
118 
119  ~AlgOption();
120 
121 };
122 
135 
136 public:
137 
140 
141 
142 private:
143 
144  std::vector<AlgOption> _algOptions;
153  bool optExist(AlgOption::OptionName name);
154 
155 public:
156 
157  HyperBinningAlgorithms(Alg algorithm);
158 
159  void addAlgOption(AlgOption option);
160 
163 
164 };
165 
166 
167 #endif
168 
HyperName getHyperNameOpt()
static AlgOption GridMultiplier(int val)
static AlgOption SnapToGrid(bool val)
std::vector< double > _doublevector
HyperName _hyperName
HyperFunction * _hyperFunc
void addAlgOption(AlgOption option)
Add an AlgOption which is passed to the binning algortihm.
static AlgOption Empty()
std::vector< int > _intvector
std::vector< double > getDoubleVectorOpt()
static AlgOption AxisTitles(HyperName name)
static AlgOption RandomSeed(int seed)
static AlgOption MinBinWidth(double width)
HyperPoint getHyperPointOpt()
static AlgOption StartBinning(const HyperBinning &binning)
static AlgOption DrawAlgorithm(TString path)
OptionName getOptionName()
static AlgOption MinBinContent(double val)
static AlgOption BinningDimensions(std::vector< int > dims)
HyperBinningMaker * getHyperBinningMaker(HyperCuboid binningRange, HyperPointSet points)
OptionName _optionName
static AlgOption UseWeights(bool val=true)
static AlgOption NumPhaseBinPairs(int val)
static AlgOption StartDimension(int dim)
const HyperBinning * _hyperBinning
const HyperPointSet & getHyperPointSetOpt()
AlgOption getOpt(AlgOption::OptionName name)
bool optExist(AlgOption::OptionName name)
std::vector< int > getIntVectorOpt()
const HyperBinning * getHyperBinningOpt()
const HyperPointSet * _hyperPointSet
static AlgOption UseFunction(HyperFunction *func)
Use this if you want to provide a HyperFunction.
static AlgOption PhaseBinEdges(std::vector< double > val)
std::vector< AlgOption > _algOptions
static AlgOption MinShadowBinContent(double val)
HyperPoint _hyperPoint
static AlgOption UseShadowData(const HyperPointSet &data)
HyperFunction * getFuncOpt()