Go to the documentation of this file.00001 #ifndef GAUDIUTILS_HISTOSTRINGS_H
00002 #define GAUDIUTILS_HISTOSTRINGS_H 1
00003
00004
00005
00006
00007
00008 #include <string>
00009 #include <iosfwd>
00010
00011
00012
00013 #include "GaudiKernel/StatusCode.h"
00014
00015
00016
00017
00018
00019
00020
00021 namespace AIDA
00022 {
00023 class IHistogram1D ;
00024 class IHistogram2D ;
00025 class IHistogram3D ;
00026 class IProfile1D ;
00027 class IProfile2D ;
00028 }
00029
00030
00031
00032 class TH1D ;
00033 class TH2D ;
00034 class TH3D ;
00035 class TProfile ;
00036 class TProfile2D ;
00037
00038 namespace Gaudi
00039 {
00040
00041 namespace Utils
00042 {
00043
00044 namespace Histos
00045 {
00046
00052 class GAUDI_API HistoStrings
00053 {
00054
00055 public:
00056
00064 static std::string toString
00065 ( const TH1D& histo ,
00066 const bool asXML = false ) ;
00067
00075 static std::string toString
00076 ( const TH2D& histo ,
00077 const bool asXML = false ) ;
00078
00086 static std::string toString
00087 ( const AIDA::IHistogram1D& histo ,
00088 const bool asXML = false ) ;
00089
00097 static std::string toString
00098 ( const AIDA::IHistogram2D& histo ,
00099 const bool asXML = false ) ;
00100
00106 static StatusCode fromString
00107 ( TH1D& result , const std::string& input ) ;
00108
00114 static StatusCode fromString
00115 ( AIDA::IHistogram1D& result , const std::string& input ) ;
00116
00122 static StatusCode fromString
00123 ( TH2D& result , const std::string& input ) ;
00124
00130 static StatusCode fromString
00131 ( AIDA::IHistogram2D& result , const std::string& input ) ;
00132
00133 static std::string toXml ( const TH1D& histo ) ;
00134 static std::string toXml ( const TH2D& histo ) ;
00135 static std::string toXml ( const TH3D& histo ) ;
00136 static std::string toXml ( const TProfile& histo ) ;
00137 static std::string toXml ( const TProfile2D& histo ) ;
00138
00139 static std::string toXml ( const AIDA::IHistogram1D& histo ) ;
00140 static std::string toXml ( const AIDA::IHistogram2D& histo ) ;
00141 static std::string toXml ( const AIDA::IHistogram3D& histo ) ;
00142 static std::string toXml ( const AIDA::IProfile1D& histo ) ;
00143 static std::string toXml ( const AIDA::IProfile2D& histo ) ;
00144
00145 static StatusCode fromXml
00146 ( TH1D& result , const std::string& input ) ;
00147 static StatusCode fromXml
00148 ( TH2D& result , const std::string& input ) ;
00149 static StatusCode fromXml
00150 ( TH3D& result , const std::string& input ) ;
00151 static StatusCode fromXml
00152 ( TProfile& result , const std::string& input ) ;
00153 static StatusCode fromXml
00154 ( TProfile2D& result , const std::string& input ) ;
00155
00156 static StatusCode fromXml
00157 ( AIDA::IHistogram1D& result , const std::string& input ) ;
00158 static StatusCode fromXml
00159 ( AIDA::IHistogram2D& result , const std::string& input ) ;
00160 static StatusCode fromXml
00161 ( AIDA::IHistogram3D& result , const std::string& input ) ;
00162 static StatusCode fromXml
00163 ( AIDA::IProfile1D& result , const std::string& input ) ;
00164 static StatusCode fromXml
00165 ( AIDA::IProfile2D& result , const std::string& input ) ;
00166
00167 };
00168
00169 }
00170
00171 }
00172
00173 }
00174
00175
00176
00177 #endif // GAUDIUTILS_HISTOSTRINGS_H
00178