RAIDA  1.9.0
IHistogramFactoryROOT.h
1 // -*- C++ -*-
2 #ifndef AIDA_IHISTOGRAMFACTORYROOT_H
3 #define AIDA_IHISTOGRAMFACTORYROOT_H 1
4 
5 #include <AIDA/IHistogramFactory.h>
6 #include <AIDA/ITree.h>
7 #include <AIDA/IHistogram1D.h>
8 #include <AIDA/IHistogram2D.h>
9 #include <string>
10 #include <vector>
11 #include <set>
12 
13 namespace AIDA {
14 
15  class IBaseHistogram;
16  class ICloud1D;
17  class ICloud2D;
18  class ICloud3D;
19  class IHistogram1D;
20  class IHistogram2D;
21  class IHistogram3D;
22  class IProfile1D;
23  class IProfile2D;
24 
34 
35 public:
37  virtual ~IHistogramFactoryROOT();
38 
41 
48  virtual bool destroy(IBaseHistogram * hist) ;
49 
64  virtual ICloud1D * createCloud1D(const std::string & path,
65  const std::string & title,
66  int nMax = -1,
67  const std::string & options = "") ;
68 
79  virtual ICloud1D * createCloud1D(const std::string & pathAndTitle) ;
80 
91  virtual ICloud1D * createCopy(const std::string & path,
92  const ICloud1D & cloud) ;
93 
108  virtual ICloud2D * createCloud2D(const std::string & path,
109  const std::string & title,
110  int nMax = -1,
111  const std::string & options = "") ;
112 
123  virtual ICloud2D * createCloud2D(const std::string & pathAndTitle) ;
124 
135  virtual ICloud2D * createCopy(const std::string & path,
136  const ICloud2D & cloud) ;
137 
152  virtual ICloud3D * createCloud3D(const std::string & path,
153  const std::string & title,
154  int nMax = -1,
155  const std::string & options = "") ;
156 
167  virtual ICloud3D * createCloud3D(const std::string & pathAndTitle) ;
168 
179  virtual ICloud3D * createCopy(const std::string & path,
180  const ICloud3D & cloud) ;
181 
197  virtual IHistogram1D * createHistogram1D(const std::string & path,
198  const std::string & title,
199  int nBins,
200  double lowerEdge,
201  double upperEdge,
202  const std::string & options = "") ;
203 
217  virtual IHistogram1D * createHistogram1D(const std::string & pathAndTitle,
218  int nBins,
219  double lowerEdge,
220  double upperEdge) ;
221 
235  virtual IHistogram1D * createHistogram1D(const std::string & path,
236  const std::string & title,
237  const std::vector<double> & binEdges,
238  const std::string & options = "") ;
239 
250  virtual IHistogram1D * createCopy(const std::string & path,
251  const IHistogram1D & hist) ;
252 
271  virtual IHistogram2D * createHistogram2D(const std::string & path,
272  const std::string & title,
273  int nBinsX,
274  double lowerEdgeX,
275  double upperEdgeX,
276  int nBinsY,
277  double lowerEdgeY,
278  double upperEdgeY,
279  const std::string & options = "") ;
280 
297  virtual IHistogram2D * createHistogram2D(const std::string & pathAndTitle,
298  int nBinsX,
299  double lowerEdgeX,
300  double upperEdgeX,
301  int nBinsY,
302  double lowerEdgeY,
303  double upperEdgeY) ;
304 
319  virtual IHistogram2D * createHistogram2D(const std::string & path,
320  const std::string & title,
321  const std::vector<double> & binEdgesX,
322  const std::vector<double> & binEdgesY,
323  const std::string & options = "") ;
324 
335  virtual IHistogram2D * createCopy(const std::string & path,
336  const IHistogram2D & hist) ;
337 
359  virtual IHistogram3D * createHistogram3D(const std::string & path,
360  const std::string & title,
361  int nBinsX,
362  double lowerEdgeX,
363  double upperEdgeX,
364  int nBinsY,
365  double lowerEdgeY,
366  double upperEdgeY,
367  int nBinsZ,
368  double lowerEdgeZ,
369  double upperEdgeZ,
370  const std::string & options = "") ;
371 
391  virtual IHistogram3D * createHistogram3D(const std::string & pathAndTitle,
392  int nBinsX,
393  double lowerEdgeX,
394  double upperEdgeX,
395  int nBinsY,
396  double lowerEdgeY,
397  double upperEdgeY,
398  int nBinsZ,
399  double lowerEdgeZ,
400  double upperEdgeZ) ;
401 
417  virtual IHistogram3D * createHistogram3D(const std::string & path,
418  const std::string & title,
419  const std::vector<double> & binEdgesX,
420  const std::vector<double> & binEdgesY,
421  const std::vector<double> & binEdgesZ,
422  const std::string & options = "") ;
423 
434  virtual IHistogram3D * createCopy(const std::string & path,
435  const IHistogram3D & hist) ;
436 
451  virtual IProfile1D * createProfile1D(const std::string & path,
452  const std::string & title,
453  int nBins,
454  double lowerEdge,
455  double upperEdge,
456  const std::string & options = "") ;
457 
474  virtual IProfile1D * createProfile1D(const std::string & path,
475  const std::string & title,
476  int nBins,
477  double lowerEdge,
478  double upperEdge,
479  double lowerValue,
480  double upperValue,
481  const std::string & options = "") ;
482 
495  virtual IProfile1D * createProfile1D(const std::string & path,
496  const std::string & title,
497  const std::vector<double> & binEdges,
498  const std::string & options = "") ;
499 
514  virtual IProfile1D * createProfile1D(const std::string & path,
515  const std::string & title,
516  const std::vector<double> & binEdges,
517  double lowerValue,
518  double upperValue,
519  const std::string & options = "") ;
520 
534  virtual IProfile1D * createProfile1D(const std::string & pathAndTitle,
535  int nBins,
536  double lowerEdge,
537  double upperEdge) ;
538 
554  virtual IProfile1D * createProfile1D(const std::string & pathAndTitle,
555  int nBins,
556  double lowerEdge,
557  double upperEdge,
558  double lowerValue,
559  double upperValue) ;
560 
571  virtual IProfile1D * createCopy(const std::string & path,
572  const IProfile1D & profile) ;
573 
591  virtual IProfile2D * createProfile2D(const std::string & path,
592  const std::string & title,
593  int nBinsX,
594  double lowerEdgeX,
595  double upperEdgeX,
596  int nBinsY,
597  double lowerEdgeY,
598  double upperEdgeY,
599  const std::string & options = "") ;
600 
620  virtual IProfile2D * createProfile2D(const std::string & path,
621  const std::string & title,
622  int nBinsX,
623  double lowerEdgeX,
624  double upperEdgeX,
625  int nBinsY,
626  double lowerEdgeY,
627  double upperEdgeY,
628  double lowerValue,
629  double upperValue,
630  const std::string & options = "") ;
631 
645  virtual IProfile2D * createProfile2D(const std::string & path,
646  const std::string & title,
647  const std::vector<double> & binEdgesX,
648  const std::vector<double> & binEdgesY,
649  const std::string & options = "") ;
650 
666  virtual IProfile2D * createProfile2D(const std::string & path,
667  const std::string & title,
668  const std::vector<double> & binEdgesX,
669  const std::vector<double> & binEdgesY,
670  double lowerValue,
671  double upperValue,
672  const std::string & options = "") ;
673 
690  virtual IProfile2D * createProfile2D(const std::string & pathAndTitle,
691  int nBinsX,
692  double lowerEdgeX,
693  double upperEdgeX,
694  int nBinsY,
695  double lowerEdgeY,
696  double upperEdgeY) ;
697 
716  virtual IProfile2D * createProfile2D(const std::string & pathAndTitle,
717  int nBinsX,
718  double lowerEdgeX,
719  double upperEdgeX,
720  int nBinsY,
721  double lowerEdgeY,
722  double upperEdgeY,
723  double lowerValue,
724  double upperValue) ;
725 
736  virtual IProfile2D * createCopy(const std::string & path,
737  const IProfile2D & profile) ;
738 
751  virtual IHistogram1D * add(const std::string & path,
752  const IHistogram1D & hist1,
753  const IHistogram1D & hist2) ;
754 
767  virtual IHistogram1D * subtract(const std::string & path,
768  const IHistogram1D & hist1,
769  const IHistogram1D & hist2) ;
770 
783  virtual IHistogram1D * multiply(const std::string & path,
784  const IHistogram1D & hist1,
785  const IHistogram1D & hist2) ;
786 
799  virtual IHistogram1D * divide(const std::string & path,
800  const IHistogram1D & hist1,
801  const IHistogram1D & hist2) ;
802 
815  virtual IHistogram2D * add(const std::string & path,
816  const IHistogram2D & hist1,
817  const IHistogram2D & hist2) ;
818 
831  virtual IHistogram2D * subtract(const std::string & path,
832  const IHistogram2D & hist1,
833  const IHistogram2D & hist2) ;
834 
847  virtual IHistogram2D * multiply(const std::string & path,
848  const IHistogram2D & hist1,
849  const IHistogram2D & hist2) ;
850 
863  virtual IHistogram2D * divide(const std::string & path,
864  const IHistogram2D & hist1,
865  const IHistogram2D & hist2) ;
866 
879  virtual IHistogram3D * add(const std::string & path,
880  const IHistogram3D & hist1,
881  const IHistogram3D & hist2) ;
882 
895  virtual IHistogram3D * subtract(const std::string & path,
896  const IHistogram3D & hist1,
897  const IHistogram3D & hist2) ;
898 
911  virtual IHistogram3D * multiply(const std::string & path,
912  const IHistogram3D & hist1,
913  const IHistogram3D & hist2) ;
914 
927  virtual IHistogram3D * divide(const std::string & path,
928  const IHistogram3D & hist1,
929  const IHistogram3D & hist2) ;
930 
942  virtual IHistogram1D * projectionX(const std::string & path,
943  const IHistogram2D & hist) ;
944 
956  virtual IHistogram1D * projectionY(const std::string & path,
957  const IHistogram2D & hist) ;
958 
971  virtual IHistogram1D * sliceX(const std::string & path,
972  const IHistogram2D & hist,
973  int index) ;
974 
987  virtual IHistogram1D * sliceY(const std::string & path,
988  const IHistogram2D & hist,
989  int index) ;
990 
1003  virtual IHistogram1D * sliceX(const std::string & path,
1004  const IHistogram2D & hist,
1005  int index1,
1006  int index2) ;
1007 
1020  virtual IHistogram1D * sliceY(const std::string & path,
1021  const IHistogram2D & hist,
1022  int index1,
1023  int index2) ;
1024 
1036  virtual IHistogram2D * projectionXY(const std::string & path,
1037  const IHistogram3D & hist) ;
1038 
1050  virtual IHistogram2D * projectionXZ(const std::string & path,
1051  const IHistogram3D & hist) ;
1052 
1064  virtual IHistogram2D * projectionYZ(const std::string & path,
1065  const IHistogram3D & hist) ;
1066 
1082  virtual IHistogram2D * sliceXY(const std::string & path,
1083  const IHistogram3D & hist,
1084  int index1,
1085  int index2) ;
1086 
1102  virtual IHistogram2D * sliceXZ(const std::string & path,
1103  const IHistogram3D & hist,
1104  int index1,
1105  int index2) ;
1106 
1122  virtual IHistogram2D * sliceYZ(const std::string & path,
1123  const IHistogram3D & hist,
1124  int index1,
1125  int index2) ;
1126 
1127 private:
1128 
1129  ITree* _usedTree;
1130  static const int _nMaxDefault;
1131 
1132  // a set (sorted associative stl container) which contains
1133  // pointers to all the histograms which have been created with this
1134  // factory. All these histograms belong the factory, so we have to do
1135  // some bookkeeping.
1136  std::set<IBaseHistogram *> _histosInThisFactory;
1137 
1138 }; // class
1139 } // namespace AIDA
1140 #endif /* ifndef AIDA_IHISTOGRAMFACTORYROOT_H */
virtual IHistogram2D * sliceYZ(const std::string &path, const IHistogram3D &hist, int index1, int index2)
Create an IHistogram2D by slicing an IHistogram3D perpendicular to the X axis, between &quot;index1&quot; and &quot;...
Definition: IHistogramFactoryROOT.cc:3706
class IManagedObject;
Definition: ITree.h:37
User level interface to a 1D Cloud.
Definition: ICloud1D.h:30
User level interface to a 1-dimensional profile histogram.
Definition: IProfile1D.h:28
virtual IHistogram1D * subtract(const std::string &path, const IHistogram1D &hist1, const IHistogram1D &hist2)
Create an IHistogram1D by subtracting two IHistogram1D.
Definition: IHistogramFactoryROOT.cc:2622
virtual IHistogram1D * add(const std::string &path, const IHistogram1D &hist1, const IHistogram1D &hist2)
Create an IHistogram1D by adding two IHistogram1D.
Definition: IHistogramFactoryROOT.cc:2574
virtual IHistogram2D * sliceXY(const std::string &path, const IHistogram3D &hist, int index1, int index2)
Create an IHistogram2D by slicing an IHistogram3D perpendicular to the Z axis, between &quot;index1&quot; and &quot;...
Definition: IHistogramFactoryROOT.cc:3565
virtual IHistogram2D * projectionXZ(const std::string &path, const IHistogram3D &hist)
Create an IHistogram2D by projecting an IHistogram3D on the x-z plane.
Definition: IHistogramFactoryROOT.cc:3539
User level interface to 1D Histogram.
Definition: IHistogram1D.h:28
virtual IHistogram1D * sliceY(const std::string &path, const IHistogram2D &hist, int index)
Create an IHistogram1D by slicing an IHistogram2D parallel to the x axis at a given bin...
Definition: IHistogramFactoryROOT.cc:3369
User level interface to 3D Histogram.
Definition: IHistogram3D.h:28
User level interface for factory classes of Histograms (binned, unbinned, and profile) The created ob...
Definition: IHistogramFactoryROOT.h:33
virtual IProfile2D * createProfile2D(const std::string &path, const std::string &title, int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY, const std::string &options="")
Create a IProfile2D.
Definition: IHistogramFactoryROOT.cc:1514
virtual IHistogram3D * createHistogram3D(const std::string &path, const std::string &title, int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY, int nBinsZ, double lowerEdgeZ, double upperEdgeZ, const std::string &options="")
Create a IHistogram3D.
Definition: IHistogramFactoryROOT.cc:664
virtual IHistogram2D * projectionYZ(const std::string &path, const IHistogram3D &hist)
Create an IHistogram2D by projecting an IHistogram3D on the y-z plane.
Definition: IHistogramFactoryROOT.cc:3552
class IAnnotation;
Definition: IBaseHistogram.h:29
User level interface to a 2D Cloud.
Definition: ICloud2D.h:30
virtual ICloud1D * createCopy(const std::string &path, const ICloud1D &cloud)
Create a copy of an ICloud1D.
Definition: IHistogramFactoryROOT.cc:2181
virtual ~IHistogramFactoryROOT()
Destructor.
Definition: IHistogramFactoryROOT.cc:36
virtual IHistogram2D * sliceXZ(const std::string &path, const IHistogram3D &hist, int index1, int index2)
Create an IHistogram2D by slicing an IHistogram3D perpendicular to the Y axis, between &quot;index1&quot; and &quot;...
Definition: IHistogramFactoryROOT.cc:3636
virtual IProfile1D * createProfile1D(const std::string &path, const std::string &title, int nBins, double lowerEdge, double upperEdge, const std::string &options="")
Create a IProfile1D.
Definition: IHistogramFactoryROOT.cc:1026
User level interface for factory classes of Histograms (binned, unbinned, and profile) The created ob...
Definition: IHistogramFactory.h:38
User level interface to a 2-dimensional profile histogram.
Definition: IProfile2D.h:28
virtual ICloud1D * createCloud1D(const std::string &path, const std::string &title, int nMax=-1, const std::string &options="")
Create a ICloud1D, an unbinned 1-dimensional histogram.
Definition: IHistogramFactoryROOT.cc:2087
virtual IHistogram2D * projectionXY(const std::string &path, const IHistogram3D &hist)
Create an IHistogram2D by projecting an IHistogram3D on the x-y plane.
Definition: IHistogramFactoryROOT.cc:3526
User level interface to 2D Histogram.
Definition: IHistogram2D.h:28
virtual IHistogram1D * projectionX(const std::string &path, const IHistogram2D &hist)
Create an IHistogram1D by projecting an IHistogram2D along its x axis.
Definition: IHistogramFactoryROOT.cc:3329
virtual ICloud3D * createCloud3D(const std::string &path, const std::string &title, int nMax=-1, const std::string &options="")
Create a ICloud3D, an unbinned 3-dimensional histogram.
Definition: IHistogramFactoryROOT.cc:2412
virtual IHistogram1D * sliceX(const std::string &path, const IHistogram2D &hist, int index)
Create an IHistogram1D by slicing an IHistogram2D parallel to the y axis at a given bin...
Definition: IHistogramFactoryROOT.cc:3355
virtual IHistogram2D * createHistogram2D(const std::string &path, const std::string &title, int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY, const std::string &options="")
Create a IHistogram2D.
Definition: IHistogramFactoryROOT.cc:345
virtual IHistogram1D * divide(const std::string &path, const IHistogram1D &hist1, const IHistogram1D &hist2)
Create an IHistogram1D by dividing two IHistogram1D.
Definition: IHistogramFactoryROOT.cc:2720
virtual bool destroy(IBaseHistogram *hist)
Destroy an IBaseHistogram ogject.
Definition: IHistogramFactoryROOT.cc:50
virtual IHistogram1D * projectionY(const std::string &path, const IHistogram2D &hist)
Create an IHistogram1D by projecting an IHistogram2D along its y axis.
Definition: IHistogramFactoryROOT.cc:3342
virtual IHistogram1D * createHistogram1D(const std::string &path, const std::string &title, int nBins, double lowerEdge, double upperEdge, const std::string &options="")
Create a IHistogram1D.
Definition: IHistogramFactoryROOT.cc:67
virtual ICloud2D * createCloud2D(const std::string &path, const std::string &title, int nMax=-1, const std::string &options="")
Create a ICloud2D, an unbinned 2-dimensional histogram.
Definition: IHistogramFactoryROOT.cc:2250
virtual IHistogram1D * multiply(const std::string &path, const IHistogram1D &hist1, const IHistogram1D &hist2)
Create an IHistogram1D by multiplying two IHistogram1D.
Definition: IHistogramFactoryROOT.cc:2671
User level interface to a 3D Cloud.
Definition: ICloud3D.h:30