CMS 3D CMS Logo

Public Member Functions | Protected Attributes

HTProfile Class Reference

A wrapper for the TProfile histogram to allow it to be put inside the same map as all the other classes in this file. More...

#include <Histograms.h>

Inheritance diagram for HTProfile:
Histograms

List of all members.

Public Member Functions

virtual void Clear ()
virtual void Fill (const double &x, const double &y)
 HTProfile (TFile *outputFile, const TString &name, const TString &title, const int xBins, const double &xMin, const double &xMax, const double &yMin, const double &yMax)
TProfile * operator-> ()
virtual void SetXTitle (const TString &title)
virtual void SetYTitle (const TString &title)
virtual void Write ()
 ~HTProfile ()

Protected Attributes

TProfile * tProfile_

Detailed Description

A wrapper for the TProfile histogram to allow it to be put inside the same map as all the other classes in this file.

Definition at line 187 of file Histograms.h.


Constructor & Destructor Documentation

HTProfile::HTProfile ( TFile *  outputFile,
const TString &  name,
const TString &  title,
const int  xBins,
const double &  xMin,
const double &  xMax,
const double &  yMin,
const double &  yMax 
) [inline]

Definition at line 190 of file Histograms.h.

                                                        : Histograms(outputFile, name),
                                                          tProfile_( new TProfile(name+"Prof", title+" profile", xBins, xMin, xMax, yMin, yMax) ) {}
HTProfile::~HTProfile ( ) [inline]

Definition at line 194 of file Histograms.h.

References tProfile_.

               {
    delete tProfile_;
  }

Member Function Documentation

virtual void HTProfile::Clear ( ) [inline, virtual]

Implements Histograms.

Definition at line 204 of file Histograms.h.

References tProfile_.

                       {
    tProfile_->Clear();
  }
virtual void HTProfile::Fill ( const double &  x,
const double &  y 
) [inline, virtual]

Reimplemented from Histograms.

Definition at line 197 of file Histograms.h.

References tProfile_.

                                                          {
    tProfile_->Fill(x,y);
  }
TProfile* HTProfile::operator-> ( ) [inline]

Definition at line 213 of file Histograms.h.

References tProfile_.

{ return tProfile_; }
virtual void HTProfile::SetXTitle ( const TString &  title) [inline, virtual]

Definition at line 207 of file Histograms.h.

References tProfile_.

                                                {
    tProfile_->GetXaxis()->SetTitle(title);
  }
virtual void HTProfile::SetYTitle ( const TString &  title) [inline, virtual]

Definition at line 210 of file Histograms.h.

References tProfile_.

                                                {
    tProfile_->GetYaxis()->SetTitle(title);
  }
virtual void HTProfile::Write ( ) [inline, virtual]

Implements Histograms.

Definition at line 200 of file Histograms.h.

References Histograms::histoDir_, and tProfile_.

                       {
    if(histoDir_ != 0) histoDir_->cd();
    tProfile_->Write();
  }

Member Data Documentation

TProfile* HTProfile::tProfile_ [protected]

Definition at line 215 of file Histograms.h.

Referenced by Clear(), Fill(), operator->(), SetXTitle(), SetYTitle(), Write(), and ~HTProfile().