The Gaudi Framework  master (42b00024)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GaudiPI.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDISVC_GAUDIPI_H
12 #define GAUDISVC_GAUDIPI_H
13 
14 #include <AIDA/IHistogram1D.h>
15 #include <AIDA/IHistogram2D.h>
16 #include <AIDA/IHistogram3D.h>
17 #include <AIDA/IProfile1D.h>
18 #include <AIDA/IProfile2D.h>
21 #include <utility>
22 #include <vector>
23 
24 class DataObject;
25 class TH2D;
26 
27 namespace Gaudi {
28  typedef std::vector<double> Edges;
29 
31  std::pair<DataObject*, AIDA::IHistogram1D*> createH1D( ISvcLocator* svcLocator, const std::string& path,
32  const AIDA::IHistogram1D& hist );
34  std::pair<DataObject*, AIDA::IHistogram1D*> createH1D( ISvcLocator* svcLocator, const std::string& path,
35  const std::string& title, int nBins = 10,
36  double lowerEdge = 0., double upperEdge = 1. );
38  std::pair<DataObject*, AIDA::IHistogram1D*> createH1D( ISvcLocator* svcLocator, const std::string& path,
39  const std::string& title, const Edges& e );
40 
42  std::pair<DataObject*, AIDA::IHistogram2D*> createH2D( ISvcLocator* svcLocator, const std::string& path,
43  const AIDA::IHistogram2D& hist );
45  std::pair<DataObject*, AIDA::IHistogram2D*> createH2D( ISvcLocator* svcLocator, const std::string& path, TH2D* rep );
47  std::pair<DataObject*, AIDA::IHistogram2D*> createH2D( ISvcLocator* svcLocator, const std::string& path,
48  const std::string& title, int binsX, double iminX,
49  double imaxX, int binsY, double iminY, double imaxY );
51  std::pair<DataObject*, AIDA::IHistogram2D*> createH2D( ISvcLocator* svcLocator, const std::string& path,
52  const std::string& title, const Edges& eX, const Edges& eY );
54  std::pair<DataObject*, AIDA::IHistogram1D*> slice1DX( const std::string& name, const AIDA::IHistogram2D& h,
55  int firstbin, int lastbin );
57  std::pair<DataObject*, AIDA::IProfile1D*> profile1DX( const std::string& name, const AIDA::IHistogram2D& h,
58  int firstbin, int lastbin );
60  std::pair<DataObject*, AIDA::IHistogram1D*> project1DX( const std::string& name, const AIDA::IHistogram2D& h,
61  int firstbin, int lastbin );
63  std::pair<DataObject*, AIDA::IHistogram1D*> slice1DY( const std::string& name, const AIDA::IHistogram2D& h,
64  int firstbin, int lastbin );
66  std::pair<DataObject*, AIDA::IProfile1D*> profile1DY( const std::string& name, const AIDA::IHistogram2D& h,
67  int firstbin, int lastbin );
69  std::pair<DataObject*, AIDA::IHistogram1D*> project1DY( const std::string& name, const AIDA::IHistogram2D& h,
70  int firstbin, int lastbin );
71 
73  std::pair<DataObject*, AIDA::IHistogram3D*> createH3D( ISvcLocator* svcLocator, const std::string& path,
74  const AIDA::IHistogram3D& hist );
76  std::pair<DataObject*, AIDA::IHistogram3D*> createH3D( ISvcLocator* svcLocator, const std::string& path,
77  const std::string& title, int nBinsX, double xlow, double xup,
78  int nBinsY, double ylow, double yup, int nBinsZ, double zlow,
79  double zup );
81  std::pair<DataObject*, AIDA::IHistogram3D*> createH3D( ISvcLocator* svcLocator, const std::string& path,
82  const std::string& title, const Edges& eX, const Edges& eY,
83  const Edges& eZ );
84 
86  std::pair<DataObject*, AIDA::IProfile1D*> createProf1D( ISvcLocator* svcLocator, const std::string& path,
87  const AIDA::IProfile1D& hist );
89  std::pair<DataObject*, AIDA::IProfile1D*> createProf1D( ISvcLocator* svcLocator, const std::string& path,
90  const std::string& title, int nBins, double xlow, double xup,
91  double ylow, double yup, const std::string& opt = "" );
93  std::pair<DataObject*, AIDA::IProfile1D*> createProf1D( ISvcLocator* svcLocator, const std::string& path,
94  const std::string& title, const Edges& e, double ylow,
95  double yup, const std::string& opt = "" );
96 
98  std::pair<DataObject*, AIDA::IProfile2D*> createProf2D( ISvcLocator* svcLocator, const std::string& path,
99  const AIDA::IProfile2D& hist );
101  std::pair<DataObject*, AIDA::IProfile2D*> createProf2D( ISvcLocator* svcLocator, const std::string& path,
102  const std::string& title, int binsX, double iminX,
103  double imaxX, int binsY, double iminY, double imaxY,
104  double lowerValue, double upperValue );
106  std::pair<DataObject*, AIDA::IProfile2D*> createProf2D( ISvcLocator* svcLocator, const std::string& path,
107  const std::string& title, const Edges& eX, const Edges& eY,
108  double lowerValue, double upperValue );
109 } // namespace Gaudi
110 #endif // GAUDIPI_GAUDIPI_H
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.
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.
AtlasMCRecoFullPrecedenceDump.path
path
Definition: AtlasMCRecoFullPrecedenceDump.py:49
ISvcLocator
Definition: ISvcLocator.h:46
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::svcLocator
GAUDI_API ISvcLocator * svcLocator()
AlgSequencer.h
h
Definition: AlgSequencer.py:31
Gaudi::createH3D
std::pair< DataObject *, AIDA::IHistogram3D * > createH3D(ISvcLocator *svcLocator, const std::string &path, const AIDA::IHistogram3D &hist)
Copy constructor.
HistogramBase.h
Gaudi::createProf1D
std::pair< DataObject *, AIDA::IProfile1D * > createProf1D(ISvcLocator *svcLocator, const std::string &path, const AIDA::IProfile1D &hist)
Copy constructor.
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition: __init__.py:1
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77
Gaudi::Edges
std::vector< double > Edges
Definition: GaudiPI.h:28
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.
DataObject
Definition: DataObject.h:37
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.
ISvcLocator.h
Gaudi::createH1D
std::pair< DataObject *, AIDA::IHistogram1D * > createH1D(ISvcLocator *svcLocator, const std::string &path, const AIDA::IHistogram1D &hist)
Copy constructor.
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.
Gaudi::createH2D
std::pair< DataObject *, AIDA::IHistogram2D * > createH2D(ISvcLocator *svcLocator, const std::string &path, const AIDA::IHistogram2D &hist)
Copy constructor.
Gaudi::createProf2D
std::pair< DataObject *, AIDA::IProfile2D * > createProf2D(ISvcLocator *svcLocator, const std::string &path, const AIDA::IProfile2D &hist)
Copy constructor.