CMS 3D CMS Logo

Public Member Functions | Protected Attributes

HTH1D Class Reference

A wrapper for the TH1D 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 HTH1D:
Histograms

List of all members.

Public Member Functions

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

Protected Attributes

TH1D * tH1D_

Detailed Description

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

Definition at line 173 of file Histograms.h.


Constructor & Destructor Documentation

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

Definition at line 176 of file Histograms.h.

                                                                     : Histograms(outputFile, name),
                                                                       tH1D_( new TH1D(name, title, xBins, xMin, xMax) ) {}
HTH1D::~HTH1D ( ) [inline]

Definition at line 179 of file Histograms.h.

References tH1D_.

           {
    delete tH1D_;
  }

Member Function Documentation

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

Implements Histograms.

Definition at line 189 of file Histograms.h.

References tH1D_.

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

Reimplemented from Histograms.

Definition at line 182 of file Histograms.h.

References tH1D_.

                                                          {
    tH1D_->Fill(x, y);
  }
TH1D* HTH1D::operator-> ( ) [inline]

Definition at line 198 of file Histograms.h.

References tH1D_.

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

Definition at line 192 of file Histograms.h.

References tH1D_.

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

Definition at line 195 of file Histograms.h.

References tH1D_.

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

Implements Histograms.

Definition at line 185 of file Histograms.h.

References Histograms::histoDir_, and tH1D_.

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

Member Data Documentation

TH1D* HTH1D::tH1D_ [protected]

Definition at line 200 of file Histograms.h.

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