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" 36 ? const_cast<AIDA::IProfile*>( static_cast<const AIDA::IProfile*>(
this ) )
37 : className ==
"AIDA::IBaseHistogram" 38 ? const_cast<AIDA::IBaseHistogram*>( static_cast<const AIDA::IBaseHistogram*>(
this ) )
44 int rBin = m_rep->GetBin( rIndexX( idX ), rIndexY( idY ) );
45 return int( m_rep->GetBinEntries( rBin ) + 0.5 );
50 TProfile2D* imp = dynamic_cast<TProfile2D*>( rep );
51 if ( !imp )
throw std::runtime_error(
"Cannot adopt native histogram representation." );
53 m_xAxis.initialize( m_rep->GetXaxis(), true );
54 m_yAxis.initialize( m_rep->GetYaxis(), true );
55 setTitle( m_rep->GetTitle() );
60 const Edges& eY,
double ,
double ) {
62 auto p =
new Profile2D(
new TProfile2D( title.
c_str(), title.
c_str(), eX.size() - 1, &eX.front(), eY.size() - 1,
68 double xup,
int binsY,
double ylow,
double yup,
69 double zlow,
double zup ) {
71 new Profile2D(
new TProfile2D( title.
c_str(), title.
c_str(), binsX, xlow, xup, binsY, ylow, yup, zlow, zup ) );
76 auto h = getRepresentation<AIDA::IProfile2D, TProfile2D>( hist );
77 auto n = ( h ?
new Profile2D(
new TProfile2D( *h ) ) : nullptr );
83 rep->SetDirectory(
nullptr );
int m_sumEntries
cache sumEntries (allEntries) when setting contents since Root can't compute by himself
void * cast(const std::string &className) const override
Introspection method.
int binEntries(int indexX, int indexY) const override
The number of entries (ie the number of times fill was called for this bin).
void adoptRepresentation(TObject *rep) override
Adopt ROOT histogram representation.
std::string m_classType
class type
std::pair< DataObject *, AIDA::IProfile2D * > createProf2D(const AIDA::IProfile2D &hist)
Copy constructor.
Profile2D()
Default Constructor.
Header file for std:chrono::duration-based Counters.