Gaudi Framework, version v23r0

Home   Generated: Mon Jan 30 2012
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions

Gaudi::Profile1D Class Reference

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

#include <P1D.h>

Inheritance diagram for Gaudi::Profile1D:
Inheritance graph
[legend]
Collaboration diagram for Gaudi::Profile1D:
Collaboration graph
[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 74 of file P1D.cpp.

                          {
  m_rep = new TProfile();
  init("",false);
}
Gaudi::Profile1D::Profile1D ( TProfile *  rep )

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

Definition at line 79 of file P1D.cpp.

                                        {
  m_rep = rep;
  init(m_rep->GetTitle());
}
virtual Gaudi::Profile1D::~Profile1D (  ) [inline, virtual]

Destructor.

Definition at line 30 of file P1D.h.

{  }

Member Function Documentation

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.

{ return CLID_ProfileH; }
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.

{ return classID(); }
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 114 of file P1D.cpp.

                                                               {
  (weight == 1.) ? m_rep->Fill(x,y) : m_rep->Fill(x,y,weight);
  return true;
}
void Gaudi::Profile1D::init ( const std::string &  title,
bool  initialize_axis = true 
) [private]

Definition at line 84 of file P1D.cpp.

                                                                      {
  m_classType = "IProfile1D";
  setTitle(title);
  setName(title);
  if ( initialize_axis )  {
    axis().initialize(m_rep->GetXaxis(),false);
  }
  //m_rep->SetErrorOption("s");
  m_rep->SetDirectory(0);
  m_sumEntries = 0;
}
bool Gaudi::Profile1D::setBinContents ( int  i,
int  entries,
double  height,
double  error,
double  spread,
double  centre 
) [virtual]

Definition at line 96 of file P1D.cpp.

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

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

Generated at Mon Jan 30 2012 13:53:28 for Gaudi Framework, version v23r0 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004