Go to the documentation of this file.00001
00002
00003
00004
00005
00006 #include <sstream>
00007
00008
00009
00010 #include "GaudiUtils/HistoStrings.h"
00011 #include "GaudiUtils/Histo2String.h"
00012 #include "GaudiUtils/HistoParsers.h"
00013 #include "GaudiUtils/HistoXML.h"
00014
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 std::string Gaudi::Utils::Histos::HistoStrings::toString
00030 ( const TH1D& histo ,
00031 const bool asXML )
00032 { return Gaudi::Utils::toString ( histo , asXML ) ; }
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 std::string Gaudi::Utils::Histos::HistoStrings::toString
00043 ( const TH2D& histo ,
00044 const bool asXML )
00045 { return Gaudi::Utils::toString ( histo , asXML ) ; }
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 std::string Gaudi::Utils::Histos::HistoStrings::toString
00056 ( const AIDA::IHistogram1D& histo ,
00057 const bool asXML )
00058 { return Gaudi::Utils::toString ( histo , asXML ) ; }
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 std::string Gaudi::Utils::Histos::HistoStrings::toString
00069 ( const AIDA::IHistogram2D& histo ,
00070 const bool asXML )
00071 { return Gaudi::Utils::toString ( histo , asXML ) ; }
00072
00073
00074
00075
00076
00077
00078
00079 StatusCode Gaudi::Utils::Histos::HistoStrings::fromString
00080 ( TH1D& result , const std::string& input )
00081 { return Gaudi::Parsers::parse ( result , input ) ; }
00082
00083
00084
00085
00086
00087
00088
00089 StatusCode Gaudi::Utils::Histos::HistoStrings::fromString
00090 ( TH2D& result , const std::string& input )
00091 { return Gaudi::Parsers::parse ( result , input ) ; }
00092
00093
00094
00095
00096
00097
00098
00099 StatusCode Gaudi::Utils::Histos::HistoStrings::fromString
00100 ( AIDA::IHistogram1D& result , const std::string& input )
00101 { return Gaudi::Parsers::parse ( result , input ) ; }
00102
00103
00104
00105
00106
00107
00108
00109 StatusCode Gaudi::Utils::Histos::HistoStrings::fromString
00110 ( AIDA::IHistogram2D& result , const std::string& input )
00111 { return Gaudi::Parsers::parse ( result , input ) ; }
00112
00113 namespace
00114 {
00115
00116 template <class TYPE>
00117 std::string _toXml ( const TYPE& object )
00118 {
00119 std::ostringstream s ;
00120 Gaudi::Utils::Histos::toXml ( object , s ) ;
00121 return s.str() ;
00122 }
00123
00124 template <class TYPE>
00125 StatusCode _fromXml ( TYPE& object , const std::string& input )
00126 {
00127 return Gaudi::Utils::Histos::fromXml ( object , input ) ;
00128 }
00129
00130 }
00131
00132 std::string Gaudi::Utils::Histos::HistoStrings::toXml
00133 ( const TH1D& histo ) { return _toXml ( histo ) ; }
00134 std::string Gaudi::Utils::Histos::HistoStrings::toXml
00135 ( const TH2D& histo ) { return _toXml ( histo ) ; }
00136 std::string Gaudi::Utils::Histos::HistoStrings::toXml
00137 ( const TH3D& histo ) { return _toXml ( histo ) ; }
00138 std::string Gaudi::Utils::Histos::HistoStrings::toXml
00139 ( const TProfile& histo ) { return _toXml ( histo ) ; }
00140 std::string Gaudi::Utils::Histos::HistoStrings::toXml
00141 ( const TProfile2D& histo ) { return _toXml ( histo ) ; }
00142
00143 std::string Gaudi::Utils::Histos::HistoStrings::toXml
00144 ( const AIDA::IHistogram1D& histo ) { return _toXml ( histo ) ; }
00145 std::string Gaudi::Utils::Histos::HistoStrings::toXml
00146 ( const AIDA::IHistogram2D& histo ) { return _toXml ( histo ) ; }
00147 std::string Gaudi::Utils::Histos::HistoStrings::toXml
00148 ( const AIDA::IHistogram3D& histo ) { return _toXml ( histo ) ; }
00149 std::string Gaudi::Utils::Histos::HistoStrings::toXml
00150 ( const AIDA::IProfile1D& histo ) { return _toXml ( histo ) ; }
00151 std::string Gaudi::Utils::Histos::HistoStrings::toXml
00152 ( const AIDA::IProfile2D& histo ) { return _toXml ( histo ) ; }
00153
00154 StatusCode Gaudi::Utils::Histos::HistoStrings::fromXml
00155 ( TH1D& result , const std::string& input )
00156 { return _fromXml ( result , input ) ; }
00157 StatusCode Gaudi::Utils::Histos::HistoStrings::fromXml
00158 ( TH2D& result , const std::string& input )
00159 { return _fromXml ( result , input ) ; }
00160 StatusCode Gaudi::Utils::Histos::HistoStrings::fromXml
00161 ( TH3D& result , const std::string& input )
00162 { return _fromXml ( result , input ) ; }
00163 StatusCode Gaudi::Utils::Histos::HistoStrings::fromXml
00164 ( TProfile& result , const std::string& input )
00165 { return _fromXml ( result , input ) ; }
00166 StatusCode Gaudi::Utils::Histos::HistoStrings::fromXml
00167 ( TProfile2D& result , const std::string& input )
00168 { return _fromXml ( result , input ) ; }
00169
00170 StatusCode Gaudi::Utils::Histos::HistoStrings::fromXml
00171 ( AIDA::IHistogram1D& result , const std::string& input )
00172 { return _fromXml ( result , input ) ; }
00173 StatusCode Gaudi::Utils::Histos::HistoStrings::fromXml
00174 ( AIDA::IHistogram2D& result , const std::string& input )
00175 { return _fromXml ( result , input ) ; }
00176 StatusCode Gaudi::Utils::Histos::HistoStrings::fromXml
00177 ( AIDA::IHistogram3D& result , const std::string& input )
00178 { return _fromXml ( result , input ) ; }
00179 StatusCode Gaudi::Utils::Histos::HistoStrings::fromXml
00180 ( AIDA::IProfile1D& result , const std::string& input )
00181 { return _fromXml ( result , input ) ; }
00182 StatusCode Gaudi::Utils::Histos::HistoStrings::fromXml
00183 ( AIDA::IProfile2D& result , const std::string& input )
00184 { return _fromXml ( result , input ) ; }
00185
00186
00187
00188
00189
00190
00191
00192