14 # pragma warning( disable : 2259 )
20 # pragma warning( disable : 4996 )
28 #include <TProfile2D.h>
33 return className ==
"AIDA::IProfile2D"
34 ?
const_cast<AIDA::IProfile2D*
>(
static_cast<const AIDA::IProfile2D*
>( this ) )
35 : className ==
"AIDA::IProfile" ?
const_cast<AIDA::IProfile*
>(
static_cast<const AIDA::IProfile*
>( this ) )
36 : className ==
"AIDA::IBaseHistogram"
37 ?
const_cast<AIDA::IBaseHistogram*
>(
static_cast<const AIDA::IBaseHistogram*
>( this ) )
43 int rBin = m_rep->GetBin( rIndexX( idX ), rIndexY( idY ) );
44 return int( m_rep->GetBinEntries( rBin ) + 0.5 );
49 TProfile2D* imp =
dynamic_cast<TProfile2D*
>( rep );
50 if ( !imp )
throw std::runtime_error(
"Cannot adopt native histogram representation." );
52 m_xAxis.initialize( m_rep->GetXaxis(),
true );
53 m_yAxis.initialize( m_rep->GetYaxis(),
true );
54 setTitle( m_rep->GetTitle() );
59 const Edges& eY,
double ,
double ) {
61 auto p =
new Profile2D(
new TProfile2D( title.
c_str(), title.
c_str(), eX.size() - 1, &eX.front(), eY.size() - 1,
67 double xup,
int binsY,
double ylow,
double yup,
68 double zlow,
double zup ) {
70 new Profile2D(
new TProfile2D( title.
c_str(), title.
c_str(), binsX, xlow, xup, binsY, ylow, yup, zlow, zup ) );
75 auto h = getRepresentation<AIDA::IProfile2D, TProfile2D>( hist );
76 auto n = (
h ?
new Profile2D(
new TProfile2D( *
h ) ) :
nullptr );
82 rep->SetDirectory(
nullptr );