18 #include "TProfile2D.h" 19 #include "TBufferXML.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" 45 template <
typename TYPE>
50 TYPE* histo = ( obj ?
dynamic_cast<TYPE*
>( obj.get() ) :
nullptr );
70 return stream << TBufferXML::ConvertToXML( &histo ) ;
82 return stream << TBufferXML::ConvertToXML( &histo ) ;
94 return stream << TBufferXML::ConvertToXML( &histo ) ;
103 (
const TH1F& histo ,
106 return stream << TBufferXML::ConvertToXML( &histo ) ;
115 (
const TH2F& histo ,
118 return stream << TBufferXML::ConvertToXML( &histo ) ;
127 (
const TH3F& histo ,
130 return stream << TBufferXML::ConvertToXML( &histo ) ;
139 (
const TProfile& histo ,
142 return stream << TBufferXML::ConvertToXML( &histo ) ;
151 (
const TProfile2D& histo ,
154 return stream << TBufferXML::ConvertToXML ( &histo ) ;
163 (
const AIDA::IHistogram1D& histo ,
176 (
const AIDA::IHistogram2D& histo ,
189 (
const AIDA::IHistogram3D& histo ,
202 (
const AIDA::IProfile1D& histo ,
215 (
const AIDA::IProfile2D& histo ,
235 auto histo = _Xml<TH1D>( input ) ;
238 histo->Copy ( result ) ;
255 auto histo = _Xml<TH2D>( input ) ;
258 histo->Copy ( result ) ;
275 auto histo = _Xml<TH3D>( input ) ;
278 histo->Copy ( result ) ;
295 auto histo = _Xml<TH1F>( input ) ;
298 histo->Copy ( result ) ;
315 auto histo = _Xml<TH2F>( input ) ;
318 histo->Copy ( result ) ;
335 auto histo =_Xml<TH3F>( input ) ;
338 histo->Copy ( result ) ;
355 auto histo = _Xml<TProfile>( input ) ;
358 histo->Copy ( result ) ;
375 auto histo = _Xml<TProfile2D>( input ) ;
378 histo->Copy ( result ) ;
394 if ( result ) {
return fromXml ( *result , input ) ; }
396 auto histo = _Xml<TH1D>( input ) ;
399 result = histo.release() ;
413 if ( result ) {
return fromXml ( *result , input ) ; }
415 auto histo = _Xml<TH2D>( input ) ;
418 result = histo.release() ;
432 if ( result ) {
return fromXml ( *result , input ) ; }
434 auto histo = _Xml<TH3D>( input ) ;
437 result = histo.release() ;
452 if ( result ) {
return fromXml ( *result , input ) ; }
454 auto histo = _Xml<TProfile>( input ) ;
457 result = histo.release() ;
471 if ( result ) {
return fromXml ( *result , input ) ; }
473 auto histo = _Xml<TProfile2D>( input ) ;
476 result = histo.release() ;
GAUDI_API StatusCode fromXml(TH1D &result, const std::string &input)
parse the histogram from standard ROOT XML
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