Gaudi Framework, version v21r4

Home   Generated: 7 Sep 2009

Gaudi::Profile1D Class Reference

#include <P1D.h>

Inheritance diagram for Gaudi::Profile1D:

Inheritance graph
[legend]
Collaboration diagram for Gaudi::Profile1D:

Collaboration graph
[legend]

List of all members.


Detailed Description

AIDA implementation for 1 D profiles using ROOT TProfile.

Author:
M.Frank

Definition at line 20 of file P1D.h.


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 CLIDclID () const
 Retrieve reference to class defininition identifier.

Static Public Member Functions

static const CLIDclassID ()
 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)

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 64 of file P1D.cpp.

00064                           {
00065   m_rep = new TProfile();
00066   init("",false);
00067 }

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

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

Definition at line 69 of file P1D.cpp.

00069                                         {
00070   m_rep = rep;
00071   init(m_rep->GetTitle());
00072 }

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 74 of file P1D.cpp.

00074                                                                       {
00075   m_classType = "IProfile1D";
00076   setTitle(title);
00077   setName(title);
00078   if ( initialize_axis )  {
00079     axis().initialize(m_rep->GetXaxis(),false);
00080   }
00081   //m_rep->SetErrorOption("s"); 
00082   m_rep->SetDirectory(0);
00083   m_sumEntries = 0;
00084 }

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 99 of file P1D.cpp.

00099                                                                {
00100   (weight == 1.) ? m_rep->Fill(x,y) : m_rep->Fill(x,y,weight);
00101   return true;
00102 }

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

Definition at line 86 of file P1D.cpp.

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

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:

Generated at Mon Sep 7 18:25:56 2009 for Gaudi Framework, version v21r4 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004