Gaudi Framework, version v22r4

Home   Generated: Fri Sep 2 2011
Public Types | Public Member Functions | Protected Attributes

Gaudi::Generic2D< INTERFACE, IMPLEMENTATION > Class Template Reference

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

#include <GaudiPI/Generic2D.h>

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

List of all members.

Public Types

typedef Generic2D< INTERFACE,
IMPLEMENTATION > 
Base

Public Member Functions

 Generic2D ()
virtual ~Generic2D ()
 Destructor.
TObjectrepresentation () const
 ROOT object implementation.
virtual void adoptRepresentation (TObject *rep)
 Adopt ROOT histogram representation.
virtual std::string title () const
 Get the title of the object.
virtual bool setTitle (const std::string &title)
 Set the title of the object.
std::string name () const
 object name
bool setName (const std::string &newName)
 Set the name of the object.
virtual AIDA::IAnnotation & annotation ()
 Access annotation object.
virtual const AIDA::IAnnotation & annotation () const
 Access annotation object (cons)
virtual const AIDA::IAxis & xAxis () const
 Return the X axis.
virtual const AIDA::IAxis & yAxis () const
 Return the Y axis.
virtual int rIndexX (int index) const
 operator methods
virtual int rIndexY (int index) const
 operator methods
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 int extraEntries () const
 Get the number of entries in the underflow and overflow bins.
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.
virtual double binMeanX (int indexX, int indexY) const
 The weighted mean along x of a given bin.
virtual double binMeanY (int indexX, int indexY) const
 The weighted mean along y of a given bin.
virtual int binEntries (int indexX, int indexY) const
 The number of entries (ie the number of times fill was called for this bin).
virtual int binEntriesX (int indexX) const
 Equivalent to projectionX().binEntries(indexX).
virtual int binEntriesY (int indexY) const
 Equivalent to projectionY().binEntries(indexY).
virtual double binHeight (int indexX, int indexY) const
 Total height of the corresponding bin (ie the sum of the weights in this bin).
virtual double binHeightX (int indexX) const
 Equivalent to projectionX().binHeight(indexX).
virtual double binHeightY (int indexY) const
 Equivalent to projectionY().binHeight(indexY).
virtual double binError (int indexX, int indexY) const
 The error on this bin.
virtual double binRms (int indexX, int indexY) const
 The spread (RMS) of this bin.
virtual double meanX () const
 Returns the mean of the profile, as calculated on filling-time projected on the X axis.
virtual double meanY () const
 Returns the mean of the profile, as calculated on filling-time projected on the Y axis.
virtual double rmsX () const
 Returns the rms of the profile as calculated on filling-time projected on the X axis.
virtual double rmsY () const
 Returns the rms of the profile as calculated on filling-time projected on the Y axis.
virtual int coordToIndexX (double coordX) const
 Convenience method, equivalent to xAxis().coordToIndex(coord).
virtual int coordToIndexY (double coordY) const
 Convenience method, equivalent to yAxis().coordToIndex(coord).
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 &h)
 Modifies this profile by adding the contents of profile to it.
bool reset ()
void * cast (const std::string &className) const
 Introspection method.
const std::stringuserLevelClassType () const
 The AIDA user-level unterface leaf class type.
virtual int dimension () const
 Get the Histogram's dimension.
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 * cast (const std::string &className) const
template<>
int binEntries (int indexX, int indexY) const
template<>
void adoptRepresentation (TObject *rep)
 Adopt ROOT histogram representation.
template<>
void * cast (const std::string &className) const
template<>
int binEntries (int idX, int idY) const
template<>
void adoptRepresentation (TObject *rep)
 Adopt ROOT histogram representation.

Protected Attributes

Axis m_xAxis
 X axis member.
Axis m_yAxis
 Y axis member.
AIDA::Annotation m_annotation
 Object annotations.
IMPLEMENTATION * m_rep
 Reference to underlying implementation.
std::string m_classType
 class type
int m_sumEntries
 cache sumEntries (allEntries) when setting contents since Root can't compute by himself

Detailed Description

template<class INTERFACE, class IMPLEMENTATION>
class Gaudi::Generic2D< 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 30 of file Generic2D.h.


Member Typedef Documentation

template<class INTERFACE, class IMPLEMENTATION>
typedef Generic2D<INTERFACE,IMPLEMENTATION> Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::Base

Definition at line 32 of file Generic2D.h.


Constructor & Destructor Documentation

template<class INTERFACE, class IMPLEMENTATION>
Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::Generic2D (  ) [inline]

Definition at line 34 of file Generic2D.h.

: m_rep(0) {}
template<class INTERFACE, class IMPLEMENTATION>
virtual Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::~Generic2D (  ) [inline, virtual]

Destructor.

Definition at line 37 of file Generic2D.h.

{  delete m_rep;    }

Member Function Documentation

template<class INTERFACE, class IMPLEMENTATION >
bool Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::add ( const INTERFACE &  h ) [virtual]

Modifies this profile by adding the contents of profile to it.

Definition at line 286 of file Generic2D.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<class INTERFACE, class IMPLEMENTATION>
virtual void Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::adoptRepresentation ( TObject rep ) [virtual]

Adopt ROOT histogram representation.

Implements Gaudi::HistogramBase.

template<>
void Gaudi::Generic2D< AIDA::IHistogram2D, TH2D >::adoptRepresentation ( TObject rep ) [virtual]

Adopt ROOT histogram representation.

Implements Gaudi::HistogramBase.

Definition at line 105 of file H2D.cpp.

                                                                          {
    TH2D* imp = dynamic_cast<TH2D*>(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);
      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<>
void Gaudi::Generic2D< AIDA::IProfile2D, TProfile2D >::adoptRepresentation ( TObject rep ) [virtual]

Adopt ROOT histogram representation.

Implements Gaudi::HistogramBase.

Definition at line 71 of file P2D.cpp.

                                                                             {
    TProfile2D* imp = dynamic_cast<TProfile2D*>(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);
      setTitle(m_rep->GetTitle());
      return;
    }
    throw std::runtime_error("Cannot adopt native histogram representation.");
  }
template<class INTERFACE , class IMPLEMENTATION >
int Gaudi::Generic2D< 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 173 of file Generic2D.h.

                                                                {
    return int(m_rep->GetEntries());
  }
template<class INTERFACE, class IMPLEMENTATION>
virtual const AIDA::IAnnotation& Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::annotation (  ) const [inline, virtual]

Access annotation object (cons)

Definition at line 54 of file Generic2D.h.

{ return m_annotation;           }
template<class INTERFACE, class IMPLEMENTATION>
virtual AIDA::IAnnotation& Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::annotation (  ) [inline, virtual]

Access annotation object.

Definition at line 52 of file Generic2D.h.

{ return m_annotation;           }
template<class INTERFACE, class IMPLEMENTATION>
virtual int Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::binEntries ( int  indexX,
int  indexY 
) const [virtual]

The number of entries (ie the number of times fill was called for this bin).

template<>
int Gaudi::Generic2D< IHistogram2D, TH2D >::binEntries ( int  indexX,
int  indexY 
) const

Definition at line 98 of file H2D.cpp.

                                                                          {
    if (binHeight(indexX, indexY)<=0) return 0;
    double xx =  binHeight(indexX, indexY)/binError(indexX, indexY);
    return int(xx*xx+0.5);
  }
template<>
int Gaudi::Generic2D< AIDA::IProfile2D, TProfile2D >::binEntries ( int  idX,
int  idY 
) const

Definition at line 65 of file P2D.cpp.

                                                                               {
    int rBin = m_rep->GetBin(rIndexX(idX),rIndexY(idY));
    return int(m_rep->GetBinEntries(rBin)+0.5);
  }
template<class INTERFACE , class IMPLEMENTATION >
int Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::binEntriesX ( int  indexX ) const [virtual]

Equivalent to projectionX().binEntries(indexX).

Definition at line 213 of file Generic2D.h.

                                                                        {
    int n = 0;
    for (int iY = -2; iY < yAxis().bins(); ++iY)
      n += binEntries(index,iY);
    return n;
  }
template<class INTERFACE , class IMPLEMENTATION >
int Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::binEntriesY ( int  indexY ) const [virtual]

Equivalent to projectionY().binEntries(indexY).

Definition at line 221 of file Generic2D.h.

                                                                         {
    int n = 0;
    for (int iX = -2; iX < xAxis().bins(); ++iX)
      n += binEntries(iX,index);
    return n;
  }
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::binError ( int  indexX,
int  indexY 
) const [virtual]

The error on this bin.

Definition at line 251 of file Generic2D.h.

                                                                                   {
    return m_rep->GetBinError ( rIndexX(indexX), rIndexY(indexY ) );
  }
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::binHeight ( int  indexX,
int  indexY 
) const [virtual]

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

Definition at line 229 of file Generic2D.h.

                                                                                       {
    return m_rep->GetBinContent ( rIndexX(indexX), rIndexY(indexY) );
  }
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::binHeightX ( int  indexX ) const [virtual]

Equivalent to projectionX().binHeight(indexX).

Definition at line 234 of file Generic2D.h.

                                                                         {
    double s = 0;
    for (int iY = -2; iY < yAxis().bins(); ++iY) {
      s += binHeight(index,iY);
    }
    return s;
  }
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::binHeightY ( int  indexY ) const [virtual]

Equivalent to projectionY().binHeight(indexY).

Definition at line 243 of file Generic2D.h.

                                                                         {
    double s = 0;
    for (int iX = -2; iX < xAxis().bins(); ++iX)
      s += binHeight(iX,index);
    return s;
  }
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::binMeanX ( int  indexX,
int  indexY 
) const [virtual]

The weighted mean along x of a given bin.

Definition at line 203 of file Generic2D.h.

                                                                            {
    return (m_rep->GetXaxis())->GetBinCenter( rIndexX(indexX) );
  }
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::binMeanY ( int  indexX,
int  indexY 
) const [virtual]

The weighted mean along y of a given bin.

Definition at line 208 of file Generic2D.h.

                                                                            {
    return (m_rep->GetYaxis())->GetBinCenter( rIndexY(indexY) );
  }
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::binRms ( int  indexX,
int  indexY 
) const [virtual]

The spread (RMS) of this bin.

Definition at line 198 of file Generic2D.h.

                                                                                {
    return m_rep->GetBinError ( rIndexX(indexX), rIndexY(indexY) );
  }
template<class INTERFACE, class IMPLEMENTATION>
void* Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::cast ( const std::string className ) const

Introspection method.

template<>
void * Gaudi::Generic2D< IHistogram2D, TH2D >::cast ( const std::string className ) const

Definition at line 89 of file H2D.cpp.

                                                                             {
    if (className == "AIDA::IHistogram2D")
      return (IHistogram2D*)this;
    else if (className == "AIDA::IHistogram")
      return (IHistogram*)this;
    return 0;
  }
template<>
void * Gaudi::Generic2D< AIDA::IProfile2D, TProfile2D >::cast ( const std::string className ) const

Definition at line 54 of file P2D.cpp.

                                                                                    {
    if (className == "AIDA::IProfile2D")
      return const_cast<AIDA::IProfile2D*>((AIDA::IProfile2D*)this);
    else if (className == "AIDA::IProfile")
      return const_cast<AIDA::IProfile*>((AIDA::IProfile*)this);
    else if (className == "AIDA::IBaseHistogram")
      return const_cast<AIDA::IBaseHistogram*>((AIDA::IBaseHistogram*)this);
    return 0;
  }
template<class INTERFACE , class IMPLEMENTATION >
int Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::coordToIndexX ( double  coordX ) const [virtual]

Convenience method, equivalent to xAxis().coordToIndex(coord).

Definition at line 276 of file Generic2D.h.

                                                                              {
    return xAxis().coordToIndex(coord);
  }
template<class INTERFACE , class IMPLEMENTATION >
int Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::coordToIndexY ( double  coordY ) const [virtual]

Convenience method, equivalent to yAxis().coordToIndex(coord).

Definition at line 281 of file Generic2D.h.

                                                                              {
    return yAxis().coordToIndex(coord);
  }
template<class INTERFACE, class IMPLEMENTATION>
virtual int Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::dimension (  ) const [inline, virtual]

Get the Histogram's dimension.

Definition at line 127 of file Generic2D.h.

{ return 2; }
template<class INTERFACE , class IMPLEMENTATION >
int Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::entries (  ) const [virtual]

Get the number or all the entries.

Definition at line 168 of file Generic2D.h.

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

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

Definition at line 305 of file Generic2D.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<class INTERFACE , class IMPLEMENTATION >
int Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::extraEntries (  ) const [virtual]

Get the number of entries in the underflow and overflow bins.

Definition at line 296 of file Generic2D.h.

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

Get the maximum height of the in-range bins.

Definition at line 183 of file Generic2D.h.

                                                                   {
    return m_rep->GetMaximum();
  }
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::meanX (  ) const [virtual]

Returns the mean of the profile, as calculated on filling-time projected on the X axis.

Definition at line 256 of file Generic2D.h.

                                                           {
    return m_rep->GetMean(1);
  }
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::meanY (  ) const [virtual]

Returns the mean of the profile, as calculated on filling-time projected on the Y axis.

Definition at line 261 of file Generic2D.h.

                                                           {
    return m_rep->GetMean(2);
  }
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::minBinHeight (  ) const [virtual]

Get the minimum height of the in-range bins.

Definition at line 178 of file Generic2D.h.

                                                                   {
    return m_rep->GetMinimum();
  }
template<class INTERFACE, class IMPLEMENTATION>
std::string Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::name (  ) const [inline]

object name

Definition at line 48 of file Generic2D.h.

{ return m_annotation.value("Name"); }
template<class INTERFACE , class IMPLEMENTATION >
std::ostream & Gaudi::Generic2D< 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 326 of file Generic2D.h.

  {
    m_rep->Print("all");
    return s;
  }
template<class INTERFACE, class IMPLEMENTATION>
TObject* Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::representation (  ) const [inline, virtual]

ROOT object implementation.

Implements Gaudi::HistogramBase.

Definition at line 40 of file Generic2D.h.

{ return m_rep;                       }
template<class INTERFACE , class IMPLEMENTATION >
bool Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::reset (  )

Reimplemented in Gaudi::Histogram2D.

Definition at line 319 of file Generic2D.h.

                                                       {
    m_sumEntries = 0;
    m_rep->Reset ( );
    return true;
  }
template<class INTERFACE, class IMPLEMENTATION>
virtual int Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::rIndexX ( int  index ) const [inline, virtual]

operator methods

Definition at line 61 of file Generic2D.h.

{ return m_xAxis.rIndex(index);  }
template<class INTERFACE, class IMPLEMENTATION>
virtual int Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::rIndexY ( int  index ) const [inline, virtual]

operator methods

Definition at line 63 of file Generic2D.h.

{ return m_yAxis.rIndex(index);  }
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::rmsX (  ) const [virtual]

Returns the rms of the profile as calculated on filling-time projected on the X axis.

Definition at line 266 of file Generic2D.h.

                                                          {
    return m_rep->GetRMS(1);
  }
template<class INTERFACE , class IMPLEMENTATION >
double Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::rmsY (  ) const [virtual]

Returns the rms of the profile as calculated on filling-time projected on the Y axis.

Definition at line 271 of file Generic2D.h.

                                                          {
    return m_rep->GetRMS(2);
  }
template<class INTERFACE , class IMPLEMENTATION >
bool Gaudi::Generic2D< 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 313 of file Generic2D.h.

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

Set the name of the object.

Definition at line 161 of file Generic2D.h.

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

Set the title of the object.

Definition at line 151 of file Generic2D.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::Generic2D< INTERFACE, IMPLEMENTATION >::sumAllBinHeights (  ) const [virtual]

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

Definition at line 193 of file Generic2D.h.

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

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

Definition at line 188 of file Generic2D.h.

                                                                    {
    return m_rep->GetSumOfWeights();
  }
template<class INTERFACE, class IMPLEMENTATION>
virtual double Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::sumExtraBinHeights (  ) const [inline, virtual]

Get the sum of the underflow and overflow bin height.

Definition at line 76 of file Generic2D.h.

template<class INTERFACE, class IMPLEMENTATION>
virtual std::string Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::title (  ) const [inline, virtual]

Get the title of the object.

Definition at line 44 of file Generic2D.h.

{  return m_annotation.value( "Title" );    }
template<class INTERFACE, class IMPLEMENTATION>
const std::string& Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::userLevelClassType (  ) const [inline]

The AIDA user-level unterface leaf class type.

Definition at line 125 of file Generic2D.h.

{ return m_classType; }
template<class INTERFACE , class IMPLEMENTATION >
std::ostream & Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::write ( std::ostream s ) const [virtual]

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

Implements Gaudi::HistogramBase.

Definition at line 335 of file Generic2D.h.

  {
    s << std::endl << "2D Histogram Table: " << std::endl;
    s << "BinX, BinY, Height, Error " << std::endl;
    for ( int i = 0; i < xAxis().bins(); ++i )  {
      for ( int j = 0; j < yAxis().bins(); ++j )  {
        s << binMeanX( i, j )    << ", "
                << binMeanY( i, j )    << ", "
                << binHeight( i, j ) << ", "
                << binError ( i, j ) << std::endl;
      }
    }
    s << std::endl;
    return s;
  }
template<class INTERFACE , class IMPLEMENTATION >
int Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::write ( const char *  file_name ) const [virtual]

Write (ASCII) the histogram table into a file.

Implements Gaudi::HistogramBase.

Definition at line 353 of file Generic2D.h.

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

Return the X axis.

Definition at line 57 of file Generic2D.h.

{ return m_xAxis;                }
template<class INTERFACE, class IMPLEMENTATION>
virtual const AIDA::IAxis& Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::yAxis (  ) const [inline, virtual]

Return the Y axis.

Definition at line 59 of file Generic2D.h.

{ return m_yAxis;                }

Member Data Documentation

template<class INTERFACE, class IMPLEMENTATION>
AIDA::Annotation Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::m_annotation [mutable, protected]

Object annotations.

Definition at line 141 of file Generic2D.h.

template<class INTERFACE, class IMPLEMENTATION>
std::string Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::m_classType [protected]

class type

Definition at line 145 of file Generic2D.h.

template<class INTERFACE, class IMPLEMENTATION>
IMPLEMENTATION* Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::m_rep [protected]

Reference to underlying implementation.

Definition at line 143 of file Generic2D.h.

template<class INTERFACE, class IMPLEMENTATION>
int Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::m_sumEntries [protected]

cache sumEntries (allEntries) when setting contents since Root can't compute by himself

Definition at line 147 of file Generic2D.h.

template<class INTERFACE, class IMPLEMENTATION>
Axis Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::m_xAxis [protected]

X axis member.

Definition at line 137 of file Generic2D.h.

template<class INTERFACE, class IMPLEMENTATION>
Axis Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::m_yAxis [protected]

Y axis member.

Definition at line 139 of file Generic2D.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Fri Sep 2 2011 16:25:54 for Gaudi Framework, version v22r4 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004