| # Gaudi Framework, version v21r10p1 |

Home |  | Generated: 29 Jul 2010

# Gaudi::Profile1D Class Reference

AIDA implementation for 1 D profiles using ROOT TProfile. More...

`#include <P1D.h>`

Inheritance diagram for Gaudi::Profile1D:

[legend]
Collaboration diagram for Gaudi::Profile1D:

[legend]

List of all members.

## Public Member Functions
| Profile1D ()
| Default Constructor.
| Profile1D (TProfile *rep)
| Standard constructor with initialization. The histogram representation will be adopted.
virtual | ~Profile1D ()
| Destructor.
virtual bool | fill (double x, double y, double weight=1.)
| Fill the Profile1D with a value and the corresponding weight.
virtual bool | setBinContents (int i, int entries, double height, double error, double spread, double centre)
virtual const CLID & | clID () const
| Retrieve reference to class defininition identifier.
## Static Public Member Functions
static const CLID & | classID ()
| Retrieve reference to class definition structure (static access).
## Private Types
typedef AIDA::IAnnotation | IAnnotation
## Private Member Functions
void | init (const std::string &title, bool initialize_axis=true)

## Detailed Description

AIDA implementation for 1 D profiles using ROOT TProfile.

Author:
  M.Frank

Definition at line 20 of file P1D.h.

## Member Typedef Documentation

typedef AIDA::IAnnotation Gaudi::Profile1D::IAnnotation`[private]`

Definition at line 21 of file P1D.h.

## Constructor & Destructor Documentation

Gaudi::Profile1D::Profile1D | ( |  | ) |

Default Constructor.

Definition at line 70 of file P1D.cpp.

    00070                           {
    00071   m_rep = new TProfile();
    00072   init("",false);
    00073 }

Gaudi::Profile1D::Profile1D | ( | TProfile * | rep | ) |

Standard constructor with initialization. The histogram representation will be adopted.

Definition at line 75 of file P1D.cpp.

    00075                                         {
    00076   m_rep = rep;
    00077   init(m_rep->GetTitle());
    00078 }

virtual Gaudi::Profile1D::~Profile1D | ( |  | ) | `[inline, virtual]`

Destructor.

Definition at line 30 of file P1D.h.

    00030 {  }

## Member Function Documentation

void Gaudi::Profile1D::init | ( | const std::string & | title,
|  | bool | initialize_axis = `true` |
| ) |  |  | `[private]`

Definition at line 80 of file P1D.cpp.

    00080                                                                       {
    00081   m_classType = "IProfile1D";
    00082   setTitle(title);
    00083   setName(title);
    00084   if ( initialize_axis )  {
    00085     axis().initialize(m_rep->GetXaxis(),false);
    00086   }
    00087   //m_rep->SetErrorOption("s");
    00088   m_rep->SetDirectory(0);
    00089   m_sumEntries = 0;
    00090 }

bool Gaudi::Profile1D::fill | ( | double | x,
|  | double | y,
|  | double | weight = `1.` |
| ) |  |  | `[virtual]`

Fill the Profile1D with a value and the corresponding weight.

Definition at line 110 of file P1D.cpp.

    00110                                                                {
    00111   (weight == 1.) ? m_rep->Fill(x,y) : m_rep->Fill(x,y,weight);
    00112   return true;
    00113 }

bool Gaudi::Profile1D::setBinContents | ( | int | i,
|  | int | entries,
|  | double | height,
|  | double | error,
|  | double | spread,
|  | double | centre |
| ) |  |  | `[virtual]`

Definition at line 92 of file P1D.cpp.

    00092                                                                                                                           {
    00093   m_rep->SetBinEntries(rIndex(i), entries );
    00094   // set content takes in root height * entries
    00095   m_rep->SetBinContent(rIndex(i), height*entries );
    00096   // set error takes sqrt of bin sum(w*y**2)
    00097   double sumwy2Bin = ( spread*spread + height*height )*entries;
    00098   m_rep->SetBinError(rIndex(i), sqrt(sumwy2Bin) );
    00099   m_sumEntries += entries;
    00100   // not very efficient (but do evey bin since root cannot figure out by himself)
    00101   m_rep->SetEntries(m_sumEntries);
    00102   return true;
    00103 }

virtual const CLID& Gaudi::Profile1D::clID | ( |  | ) | const`[inline, virtual]`

Retrieve reference to class defininition identifier.

Reimplemented from DataObject.

Definition at line 35 of file P1D.h.

    00035 { return Gaudi::Profile1D::classID(); }

static const CLID& Gaudi::Profile1D::classID | ( |  | ) | `[inline, static]`

Retrieve reference to class definition structure (static access).

Retrieve Pointer to class definition structure.

Reimplemented from DataObject.

Definition at line 36 of file P1D.h.

    00036 { return CLID_ProfileH; }

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r10p1/GaudiSvc/src/HistogramSvc/P1D.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r10p1/GaudiSvc/src/HistogramSvc/P1D.cpp