| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GaudiPI.h
Go to the documentation of this file.
1 #ifndef GAUDISVC_GAUDIPI_H
2 #define GAUDISVC_GAUDIPI_H
3
4 #include "AIDA_visibility_hack.h"
5
6 #include <vector>
7 #include <utility>
8 #include "AIDA/IHistogram1D.h"
9 #include "AIDA/IHistogram2D.h"
10 #include "AIDA/IHistogram3D.h"
11 #include "AIDA/IProfile1D.h"
12 #include "AIDA/IProfile2D.h"
13 #include "GaudiKernel/HistogramBase.h"
14
15 class DataObject;
16 class TH2D;
17
18 namespace Gaudi {
19 typedef std::vector<double> Edges;
20
21 template <class Q, class T> T* getRepresentation(const Q& hist) {
22 T* result = 0;
23 const HistogramBase *p = dynamic_cast<const HistogramBase*>(&hist);
24 if ( p ) {
25 result = dynamic_cast<T*>(p->representation());
26 }
27 return result;
28 }
30 std::pair<DataObject*,AIDA::IHistogram1D*> createH1D(const AIDA::IHistogram1D& hist);
32 std::pair<DataObject*,AIDA::IHistogram1D*> createH1D(const std::string& title, int nBins=10, double lowerEdge=0., double upperEdge=1.);
34 std::pair<DataObject*,AIDA::IHistogram1D*> createH1D(const std::string& title, const Edges& e);
35
37 std::pair<DataObject*,AIDA::IHistogram2D*> createH2D(const AIDA::IHistogram2D& hist);
39 std::pair<DataObject*,AIDA::IHistogram2D*> createH2D(TH2D* rep);
41 std::pair<DataObject*,AIDA::IHistogram2D*> createH2D(const std::string& title, int binsX, double iminX, double imaxX, int binsY, double iminY, double imaxY);
43 std::pair<DataObject*,AIDA::IHistogram2D*> createH2D(const std::string& title, const Edges& eX, const Edges& eY);
45 std::pair<DataObject*,AIDA::IHistogram1D*> slice1DX(const std::string& name, const AIDA::IHistogram2D& h, int firstbin, int lastbin);
47 std::pair<DataObject*,AIDA::IProfile1D*> profile1DX(const std::string& name, const AIDA::IHistogram2D& h, int firstbin, int lastbin);
49 std::pair<DataObject*,AIDA::IHistogram1D*> project1DX(const std::string& name, const AIDA::IHistogram2D& h, int firstbin, int lastbin);
51 std::pair<DataObject*,AIDA::IHistogram1D*> slice1DY (const std::string& name, const AIDA::IHistogram2D& h, int firstbin, int lastbin);
53 std::pair<DataObject*,AIDA::IProfile1D*> profile1DY(const std::string& name, const AIDA::IHistogram2D& h, int firstbin, int lastbin);
55 std::pair<DataObject*,AIDA::IHistogram1D*> project1DY(const std::string& name, const AIDA::IHistogram2D& h, int firstbin, int lastbin);
56
58 std::pair<DataObject*,AIDA::IHistogram3D*> createH3D(const AIDA::IHistogram3D& hist);
60 std::pair<DataObject*,AIDA::IHistogram3D*> createH3D(const std::string& title, int nBinsX, double xlow, double xup, int nBinsY, double ylow, double yup, int nBinsZ, double zlow, double zup);
62 std::pair<DataObject*,AIDA::IHistogram3D*> createH3D(const std::string& title, const Edges & eX,const Edges& eY, const Edges& eZ);
63
65 std::pair<DataObject*,AIDA::IProfile1D*> createProf1D(const AIDA::IProfile1D& hist);
67 std::pair<DataObject*,AIDA::IProfile1D*> createProf1D
68 (const std::string& title, int nBins, double xlow, double xup, double ylow, double yup, const std::string& opt="" );
70 std::pair<DataObject*,AIDA::IProfile1D*> createProf1D
71 (const std::string& title, const Edges& e, double ylow, double yup, const std::string& opt="");
72
74 std::pair<DataObject*,AIDA::IProfile2D*> createProf2D(const AIDA::IProfile2D& hist);
76 std::pair<DataObject*,AIDA::IProfile2D*> createProf2D(const std::string& title, int binsX, double iminX, double imaxX, int binsY, double iminY, double imaxY, double lowerValue, double upperValue);
78 std::pair<DataObject*,AIDA::IProfile2D*> createProf2D(const std::string& title, const Edges& eX, const Edges& eY, double lowerValue, double upperValue);
79 }
80 #endif // GAUDIPI_GAUDIPI_H