10 #include "TBufferXML.h" 19 #include "TProfile2D.h" 23 #include "AIDA/IHistogram1D.h" 24 #include "AIDA/IHistogram2D.h" 25 #include "AIDA/IHistogram3D.h" 26 #include "AIDA/IProfile1D.h" 27 #include "AIDA/IProfile2D.h" 44 template <
typename TYPE>
48 TYPE* histo = ( obj ?
dynamic_cast<TYPE*
>( obj.get() ) :
nullptr );
65 return stream << TBufferXML::ConvertToXML( &histo );
74 return stream << TBufferXML::ConvertToXML( &histo );
83 return stream << TBufferXML::ConvertToXML( &histo );
92 return stream << TBufferXML::ConvertToXML( &histo );
101 return stream << TBufferXML::ConvertToXML( &histo );
110 return stream << TBufferXML::ConvertToXML( &histo );
119 return stream << TBufferXML::ConvertToXML( &histo );
128 return stream << TBufferXML::ConvertToXML( &histo );
192 auto histo = _Xml<TH1D>( input );
195 histo->Copy( result );
210 auto histo = _Xml<TH2D>( input );
213 histo->Copy( result );
228 auto histo = _Xml<TH3D>( input );
231 histo->Copy( result );
246 auto histo = _Xml<TH1F>( input );
249 histo->Copy( result );
264 auto histo = _Xml<TH2F>( input );
267 histo->Copy( result );
282 auto histo = _Xml<TH3F>( input );
285 histo->Copy( result );
300 auto histo = _Xml<TProfile>( input );
303 histo->Copy( result );
318 auto histo = _Xml<TProfile2D>( input );
321 histo->Copy( result );
334 if ( result ) {
return fromXml( *result, input ); }
336 auto histo = _Xml<TH1D>( input );
339 result = histo.release();
351 if ( result ) {
return fromXml( *result, input ); }
353 auto histo = _Xml<TH2D>( input );
356 result = histo.release();
368 if ( result ) {
return fromXml( *result, input ); }
370 auto histo = _Xml<TH3D>( input );
373 result = histo.release();
386 if ( result ) {
return fromXml( *result, input ); }
388 auto histo = _Xml<TProfile>( input );
391 result = histo.release();
403 if ( result ) {
return fromXml( *result, input ); }
405 auto histo = _Xml<TProfile2D>( input );
408 result = histo.release();
GAUDI_API StatusCode fromXml(TH1D &result, const std::string &input)
parse the histogram from standard ROOT XML
constexpr static const auto SUCCESS
This class is used for returning status codes from appropriate routines.
static TH1D * aida2root(AIDA::IHistogram1D *aida)
get the underlying pointer for 1D-histogram
GAUDI_API std::ostream & toXml(const TH1D &histo, std::ostream &stream)
stream the ROOT histogram into output stream as XML
constexpr static const auto FAILURE