The Gaudi Framework  master (53935a5b)
Loading...
Searching...
No Matches
GaudiPI.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2026 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#pragma once
12
13// Framework includes
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
22// STL includes
23#include <utility>
24#include <vector>
25
26class DataObject;
27class TH2D;
28
29namespace Gaudi {
30 using Edges = std::vector<double>;
31
33 std::pair<DataObject*, AIDA::IHistogram1D*> createH1D( ISvcLocator* svcLocator, const std::string& path,
34 const AIDA::IHistogram1D& hist );
36 std::pair<DataObject*, AIDA::IHistogram1D*> createH1D( ISvcLocator* svcLocator, const std::string& path,
37 const std::string& title, int nBins = 10,
38 double lowerEdge = 0., double upperEdge = 1. );
40 std::pair<DataObject*, AIDA::IHistogram1D*> createH1D( ISvcLocator* svcLocator, const std::string& path,
41 const std::string& title, const Edges& e );
42
44 std::pair<DataObject*, AIDA::IHistogram2D*> createH2D( ISvcLocator* svcLocator, const std::string& path,
45 const AIDA::IHistogram2D& hist );
47 std::pair<DataObject*, AIDA::IHistogram2D*> createH2D( ISvcLocator* svcLocator, const std::string& path, TH2D* rep );
49 std::pair<DataObject*, AIDA::IHistogram2D*> createH2D( ISvcLocator* svcLocator, const std::string& path,
50 const std::string& title, int binsX, double iminX,
51 double imaxX, int binsY, double iminY, double imaxY );
53 std::pair<DataObject*, AIDA::IHistogram2D*> createH2D( ISvcLocator* svcLocator, const std::string& path,
54 const std::string& title, const Edges& eX, const Edges& eY );
56 std::pair<DataObject*, AIDA::IHistogram1D*> slice1DX( const std::string& name, const AIDA::IHistogram2D& h,
57 int firstbin, int lastbin );
59 std::pair<DataObject*, AIDA::IProfile1D*> profile1DX( const std::string& name, const AIDA::IHistogram2D& h,
60 int firstbin, int lastbin );
62 std::pair<DataObject*, AIDA::IHistogram1D*> project1DX( const std::string& name, const AIDA::IHistogram2D& h,
63 int firstbin, int lastbin );
65 std::pair<DataObject*, AIDA::IHistogram1D*> slice1DY( const std::string& name, const AIDA::IHistogram2D& h,
66 int firstbin, int lastbin );
68 std::pair<DataObject*, AIDA::IProfile1D*> profile1DY( const std::string& name, const AIDA::IHistogram2D& h,
69 int firstbin, int lastbin );
71 std::pair<DataObject*, AIDA::IHistogram1D*> project1DY( const std::string& name, const AIDA::IHistogram2D& h,
72 int firstbin, int lastbin );
73
75 std::pair<DataObject*, AIDA::IHistogram3D*> createH3D( ISvcLocator* svcLocator, const std::string& path,
76 const AIDA::IHistogram3D& hist );
78 std::pair<DataObject*, AIDA::IHistogram3D*> createH3D( ISvcLocator* svcLocator, const std::string& path,
79 const std::string& title, int nBinsX, double xlow, double xup,
80 int nBinsY, double ylow, double yup, int nBinsZ, double zlow,
81 double zup );
83 std::pair<DataObject*, AIDA::IHistogram3D*> createH3D( ISvcLocator* svcLocator, const std::string& path,
84 const std::string& title, const Edges& eX, const Edges& eY,
85 const Edges& eZ );
86
88 std::pair<DataObject*, AIDA::IProfile1D*> createProf1D( ISvcLocator* svcLocator, const std::string& path,
89 const AIDA::IProfile1D& hist );
91 std::pair<DataObject*, AIDA::IProfile1D*> createProf1D( ISvcLocator* svcLocator, const std::string& path,
92 const std::string& title, int nBins, double xlow, double xup,
93 double ylow, double yup, const std::string& opt = "" );
95 std::pair<DataObject*, AIDA::IProfile1D*> createProf1D( ISvcLocator* svcLocator, const std::string& path,
96 const std::string& title, const Edges& e, double ylow,
97 double yup, const std::string& opt = "" );
98
100 std::pair<DataObject*, AIDA::IProfile2D*> createProf2D( ISvcLocator* svcLocator, const std::string& path,
101 const AIDA::IProfile2D& hist );
103 std::pair<DataObject*, AIDA::IProfile2D*> createProf2D( ISvcLocator* svcLocator, const std::string& path,
104 const std::string& title, int binsX, double iminX,
105 double imaxX, int binsY, double iminY, double imaxY,
106 double lowerValue, double upperValue );
108 std::pair<DataObject*, AIDA::IProfile2D*> createProf2D( ISvcLocator* svcLocator, const std::string& path,
109 const std::string& title, const Edges& eX, const Edges& eY,
110 double lowerValue, double upperValue );
111} // namespace Gaudi
A DataObject is the base class of any identifiable object on any data store.
Definition DataObject.h:37
std::vector< double > Edges
Definition GaudiPI.h:30
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition ISvcLocator.h:42
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1
GAUDI_API ISvcLocator * svcLocator()
std::pair< DataObject *, AIDA::IHistogram2D * > createH2D(ISvcLocator *svcLocator, const std::string &path, const AIDA::IHistogram2D &hist)
Copy constructor.
std::pair< DataObject *, AIDA::IHistogram1D * > slice1DX(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D slice from 2D histogram.
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.
std::pair< DataObject *, AIDA::IHistogram1D * > slice1DY(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D slice from 2D histogram.
std::pair< DataObject *, AIDA::IProfile2D * > createProf2D(ISvcLocator *svcLocator, const std::string &path, const AIDA::IProfile2D &hist)
Copy constructor.
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.
std::pair< DataObject *, AIDA::IProfile1D * > createProf1D(ISvcLocator *svcLocator, const std::string &path, const AIDA::IProfile1D &hist)
Copy constructor.
std::pair< DataObject *, AIDA::IHistogram3D * > createH3D(ISvcLocator *svcLocator, const std::string &path, const AIDA::IHistogram3D &hist)
Copy constructor.
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< DataObject *, AIDA::IProfile1D * > profile1DY(const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
Create 1D profile in Y from 2D histogram.
std::pair< DataObject *, AIDA::IHistogram1D * > createH1D(ISvcLocator *svcLocator, const std::string &path, const AIDA::IHistogram1D &hist)
Copy constructor.