14 # pragma warning( disable : 2259 )
20 # pragma warning( disable : 4996 )
32 #include <TProfile2D.h>
37 return className ==
"AIDA::IProfile2D"
38 ?
const_cast<AIDA::IProfile2D*
>(
static_cast<const AIDA::IProfile2D*
>( this ) )
39 : className ==
"AIDA::IProfile" ?
const_cast<AIDA::IProfile*
>(
static_cast<const AIDA::IProfile*
>( this ) )
40 : className ==
"AIDA::IBaseHistogram"
41 ?
const_cast<AIDA::IBaseHistogram*
>(
static_cast<const AIDA::IBaseHistogram*
>( this ) )
47 int rBin = m_rep->GetBin( rIndexX( idX ), rIndexY( idY ) );
48 return int( m_rep->GetBinEntries( rBin ) + 0.5 );
53 TProfile2D* imp =
dynamic_cast<TProfile2D*
>( rep );
54 if ( !imp )
throw std::runtime_error(
"Cannot adopt native histogram representation." );
56 m_xAxis.initialize( m_rep->GetXaxis(),
true );
57 m_yAxis.initialize( m_rep->GetYaxis(),
true );
58 setTitle( m_rep->GetTitle() );
64 const Edges& eY,
double ,
double ) {
66 auto p =
new Profile2D(
new TProfile2D( title.
c_str(), title.
c_str(), eX.size() - 1, &eX.front(), eY.size() - 1,
74 double xup,
int binsY,
double ylow,
double yup,
75 double zlow,
double zup ) {
77 new Profile2D(
new TProfile2D( title.
c_str(), title.
c_str(), binsX, xlow, xup, binsY, ylow, yup, zlow, zup ) );
83 const AIDA::IProfile2D& hist ) {
84 auto h = getRepresentation<AIDA::IProfile2D, TProfile2D>( hist );
85 auto n = (
h ?
new Profile2D(
new TProfile2D( *
h ) ) :
nullptr );
93 m_classType =
"IProfile2D";
94 rep->SetDirectory(
nullptr );
95 adoptRepresentation( rep );