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