Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ConvertToTH3.hxx
Go to the documentation of this file.
1/// \file
2/// \warning This is part of the %ROOT 7 prototype! It will change without notice. It might trigger earthquakes.
3/// Feedback is welcome!
4
5#ifndef ROOT_Hist_ConvertToTH3
6#define ROOT_Hist_ConvertToTH3
7
9#include <ROOT/RHist.hxx>
10#include <ROOT/RHistEngine.hxx>
11
12class TH3C;
13class TH3S;
14class TH3I;
15class TH3L;
16class TH3F;
17class TH3D;
18
19#include <memory>
20
21namespace ROOT {
22namespace Experimental {
23namespace Hist {
24
25/// Convert a three-dimensional histogram to TH3C.
26///
27/// \copydetails ConvertToTH3I(const RHistEngine<int> &engine)
28std::unique_ptr<TH3C> ConvertToTH3C(const RHistEngine<char> &engine);
29
30/// Convert a three-dimensional histogram to TH3S.
31///
32/// \copydetails ConvertToTH3I(const RHistEngine<int> &engine)
33std::unique_ptr<TH3S> ConvertToTH3S(const RHistEngine<short> &engine);
34
35/// Convert a three-dimensional histogram to TH3I.
36///
37/// As RHistEngine does not have global statistics, the number of entries and the total sum of weights will be unset.
38///
39/// Throws an exception if the histogram has more than one dimension.
40///
41/// \param[in] engine the RHistEngine to convert
42/// \return the converted TH3
43std::unique_ptr<TH3I> ConvertToTH3I(const RHistEngine<int> &engine);
44
45/// Convert a three-dimensional histogram to TH3L.
46///
47/// \copydetails ConvertToTH3I(const RHistEngine<int> &engine)
48std::unique_ptr<TH3L> ConvertToTH3L(const RHistEngine<long> &engine);
49
50/// Convert a three-dimensional histogram to TH3L.
51///
52/// \copydetails ConvertToTH3I(const RHistEngine<int> &engine)
53std::unique_ptr<TH3L> ConvertToTH3L(const RHistEngine<long long> &engine);
54
55/// Convert a three-dimensional histogram to TH3F.
56///
57/// \copydetails ConvertToTH3I(const RHistEngine<int> &engine)
58std::unique_ptr<TH3F> ConvertToTH3F(const RHistEngine<float> &engine);
59
60/// Convert a three-dimensional histogram to TH3D.
61///
62/// \copydetails ConvertToTH3I(const RHistEngine<int> &engine)
63std::unique_ptr<TH3D> ConvertToTH3D(const RHistEngine<double> &engine);
64
65/// Convert a three-dimensional histogram to TH3D.
66///
67/// \copydetails ConvertToTH3I(const RHistEngine<int> &engine)
68std::unique_ptr<TH3D> ConvertToTH3D(const RHistEngine<RBinWithError> &engine);
69
70/// Convert a three-dimensional histogram to TH3C.
71///
72/// \copydetails ConvertToTH3I(const RHist<int> &hist)
73std::unique_ptr<TH3C> ConvertToTH3C(const RHist<char> &hist);
74
75/// Convert a three-dimensional histogram to TH3S.
76///
77/// \copydetails ConvertToTH3I(const RHist<int> &hist)
78std::unique_ptr<TH3S> ConvertToTH3S(const RHist<short> &hist);
79
80/// Convert a three-dimensional histogram to TH3I.
81///
82/// If the RHistStats are tainted, for example after setting bin contents, the number of entries and the total sum of
83/// weights will be unset.
84///
85/// Throws an exception if the histogram has more than one dimension.
86///
87/// \param[in] hist the RHist to convert
88/// \return the converted TH3
89std::unique_ptr<TH3I> ConvertToTH3I(const RHist<int> &hist);
90
91/// Convert a three-dimensional histogram to TH3L.
92///
93/// \copydetails ConvertToTH3I(const RHist<int> &hist)
94std::unique_ptr<TH3L> ConvertToTH3L(const RHist<long> &hist);
95
96/// Convert a three-dimensional histogram to TH3L.
97///
98/// \copydetails ConvertToTH3I(const RHist<int> &hist)
99std::unique_ptr<TH3L> ConvertToTH3L(const RHist<long long> &hist);
100
101/// Convert a three-dimensional histogram to TH3F.
102///
103/// \copydetails ConvertToTH3I(const RHist<int> &hist)
104std::unique_ptr<TH3F> ConvertToTH3F(const RHist<float> &hist);
105
106/// Convert a three-dimensional histogram to TH3D.
107///
108/// \copydetails ConvertToTH3I(const RHist<int> &hist)
109std::unique_ptr<TH3D> ConvertToTH3D(const RHist<double> &hist);
110
111/// Convert a three-dimensional histogram to TH3D.
112///
113/// \copydetails ConvertToTH3I(const RHist<int> &hist)
114std::unique_ptr<TH3D> ConvertToTH3D(const RHist<RBinWithError> &hist);
115
116} // namespace Hist
117} // namespace Experimental
118} // namespace ROOT
119
120#endif
3-D histogram with a byte per channel (see TH1 documentation)
Definition TH3.h:176
3-D histogram with a double per channel (see TH1 documentation)
Definition TH3.h:424
3-D histogram with a float per channel (see TH1 documentation)
Definition TH3.h:369
3-D histogram with an int per channel (see TH1 documentation)
Definition TH3.h:273
3-D histogram with a long64 per channel (see TH1 documentation)
Definition TH3.h:322
3-D histogram with a short per channel (see TH1 documentation)
Definition TH3.h:224
std::unique_ptr< TH3S > ConvertToTH3S(const RHistEngine< short > &engine)
Convert a three-dimensional histogram to TH3S.
std::unique_ptr< TH3C > ConvertToTH3C(const RHistEngine< char > &engine)
Convert a three-dimensional histogram to TH3C.
std::unique_ptr< TH3F > ConvertToTH3F(const RHistEngine< float > &engine)
Convert a three-dimensional histogram to TH3F.
std::unique_ptr< TH3I > ConvertToTH3I(const RHistEngine< int > &engine)
Convert a three-dimensional histogram to TH3I.
std::unique_ptr< TH3L > ConvertToTH3L(const RHistEngine< long > &engine)
Convert a three-dimensional histogram to TH3L.
std::unique_ptr< TH3D > ConvertToTH3D(const RHistEngine< double > &engine)
Convert a three-dimensional histogram to TH3D.