00001
00002
00003
00004
00005
00006
00007 #ifndef BUILDER_H
00008 #define BUILDER_H
00009
00010
00011
00012
00013 #include <vector>
00014 #include <string>
00015 #include "HistoParameters/HistoParameters.h"
00016
00017
00018
00019 namespace Anaphe {
00020
00021
00022
00023
00024 #ifdef AIDA_STD
00025 # undef AIDA_STD
00026 #endif
00027 #ifdef AIDA_NOT_USE_STD
00028 # define AIDA_STD
00029 #else
00030 # define AIDA_STD std
00031 #endif
00032
00033
00034 class CHBookHisto;
00035 class CHBookHisto2;
00036
00037
00038
00039 namespace AIDA_HBook {
00040
00041
00042
00043 class Builder
00044 {
00045 public:
00046 Builder(void);
00047 Builder(const Builder&);
00048 const Builder& operator=(const Builder&);
00049 ~Builder(void);
00050
00051 public:
00052 void noWarnings(const bool& = true);
00053 CHBookHisto* buildFrom(const HistoParameters1D&, const int& id = 1);
00054 CHBookHisto2* buildFrom(const HistoParameters2D&, const int& id = 1);
00055
00056 private:
00057 CHBookHisto* makeNewCHBookHisto(const HistoParameters1D& hp, const int& id) const;
00058 CHBookHisto2* makeNewCHBookHisto2(const HistoParameters2D& hp, const int& id) const;
00059 void extractPairs(const HistoParameters1D&,
00060 AIDA_STD::vector<AIDA_STD::pair<float,float> >&) const;
00061 void extractPairs(const HistoParameters2D&,
00062 AIDA_STD::vector<AIDA_STD::vector<AIDA_STD::pair<float,float> > >&) const;
00063 bool goodParameters(const HistoParameters1D& parameters) const;
00064 bool goodParameters(const HistoParameters2D& parameters) const;
00065 void no2DVarError(void) const;
00066 void errorMessage(const AIDA_STD::string& msg) const;
00067
00068 private:
00069 bool silent;
00070
00071 };
00072
00073
00074
00075
00076 }
00077
00078 }
00079
00080
00081 #endif // CHBOOK_BUILDER_H