The Gaudi Framework  v36r0 (4abb4d13)
Histo2String.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 GAUDIUTILS_HISTO2STRING_H
12 #define GAUDIUTILS_HISTO2STRING_H 1
13 // ============================================================================
14 // Include files
15 // ============================================================================
16 // STD & STL
17 // ============================================================================
18 #include <iosfwd>
19 #include <string>
20 // ============================================================================
21 // GaudiKernel
22 // ============================================================================
23 #include "GaudiKernel/StatusCode.h"
24 // ============================================================================
25 // forward declarations
26 // ============================================================================
27 // Forward declarations
28 // ============================================================================
29 // AIDA
30 // ============================================================================
31 namespace AIDA {
32  class IHistogram1D;
33  class IHistogram2D;
34 } // namespace AIDA
35 // ============================================================================
36 // ROOT
37 // ============================================================================
38 class TH1D; // ROOT
39 class TH2D; // ROOT
40 class TH1F; // ROOT
41 class TH2F; // ROOT
42 // ============================================================================
43 namespace Gaudi {
44  // ===========================================================================
45  namespace Utils {
46  // =========================================================================
55  GAUDI_API std::ostream& toStream( const TH1D& histo, std::ostream& stream, const bool asXML = false );
56  // =========================================================================
65  GAUDI_API std::ostream& toStream( const TH2D& histo, std::ostream& stream, const bool asXML = false );
66  // =========================================================================
75  GAUDI_API std::ostream& toStream( const TH1F& histo, std::ostream& stream, const bool asXML = false );
76  // =========================================================================
85  GAUDI_API std::ostream& toStream( const TH2F& histo, std::ostream& stream, const bool asXML = false );
86  // ========================================================================
95  GAUDI_API std::ostream& toStream( const AIDA::IHistogram1D& histo, std::ostream& stream, const bool asXML = false );
96  // ========================================================================
105  GAUDI_API std::ostream& toStream( const AIDA::IHistogram2D& histo, std::ostream& stream, const bool asXML = false );
106  // ========================================================================
114  GAUDI_API std::string toString( const TH1D& histo, const bool asXML = false );
115  // ========================================================================
123  GAUDI_API std::string toString( const TH2D& histo, const bool asXML = false );
124  // ========================================================================
132  GAUDI_API std::string toString( const TH1F& histo, const bool asXML = false );
133  // ========================================================================
141  GAUDI_API std::string toString( const TH2F& histo, const bool asXML = false );
142  // ========================================================================
150  GAUDI_API std::string toString( const AIDA::IHistogram1D& histo, const bool asXML = false );
151  // ========================================================================
159  GAUDI_API std::string toString( const AIDA::IHistogram2D& histo, const bool asXML = false );
160  // ========================================================================
168  GAUDI_API std::string toString( const AIDA::IHistogram1D* histo );
169  // ========================================================================
177  GAUDI_API std::string toString( AIDA::IHistogram1D* histo );
178  // ========================================================================
186  GAUDI_API std::string toString( const TH1D* histo );
187  // ========================================================================
196  // ========================================================================
204  GAUDI_API std::string toString( const TH2D* histo );
205  // ========================================================================
214  // ========================================================================
215  } // namespace Utils
216  // ==========================================================================
217 } // end of namespace Gaudi
218 // ============================================================================
219 // The END
220 // ============================================================================
221 #endif // GAUDIUTILS_HISTO2STRING_H
AIDA
GaudiKernel.
Definition: Fill.h:20
Write.stream
stream
Definition: Write.py:31
std::string
STL class.
HistoEx.histo
histo
Definition: HistoEx.py:103
StatusCode.h
std::ostream
STL class.
Gaudi
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:353
Gaudi::Utils::toStream
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:299
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:81