Gaudi Framework, version v24r2

Home   Generated: Wed Dec 4 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
Gaudi::Generic3D< INTERFACE, IMPLEMENTATION > Class Template Reference

Common AIDA implementation stuff for histograms and profiles using ROOT implementations. More...

#include <GaudiPI/Generic3D.h>

Inheritance diagram for Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >:
Inheritance graph
[legend]
Collaboration diagram for Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >:
Collaboration graph
[legend]

Public Types

typedef Generic3D< INTERFACE,
IMPLEMENTATION > 
Base
 

Public Member Functions

 Generic3D ()
 Default constructor.
 
virtual ~Generic3D ()
 Destructor.
 
TObject * representation () const
 ROOT object implementation.
 
virtual void adoptRepresentation (TObject *rep)
 Adopt ROOT histogram representation.
 
virtual int dimension () const
 Get the Histogram's dimension.
 
virtual std::string title () const
 Get the title of the object.
 
virtual bool setTitle (const std::string &title)
 Set the title of the object.
 
virtual std::string name () const
 object name
 
bool setName (const std::string &newName)
 Sets the name of the object.
 
virtual AIDA::IAnnotation & annotation ()
 Access annotation object.
 
virtual const AIDA::IAnnotation & annotation () const
 Access annotation object (cons)
 
virtual int entries () const
 Get the number or all the entries.
 
virtual int allEntries () const
 Get the number or all the entries, both in range and underflow/overflow bins of the IProfile.
 
virtual double sumBinHeights () const
 Get the sum of in range bin heights in the IProfile.
 
virtual double sumAllBinHeights () const
 Get the sum of all the bins heights (including underflow and overflow bin).
 
virtual double sumExtraBinHeights () const
 Get the sum of the underflow and overflow bin height.
 
virtual double minBinHeight () const
 Get the minimum height of the in-range bins.
 
virtual double maxBinHeight () const
 Get the maximum height of the in-range bins.
 
int rIndexX (int index) const
 
int rIndexY (int index) const
 
int rIndexZ (int index) const
 
double binMeanX (int indexX, int, int) const
 The weighted mean along the x axis of a given bin.
 
double binMeanY (int, int indexY, int) const
 The weighted mean along the y axis of a given bin.
 
double binMeanZ (int, int, int indexZ) const
 The weighted mean along the z axis of a given bin.
 
int binEntries (int indexX, int indexY, int indexZ) const
 Number of entries in the corresponding bin (ie the number of times fill was calle d for this bin).
 
virtual int binEntriesX (int index) const
 Sum of all the entries of the bins along a given x bin.
 
virtual int binEntriesY (int index) const
 Sum of all the entries of the bins along a given y bin.
 
virtual int binEntriesZ (int index) const
 Sum of all the entries of the bins along a given z bin.
 
double binHeight (int indexX, int indexY, int indexZ) const
 Total height of the corresponding bin (ie the sum of the weights in this bin).
 
virtual double binHeightX (int index) const
 Sum of all the heights of the bins along a given x bin.
 
virtual double binHeightY (int index) const
 Sum of all the heights of the bins along a given y bin.
 
virtual double binHeightZ (int index) const
 Sum of all the heights of the bins along a given z bin.
 
virtual double binError (int indexX, int indexY, int indexZ) const
 The error of a given bin.
 
virtual double meanX () const
 The mean of the IHistogram3D along the x axis.
 
virtual double meanY () const
 The mean of the IHistogram3D along the y axis.
 
virtual double meanZ () const
 The mean of the IHistogram3D along the z axis.
 
virtual double rmsX () const
 The RMS of the IHistogram3D along the x axis.
 
virtual double rmsY () const
 The RMS of the IHistogram3D along the y axis.
 
virtual double rmsZ () const
 The RMS of the IHistogram3D along the z axis.
 
virtual const AIDA::IAxis & xAxis () const
 Get the x axis of the IHistogram3D.
 
virtual const AIDA::IAxis & yAxis () const
 Get the y axis of the IHistogram3D.
 
virtual const AIDA::IAxis & zAxis () const
 Get the z axis of the IHistogram3D.
 
virtual int coordToIndexX (double coord) const
 Get the bin number corresponding to a given coordinate along the x axis.
 
virtual int coordToIndexY (double coord) const
 Get the bin number corresponding to a given coordinate along the y axis.
 
virtual int coordToIndexZ (double coord) const
 Get the bin number corresponding to a given coordinate along the z axis.
 
virtual double equivalentBinEntries () const
 Number of equivalent entries, i.e. SUM[ weight ] ^ 2 / SUM[ weight^2 ]
 
virtual bool scale (double scaleFactor)
 Scale the weights and the errors of all the IHistogram's bins (in-range and out-of-range ones) by a given scale factor.
 
virtual bool add (const INTERFACE &hist)
 Add to this Histogram3D the contents of another IHistogram3D.
 
int extraEntries () const
 
virtual std::ostreamprint (std::ostream &s) const
 Print (ASCII) the histogram into the output stream.
 
virtual std::ostreamwrite (std::ostream &s) const
 Write (ASCII) the histogram table into the output stream.
 
virtual int write (const char *file_name) const
 Write (ASCII) the histogram table into a file.
 
template<>
void adoptRepresentation (TObject *rep)
 Adopt ROOT histogram representation.
 
- Public Member Functions inherited from Gaudi::HistogramBase
virtual ~HistogramBase ()
 

Protected Attributes

Gaudi::Axis m_xAxis
 
Gaudi::Axis m_yAxis
 
Gaudi::Axis m_zAxis
 
AIDA::Annotation m_annotation
 Object annotations.
 
IMPLEMENTATION * m_rep
 Reference to underlying implementation.
 
std::string m_classType
 
int m_sumEntries
 

Detailed Description

template<typename INTERFACE, typename IMPLEMENTATION>
class Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >

Common AIDA implementation stuff for histograms and profiles using ROOT implementations.

Credits: This code is the result of some stripdown implementation of LCG/PI. Credits to them!

Author
M.Frank

Definition at line 29 of file Generic3D.h.

Member Typedef Documentation

template<typename INTERFACE, typename IMPLEMENTATION>
typedef Generic3D<INTERFACE,IMPLEMENTATION> Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::Base

Definition at line 31 of file Generic3D.h.

Constructor & Destructor Documentation

template<typename INTERFACE, typename IMPLEMENTATION>
Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::Generic3D ( )
inline

Default constructor.

Definition at line 33 of file Generic3D.h.

: m_rep(0) {}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::~Generic3D ( )
inlinevirtual

Destructor.

Definition at line 35 of file Generic3D.h.

{ delete m_rep; }

Member Function Documentation

template<typename INTERFACE, typename IMPLEMENTATION>
virtual bool Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::add ( const INTERFACE &  hist)
inlinevirtual

Add to this Histogram3D the contents of another IHistogram3D.

Definition at line 179 of file Generic3D.h.

{
const Base* p = dynamic_cast<const Base*>(&hist);
if ( p ) {
m_rep->Add(p->m_rep);
return true;
}
throw std::runtime_error("Cannot add profile histograms of different implementations.");
}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual void Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::adoptRepresentation ( TObject *  rep)
virtual

Adopt ROOT histogram representation.

Implements Gaudi::HistogramBase.

template<>
void Gaudi::Generic3D< AIDA::IHistogram3D, TH3D >::adoptRepresentation ( TObject *  rep)
virtual

Adopt ROOT histogram representation.

Implements Gaudi::HistogramBase.

Definition at line 61 of file H3D.cpp.

{
TH3D* imp = dynamic_cast<TH3D*>(rep);
if ( imp ) {
if ( m_rep ) delete m_rep;
m_rep = imp;
m_xAxis.initialize(m_rep->GetXaxis(),true);
m_yAxis.initialize(m_rep->GetYaxis(),true);
m_zAxis.initialize(m_rep->GetZaxis(),true);
const TArrayD* a = m_rep->GetSumw2();
if ( 0 == a || (a && a->GetSize()==0) ) m_rep->Sumw2();
setTitle(m_rep->GetTitle());
return;
}
throw std::runtime_error("Cannot adopt native histogram representation.");
}
template<class INTERFACE , class IMPLEMENTATION >
int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::allEntries ( ) const
virtual

Get the number or all the entries, both in range and underflow/overflow bins of the IProfile.

Definition at line 242 of file Generic3D.h.

{
return int(m_rep->GetEntries());
}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual AIDA::IAnnotation& Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::annotation ( )
inlinevirtual

Access annotation object.

Definition at line 52 of file Generic3D.h.

{ return m_annotation; }
template<typename INTERFACE, typename IMPLEMENTATION>
virtual const AIDA::IAnnotation& Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::annotation ( ) const
inlinevirtual

Access annotation object (cons)

Definition at line 54 of file Generic3D.h.

{ return m_annotation; }
template<typename INTERFACE, typename IMPLEMENTATION>
int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::binEntries ( int  indexX,
int  indexY,
int  indexZ 
) const
inline

Number of entries in the corresponding bin (ie the number of times fill was calle d for this bin).

Definition at line 85 of file Generic3D.h.

{
if (binHeight(indexX, indexY, indexZ)<=0) return 0;
double xx = binHeight(indexX, indexY, indexZ)/binError(indexX, indexY, indexZ);
return int(xx*xx+0.5);
}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::binEntriesX ( int  index) const
inlinevirtual

Sum of all the entries of the bins along a given x bin.

Definition at line 91 of file Generic3D.h.

{
int n = 0;
for (int i = -2; i < yAxis().bins(); ++i)
for (int j = -2; j < zAxis().bins(); ++j)
n += binEntries(index,i,j);
return n;
}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::binEntriesY ( int  index) const
inlinevirtual

Sum of all the entries of the bins along a given y bin.

Definition at line 100 of file Generic3D.h.

{
int n = 0;
for (int i = -2; i < xAxis().bins(); ++i)
for (int j = -2; j < zAxis().bins(); ++j)
n += binEntries(i,index,j);
return n;
}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::binEntriesZ ( int  index) const
inlinevirtual

Sum of all the entries of the bins along a given z bin.

Definition at line 109 of file Generic3D.h.

{
int n = 0;
for (int i = -2; i < xAxis().bins(); ++i)
for (int j = -2; j < yAxis().bins(); ++j)
n += binEntries(i,j,index);
return n;
}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::binError ( int  indexX,
int  indexY,
int  indexZ 
) const
inlinevirtual

The error of a given bin.

Definition at line 146 of file Generic3D.h.

{ return m_rep->GetBinError ( rIndexX(indexX), rIndexY(indexY ), rIndexZ(indexZ ) ); }
template<typename INTERFACE, typename IMPLEMENTATION>
double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::binHeight ( int  indexX,
int  indexY,
int  indexZ 
) const
inline

Total height of the corresponding bin (ie the sum of the weights in this bin).

Definition at line 118 of file Generic3D.h.

{ return m_rep->GetBinContent ( rIndexX(indexX), rIndexY(indexY), rIndexZ(indexZ) ); }
template<typename INTERFACE, typename IMPLEMENTATION>
virtual double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::binHeightX ( int  index) const
inlinevirtual

Sum of all the heights of the bins along a given x bin.

Definition at line 122 of file Generic3D.h.

{
double s = 0;
for (int i = -2; i < yAxis().bins(); ++i)
for (int j = -2; j < zAxis().bins(); ++j)
s += binHeight(index,i,j);
return s;
}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::binHeightY ( int  index) const
inlinevirtual

Sum of all the heights of the bins along a given y bin.

Definition at line 130 of file Generic3D.h.

{
double s = 0;
for (int i = -2; i < xAxis().bins(); ++i)
for (int j = -2; j < zAxis().bins(); ++j)
s += binHeight(i,index,j);
return s;
}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::binHeightZ ( int  index) const
inlinevirtual

Sum of all the heights of the bins along a given z bin.

Definition at line 138 of file Generic3D.h.

{
double s = 0;
for (int i = -2; i < xAxis().bins(); ++i)
for (int j = -2; j < yAxis().bins(); ++j)
s += binHeight(i,j,index);
return s;
}
template<typename INTERFACE, typename IMPLEMENTATION>
double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::binMeanX ( int  indexX,
int  ,
int   
) const
inline

The weighted mean along the x axis of a given bin.

Definition at line 76 of file Generic3D.h.

{ return (m_rep->GetXaxis())->GetBinCenter( rIndexX(indexX) ); }
template<typename INTERFACE, typename IMPLEMENTATION>
double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::binMeanY ( int  ,
int  indexY,
int   
) const
inline

The weighted mean along the y axis of a given bin.

Definition at line 79 of file Generic3D.h.

{ return (m_rep->GetYaxis())->GetBinCenter( rIndexY(indexY) ); }
template<typename INTERFACE, typename IMPLEMENTATION>
double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::binMeanZ ( int  ,
int  ,
int  indexZ 
) const
inline

The weighted mean along the z axis of a given bin.

Definition at line 82 of file Generic3D.h.

{ return (m_rep->GetYaxis())->GetBinCenter( rIndexY(indexZ) ); }
template<typename INTERFACE, typename IMPLEMENTATION>
virtual int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::coordToIndexX ( double  coord) const
inlinevirtual

Get the bin number corresponding to a given coordinate along the x axis.

Definition at line 168 of file Generic3D.h.

{ return xAxis().coordToIndex(coord);}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::coordToIndexY ( double  coord) const
inlinevirtual

Get the bin number corresponding to a given coordinate along the y axis.

Definition at line 170 of file Generic3D.h.

{ return yAxis().coordToIndex(coord);}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::coordToIndexZ ( double  coord) const
inlinevirtual

Get the bin number corresponding to a given coordinate along the z axis.

Definition at line 172 of file Generic3D.h.

{ return zAxis().coordToIndex(coord);}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::dimension ( ) const
inlinevirtual

Get the Histogram's dimension.

Definition at line 42 of file Generic3D.h.

{ return 3; }
template<class INTERFACE , class IMPLEMENTATION >
int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::entries ( ) const
virtual

Get the number or all the entries.

Definition at line 237 of file Generic3D.h.

{
return (int)m_rep->GetEntries();
}
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::equivalentBinEntries ( ) const
virtual

Number of equivalent entries, i.e. SUM[ weight ] ^ 2 / SUM[ weight^2 ]

Definition at line 267 of file Generic3D.h.

{
if (sumBinHeights() <= 0) return 0;
Stat_t stats[11]; // cover up to 3D...
m_rep->GetStats(stats);
return stats[0]*stats[0]/stats[1];
}
template<typename INTERFACE, typename IMPLEMENTATION>
int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::extraEntries ( ) const
inline

Definition at line 189 of file Generic3D.h.

{
return
binEntries(AIDA::IAxis::UNDERFLOW_BIN,AIDA::IAxis::UNDERFLOW_BIN,AIDA::IAxis::UNDERFLOW_BIN) +
binEntries(AIDA::IAxis::UNDERFLOW_BIN,AIDA::IAxis::UNDERFLOW_BIN,AIDA::IAxis::OVERFLOW_BIN) +
binEntries(AIDA::IAxis::UNDERFLOW_BIN, AIDA::IAxis::OVERFLOW_BIN,AIDA::IAxis::UNDERFLOW_BIN) +
binEntries(AIDA::IAxis::OVERFLOW_BIN,AIDA::IAxis::UNDERFLOW_BIN,AIDA::IAxis::UNDERFLOW_BIN) +
binEntries(AIDA::IAxis::OVERFLOW_BIN,AIDA::IAxis::UNDERFLOW_BIN,AIDA::IAxis::OVERFLOW_BIN) +
binEntries(AIDA::IAxis::OVERFLOW_BIN,AIDA::IAxis::OVERFLOW_BIN,AIDA::IAxis::UNDERFLOW_BIN) +
binEntries(AIDA::IAxis::OVERFLOW_BIN, AIDA::IAxis::OVERFLOW_BIN,AIDA::IAxis::OVERFLOW_BIN);
}
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::maxBinHeight ( ) const
virtual

Get the maximum height of the in-range bins.

Definition at line 252 of file Generic3D.h.

{
return m_rep->GetMaximum();
}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::meanX ( ) const
inlinevirtual

The mean of the IHistogram3D along the x axis.

Definition at line 149 of file Generic3D.h.

{ return m_rep->GetMean ( 1); }
template<typename INTERFACE, typename IMPLEMENTATION>
virtual double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::meanY ( ) const
inlinevirtual

The mean of the IHistogram3D along the y axis.

Definition at line 152 of file Generic3D.h.

{ return m_rep->GetMean ( 2 ); }
template<typename INTERFACE, typename IMPLEMENTATION>
virtual double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::meanZ ( ) const
inlinevirtual

The mean of the IHistogram3D along the z axis.

Definition at line 154 of file Generic3D.h.

{ return m_rep->GetMean ( 3 ); }
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::minBinHeight ( ) const
virtual

Get the minimum height of the in-range bins.

Definition at line 247 of file Generic3D.h.

{
return m_rep->GetMinimum();
}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual std::string Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::name ( ) const
inlinevirtual

object name

Definition at line 48 of file Generic3D.h.

{ return m_annotation.value("Name"); }
template<class INTERFACE , class IMPLEMENTATION >
std::ostream & Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::print ( std::ostream s) const
virtual

Print (ASCII) the histogram into the output stream.

bin contents and errors are printed for all bins including under and overflows

Implements Gaudi::HistogramBase.

Definition at line 281 of file Generic3D.h.

{
m_rep->Print("all");
return s;
}
template<typename INTERFACE, typename IMPLEMENTATION>
TObject* Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::representation ( ) const
inlinevirtual

ROOT object implementation.

Implements Gaudi::HistogramBase.

Definition at line 37 of file Generic3D.h.

{ return m_rep; }
template<typename INTERFACE, typename IMPLEMENTATION>
int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::rIndexX ( int  index) const
inline

Definition at line 71 of file Generic3D.h.

{ return m_xAxis.rIndex(index);}
template<typename INTERFACE, typename IMPLEMENTATION>
int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::rIndexY ( int  index) const
inline

Definition at line 72 of file Generic3D.h.

{ return m_yAxis.rIndex(index);}
template<typename INTERFACE, typename IMPLEMENTATION>
int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::rIndexZ ( int  index) const
inline

Definition at line 73 of file Generic3D.h.

{ return m_zAxis.rIndex(index);}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::rmsX ( ) const
inlinevirtual

The RMS of the IHistogram3D along the x axis.

Definition at line 156 of file Generic3D.h.

{ return m_rep->GetRMS( 1 ); }
template<typename INTERFACE, typename IMPLEMENTATION>
virtual double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::rmsY ( ) const
inlinevirtual

The RMS of the IHistogram3D along the y axis.

Definition at line 158 of file Generic3D.h.

{ return m_rep->GetRMS( 2 ); }
template<typename INTERFACE, typename IMPLEMENTATION>
virtual double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::rmsZ ( ) const
inlinevirtual

The RMS of the IHistogram3D along the z axis.

Definition at line 160 of file Generic3D.h.

{ return m_rep->GetRMS( 3 ); }
template<class INTERFACE , class IMPLEMENTATION >
bool Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::scale ( double  scaleFactor)
virtual

Scale the weights and the errors of all the IHistogram's bins (in-range and out-of-range ones) by a given scale factor.

Definition at line 275 of file Generic3D.h.

{
m_rep->Scale ( scaleFactor );
return true;
}
template<class INTERFACE , class IMPLEMENTATION >
bool Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::setName ( const std::string newName)

Sets the name of the object.

Definition at line 231 of file Generic3D.h.

{
m_rep->SetName(newName.c_str());
m_annotation.setValue( "Name", newName );
return true;
}
template<class INTERFACE , class IMPLEMENTATION >
bool Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::setTitle ( const std::string title)
virtual

Set the title of the object.

Definition at line 221 of file Generic3D.h.

{
m_rep->SetTitle(title.c_str());
if ( !annotation().addItem( "Title", title ) )
m_annotation.setValue( "Title" , title );
if ( !annotation().addItem( "title", title ) )
annotation().setValue( "title", title );
return true;
}
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::sumAllBinHeights ( ) const
virtual

Get the sum of all the bins heights (including underflow and overflow bin).

Definition at line 262 of file Generic3D.h.

{
return m_rep->GetSum();
}
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::sumBinHeights ( ) const
virtual

Get the sum of in range bin heights in the IProfile.

Definition at line 257 of file Generic3D.h.

{
return m_rep->GetSumOfWeights();
}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual double Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::sumExtraBinHeights ( ) const
inlinevirtual

Get the sum of the underflow and overflow bin height.

Definition at line 65 of file Generic3D.h.

template<typename INTERFACE, typename IMPLEMENTATION>
virtual std::string Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::title ( ) const
inlinevirtual

Get the title of the object.

Definition at line 44 of file Generic3D.h.

{ return m_annotation.value("Title");}
template<class INTERFACE , class IMPLEMENTATION >
std::ostream & Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::write ( std::ostream s) const
virtual

Write (ASCII) the histogram table into the output stream.

Implements Gaudi::HistogramBase.

Definition at line 291 of file Generic3D.h.

{
s << "\n3D Histogram Table: " << std::endl;
s << "BinX, BinY, BinZ, Height, Error " << std::endl;
for ( int i = 0; i < xAxis().bins(); ++i )
for ( int j = 0; j < yAxis().bins(); ++j )
for ( int k = 0; k < zAxis().bins(); ++k )
s << binMeanX( i, j, k ) << ", "
<< binMeanY( i, j, k ) << ", "
<< binMeanZ( i, j, k ) << ", "
<< binHeight( i, j, k ) << ", "
<< binError ( i, j, k ) << std::endl;
return s;
}
template<class INTERFACE , class IMPLEMENTATION >
int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::write ( const char *  file_name) const
virtual

Write (ASCII) the histogram table into a file.

Implements Gaudi::HistogramBase.

Definition at line 309 of file Generic3D.h.

{
TFile *f = TFile::Open(file_name,"RECREATE");
Int_t nbytes = m_rep->Write();
f->Close();
return nbytes;
}
template<typename INTERFACE, typename IMPLEMENTATION>
virtual const AIDA::IAxis& Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::xAxis ( ) const
inlinevirtual

Get the x axis of the IHistogram3D.

Definition at line 162 of file Generic3D.h.

{ return m_xAxis; }
template<typename INTERFACE, typename IMPLEMENTATION>
virtual const AIDA::IAxis& Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::yAxis ( ) const
inlinevirtual

Get the y axis of the IHistogram3D.

Definition at line 164 of file Generic3D.h.

{ return m_yAxis; }
template<typename INTERFACE, typename IMPLEMENTATION>
virtual const AIDA::IAxis& Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::zAxis ( ) const
inlinevirtual

Get the z axis of the IHistogram3D.

Definition at line 166 of file Generic3D.h.

{ return m_zAxis; }

Member Data Documentation

template<typename INTERFACE, typename IMPLEMENTATION>
AIDA::Annotation Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::m_annotation
mutableprotected

Object annotations.

Definition at line 211 of file Generic3D.h.

template<typename INTERFACE, typename IMPLEMENTATION>
std::string Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::m_classType
protected

Definition at line 215 of file Generic3D.h.

template<typename INTERFACE, typename IMPLEMENTATION>
IMPLEMENTATION* Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::m_rep
protected

Reference to underlying implementation.

Definition at line 213 of file Generic3D.h.

template<typename INTERFACE, typename IMPLEMENTATION>
int Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::m_sumEntries
protected

Definition at line 217 of file Generic3D.h.

template<typename INTERFACE, typename IMPLEMENTATION>
Gaudi::Axis Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::m_xAxis
protected

Definition at line 207 of file Generic3D.h.

template<typename INTERFACE, typename IMPLEMENTATION>
Gaudi::Axis Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::m_yAxis
protected

Definition at line 208 of file Generic3D.h.

template<typename INTERFACE, typename IMPLEMENTATION>
Gaudi::Axis Gaudi::Generic3D< INTERFACE, IMPLEMENTATION >::m_zAxis
protected

Definition at line 209 of file Generic3D.h.


The documentation for this class was generated from the following file:

Generated at Wed Dec 4 2013 14:33:20 for Gaudi Framework, version v24r2 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004