| The Gaudi Framework v27r1

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

- File List
- File Members

GaudiPI.h
Go to the documentation of this file.
1 #ifndef GAUDISVC_GAUDIPI_H
2 #define GAUDISVC_GAUDIPI_H
3 #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 = nullptr;
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
Gaudi::slice1DY
std::pair< DataObject *, AIDA::IHistogram1D * > slice1DY(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D slice from 2D histogram.
Gaudi::getRepresentation
T * getRepresentation(const Q &hist)
Definition: GaudiPI.h:21
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
Gaudi::createH1D
std::pair< DataObject *, AIDA::IHistogram1D * > createH1D(const AIDA::IHistogram1D &hist)
Copy constructor.
AIDA_visibility_hack.h
Gaudi::project1DY
std::pair< DataObject *, AIDA::IHistogram1D * > project1DY(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D projection in Y from 2D histogram.
Gaudi::Edges
std::vector< double > Edges
Definition: GaudiPI.h:19
Gaudi::createProf2D
std::pair< DataObject *, AIDA::IProfile2D * > createProf2D(const AIDA::IProfile2D &hist)
Copy constructor.
std::string
STL class.
Gaudi::project1DX
std::pair< DataObject *, AIDA::IHistogram1D * > project1DX(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D projection in X from 2D histogram.
HistogramBase.h
HiveAlgSequencer.h
tuple h
Definition: HiveAlgSequencer.py:24
Gaudi::createH2D
std::pair< DataObject *, AIDA::IHistogram2D * > createH2D(const AIDA::IHistogram2D &hist)
Copy constructor.
Gaudi::slice1DX
std::pair< DataObject *, AIDA::IHistogram1D * > slice1DX(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D slice from 2D histogram.
ana.opt
string opt
print 'Summary: %32s [s] d d steps'%(summary.protocol,summary.type,summary.nevt,len(summary.data),)
Definition: ana.py:116
Gaudi::profile1DX
std::pair< DataObject *, AIDA::IProfile1D * > profile1DX(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D profile in X from 2D histogram.
std::pair
Gaudi::profile1DY
std::pair< DataObject *, AIDA::IProfile1D * > profile1DY(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D profile in Y from 2D histogram.
Gaudi::HistogramBase
Common base class for all histograms Use is solely functional to minimize dynamic_casts inside Histog...
Definition: HistogramBase.h:22
std::vector< double >
Gaudi::HistogramBase::representation
virtual TObject * representation() const =0
ROOT object implementation.
Gaudi::createH3D
std::pair< DataObject *, AIDA::IHistogram3D * > createH3D(const AIDA::IHistogram3D &hist)
Copy constructor.
Gaudi::createProf1D
std::pair< DataObject *, AIDA::IProfile1D * > createProf1D(const AIDA::IProfile1D &hist)
Copy constructor.
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
Gaudi
Helper functions to set/get the application return code.
Definition: __init__.py:1