14 # pragma warning( disable : 2259 )
20 # pragma warning( disable : 4996 )
25 #include <type_traits>
29 #include <AIDA/IHistogram1D.h>
30 #include <AIDA/IHistogram2D.h>
31 #include <AIDA/IHistogram3D.h>
32 #include <AIDA/IProfile1D.h>
33 #include <AIDA/IProfile2D.h>
41 #include <TProfile2D.h>
56 template <
typename Out,
typename In>
57 Out* a2r_cast( In* aida ) {
59 auto base =
dynamic_cast<Base*
>( aida );
60 return base ?
dynamic_cast<Out*
>(
base->representation() ) :
nullptr;
68 return a2r_cast<const TH1D>( aida );
75 return a2r_cast<const TH2D>( aida );
82 return a2r_cast<const TH3D>( aida );
89 return a2r_cast<const TProfile>( aida );
96 return a2r_cast<const TProfile2D>( aida );
103 return a2r_cast<const TObject>( aida );