Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  master (01b473db)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
HistoXML.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2025 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 // Include files
14 // ============================================================================
15 // STD & STL
16 // ============================================================================
17 #include <iosfwd>
18 #include <string>
19 // ============================================================================
20 // GaudiKernel
21 // ============================================================================
22 #include <GaudiKernel/StatusCode.h>
23 // ============================================================================
24 // Forward declarations
25 // ============================================================================
26 // AIDA
27 // ============================================================================
28 namespace AIDA {
29  class IHistogram1D;
30  class IHistogram2D;
31  class IHistogram3D;
32  class IProfile1D;
33  class IProfile2D;
34 } // namespace AIDA
35 // ============================================================================
36 // ROOT
37 // ============================================================================
38 class TH1D; // ROOT
39 class TH2D; // ROOT
40 class TH3D; // ROOT
41 class TH1F; // ROOT
42 class TH2F; // ROOT
43 class TH3F; // ROOT
44 class TProfile; // ROOT
45 class TProfile2D; // ROOT
46 // ============================================================================
47 namespace Gaudi {
48  // ===========================================================================
49  namespace Utils {
50  // =========================================================================
51  namespace Histos {
52  // =======================================================================
59  GAUDI_API std::ostream& toXml( const TH1D& histo, std::ostream& stream );
60  // ======================================================================
67  GAUDI_API std::ostream& toXml( const TH2D& histo, std::ostream& stream );
68  // ======================================================================
75  GAUDI_API std::ostream& toXml( const TH3D& histo, std::ostream& stream );
76  // ======================================================================
83  GAUDI_API std::ostream& toXml( const TProfile& histo, std::ostream& stream );
84  // ======================================================================
91  GAUDI_API std::ostream& toXml( const TProfile2D& histo, std::ostream& stream );
92  // ======================================================================
97  GAUDI_API std::ostream& toXml( const AIDA::IHistogram1D& histo, std::ostream& stream );
98  // ======================================================================
103  GAUDI_API std::ostream& toXml( const AIDA::IHistogram2D& histo, std::ostream& stream );
104  // ======================================================================
109  GAUDI_API std::ostream& toXml( const AIDA::IHistogram3D& histo, std::ostream& stream );
110  // ======================================================================
115  GAUDI_API std::ostream& toXml( const AIDA::IProfile1D& histo, std::ostream& stream );
116  // =======================================================================
123  GAUDI_API std::ostream& toXml( const TH1F& histo, std::ostream& stream );
124  // ======================================================================
131  GAUDI_API std::ostream& toXml( const TH2F& histo, std::ostream& stream );
132  // ======================================================================
139  GAUDI_API std::ostream& toXml( const TH3F& histo, std::ostream& stream );
140  // ======================================================================
145  GAUDI_API std::ostream& toXml( const AIDA::IProfile2D& histo, std::ostream& stream );
146  // ======================================================================
156  GAUDI_API StatusCode fromXml( TH1D& result, std::string_view input );
157  // ======================================================================
167  GAUDI_API StatusCode fromXml( TH2D& result, std::string_view input );
168  // ======================================================================
178  GAUDI_API StatusCode fromXml( TH3D& result, std::string_view input );
179  // ======================================================================
189  GAUDI_API StatusCode fromXml( TProfile& result, std::string_view input );
190  // ======================================================================
200  GAUDI_API StatusCode fromXml( TProfile2D& result, std::string_view input );
201  // ======================================================================
211  GAUDI_API StatusCode fromXml( TH1F& result, std::string_view input );
212  // ======================================================================
222  GAUDI_API StatusCode fromXml( TH2F& result, std::string_view input );
223  // ======================================================================
233  GAUDI_API StatusCode fromXml( TH3F& result, std::string_view input );
234  // ======================================================================
244  GAUDI_API StatusCode fromXml( TH1D*& result, std::string_view input );
245  // ======================================================================
255  GAUDI_API StatusCode fromXml( TH2D*& result, std::string_view input );
256  // ======================================================================
266  GAUDI_API StatusCode fromXml( TH3D*& result, std::string_view input );
267  // ======================================================================
277  GAUDI_API StatusCode fromXml( TProfile*& result, std::string_view input );
278  // ======================================================================
288  GAUDI_API StatusCode fromXml( TProfile2D*& result, std::string_view input );
289  // ======================================================================
299  GAUDI_API StatusCode fromXml( AIDA::IHistogram1D& result, std::string_view input );
300  // ======================================================================
310  GAUDI_API StatusCode fromXml( AIDA::IHistogram2D& result, std::string_view input );
311  // ======================================================================
321  GAUDI_API StatusCode fromXml( AIDA::IHistogram3D& result, std::string_view input );
322  // ======================================================================
332  GAUDI_API StatusCode fromXml( AIDA::IProfile1D& result, std::string_view input );
333  // ======================================================================
343  GAUDI_API StatusCode fromXml( AIDA::IProfile2D& result, std::string_view input );
344  // ======================================================================
345  } // namespace Histos
346  // ========================================================================
347  } // namespace Utils
348  // ==========================================================================
349 } // end of namespace Gaudi
350 // ============================================================================
351 // The END
352 // ============================================================================
AIDA
Definition: Annotation.h:21
Write.stream
stream
Definition: Write.py:32
StatusCode.h
StatusCode
Definition: StatusCode.h:64
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition: __init__.py:1
Gaudi::Utils::Histos::fromXml
GAUDI_API StatusCode fromXml(TH1D &result, std::string_view input)
parse the histogram from standard ROOT XML
Definition: HistoXML.cpp:199
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:49
Gaudi::Utils::Histos::toXml
GAUDI_API std::ostream & toXml(const TH1D &histo, std::ostream &stream)
stream the ROOT histogram into output stream as XML
Definition: HistoXML.cpp:76