| # Gaudi Framework, version v21r6 |

Home |  | Generated: 11 Nov 2009

# GaudiPI.h

Go to the documentation of this file.

    00001 #ifndef GAUDISVC_GAUDIPI_H
    00002 #define GAUDISVC_GAUDIPI_H
    00004 #include "AIDA_visibility_hack.h"
    00005
    00006 #include <vector>
    00007 #include <utility>
    00008 #include "AIDA/IHistogram1D.h"
    00009 #include "AIDA/IHistogram2D.h"
    00010 #include "AIDA/IHistogram3D.h"
    00011 #include "AIDA/IProfile1D.h"
    00012 #include "AIDA/IProfile2D.h"
    00013 #include "GaudiKernel/HistogramBase.h"
    00014
    00015 class DataObject;
    00016 class TH2D;
    00017
    00018 namespace Gaudi {
    00019   typedef std::vector<double> Edges;
    00020
    00021   template <class Q, class T> T* getRepresentation(const Q& hist)  {
    00022     T* result = 0;
    00023     const HistogramBase *p = dynamic_cast<const HistogramBase*>(&hist);
    00024     if ( p )  {
    00025       result = dynamic_cast<T*>(p->representation());
    00026     }
    00027     return result;
    00028   }
    00030   std::pair<DataObject*,AIDA::IHistogram1D*> createH1D(const AIDA::IHistogram1D& hist);
    00032   std::pair<DataObject*,AIDA::IHistogram1D*> createH1D(const std::string& title, int nBins=10, double lowerEdge=0., double upperEdge=1.);
    00034   std::pair<DataObject*,AIDA::IHistogram1D*> createH1D(const std::string& title, const Edges& e);
    00035
    00037   std::pair<DataObject*,AIDA::IHistogram2D*> createH2D(const AIDA::IHistogram2D& hist);
    00039   std::pair<DataObject*,AIDA::IHistogram2D*> createH2D(TH2D* rep);
    00041   std::pair<DataObject*,AIDA::IHistogram2D*> createH2D(const std::string& title, int binsX, double iminX, double imaxX, int binsY, double iminY, double imaxY);
    00043   std::pair<DataObject*,AIDA::IHistogram2D*> createH2D(const std::string& title, const Edges& eX, const Edges& eY);
    00045   std::pair<DataObject*,AIDA::IHistogram1D*> slice1DX(const std::string& name, const AIDA::IHistogram2D& h, int firstbin, int lastbin);
    00047   std::pair<DataObject*,AIDA::IProfile1D*>   profile1DX(const std::string& name, const AIDA::IHistogram2D& h, int firstbin, int lastbin);
    00049   std::pair<DataObject*,AIDA::IHistogram1D*> project1DX(const std::string& name, const AIDA::IHistogram2D& h, int firstbin, int lastbin);
    00051   std::pair<DataObject*,AIDA::IHistogram1D*> slice1DY  (const std::string& name, const AIDA::IHistogram2D& h, int firstbin, int lastbin);
    00053   std::pair<DataObject*,AIDA::IProfile1D*>   profile1DY(const std::string& name, const AIDA::IHistogram2D& h, int firstbin, int lastbin);
    00055   std::pair<DataObject*,AIDA::IHistogram1D*> project1DY(const std::string& name, const AIDA::IHistogram2D& h, int firstbin, int lastbin);
    00056
    00058   std::pair<DataObject*,AIDA::IHistogram3D*> createH3D(const AIDA::IHistogram3D& hist);
    00060   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);
    00062   std::pair<DataObject*,AIDA::IHistogram3D*> createH3D(const std::string& title, const Edges  & eX,const Edges& eY, const Edges& eZ);
    00063
    00065   std::pair<DataObject*,AIDA::IProfile1D*> createProf1D(const AIDA::IProfile1D& hist);
    00067   std::pair<DataObject*,AIDA::IProfile1D*> createProf1D
    00068   (const std::string& title, int nBins, double xlow, double xup, double ylow, double yup, const std::string& opt="" );
    00070   std::pair<DataObject*,AIDA::IProfile1D*> createProf1D
    00071   (const std::string& title, const Edges& e, double ylow, double yup, const std::string& opt="");
    00072
    00074   std::pair<DataObject*,AIDA::IProfile2D*> createProf2D(const AIDA::IProfile2D& hist);
    00076   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);
    00078   std::pair<DataObject*,AIDA::IProfile2D*> createProf2D(const std::string& title, const Edges& eX, const Edges& eY, double lowerValue, double upperValue);
    00079 }
    00080 #endif // GAUDIPI_GAUDIPI_H