Aida2ROOT.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #include "GaudiKernel/Kernel.h"
00008
00009 #include <string>
00010 #include <vector>
00012 #define class class GAUDI_API
00013 #include "AIDA/IHistogram1D.h"
00014 #include "AIDA/IHistogram2D.h"
00015 #include "AIDA/IHistogram3D.h"
00016 #include "AIDA/IProfile1D.h"
00017 #include "AIDA/IProfile2D.h"
00018 #undef class
00019
00020
00021
00022 #include "TH1D.h"
00023 #include "TH2D.h"
00024 #include "TH3D.h"
00025 #include "TProfile.h"
00026 #include "TProfile2D.h"
00027
00028
00029
00030 #include "GaudiKernel/HistogramBase.h"
00031
00032
00033
00034 #include "GaudiUtils/Aida2ROOT.h"
00035
00041
00042
00043
00044 TH1D* Gaudi::Utils::Aida2ROOT::aida2root ( AIDA::IHistogram1D* aida )
00045 {
00046 if ( 0 == aida ) { return 0 ; }
00047 Gaudi::HistogramBase* base = dynamic_cast<Gaudi::HistogramBase*> ( aida ) ;
00048 if ( 0 == base ) { return 0 ; }
00049 return dynamic_cast<TH1D*>( base->representation() ) ;
00050 }
00051
00052
00053
00054 TH2D* Gaudi::Utils::Aida2ROOT::aida2root ( AIDA::IHistogram2D* aida )
00055 {
00056 if ( 0 == aida ) { return 0 ; }
00057 Gaudi::HistogramBase* base = dynamic_cast<Gaudi::HistogramBase*> ( aida ) ;
00058 if ( 0 == base ) { return 0 ; }
00059 return dynamic_cast<TH2D*>( base->representation() ) ;
00060 }
00061
00062
00063
00064 TH3D* Gaudi::Utils::Aida2ROOT::aida2root ( AIDA::IHistogram3D* aida )
00065 {
00066 if ( 0 == aida ) { return 0 ; }
00067 Gaudi::HistogramBase* base = dynamic_cast<Gaudi::HistogramBase*> ( aida ) ;
00068 if ( 0 == base ) { return 0 ; }
00069 return dynamic_cast<TH3D*>( base->representation() ) ;
00070 }
00071
00072
00073
00074 TProfile* Gaudi::Utils::Aida2ROOT::aida2root ( AIDA::IProfile1D* aida )
00075 {
00076 if ( 0 == aida ) { return 0 ; }
00077 Gaudi::HistogramBase* base = dynamic_cast<Gaudi::HistogramBase*> ( aida ) ;
00078 if ( 0 == base ) { return 0 ; }
00079 return dynamic_cast<TProfile*>( base->representation() ) ;
00080 }
00081
00082
00083
00084 TProfile2D* Gaudi::Utils::Aida2ROOT::aida2root ( AIDA::IProfile2D* aida )
00085 {
00086 if ( 0 == aida ) { return 0 ; }
00087 Gaudi::HistogramBase* base = dynamic_cast<Gaudi::HistogramBase*> ( aida ) ;
00088 if ( 0 == base ) { return 0 ; }
00089 return dynamic_cast<TProfile2D*>( base->representation() ) ;
00090 }
00091
00092
00093
00094 TObject* Gaudi::Utils::Aida2ROOT::aida2root ( AIDA::IHistogram* aida )
00095 {
00096 if ( 0 == aida ) { return 0 ; }
00097 Gaudi::HistogramBase* base = dynamic_cast<Gaudi::HistogramBase*> ( aida ) ;
00098 if ( 0 == base ) { return 0 ; }
00099 return base->representation() ;
00100 }
00101
00102
00103