CMS 3D CMS Logo

List of all members | 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>

Inherits Histograms.

Public Member Functions

void Clear () override
 
void Fill (const double &x, const double &y) override
 
 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)
 
void Write () override
 
 ~HTH1D () override
 

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 185 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
HTH1D::~HTH1D ( )
inlineoverride

Definition at line 194 of file Histograms.h.

194 { delete tH1D_; }
TH1D * tH1D_
Definition: Histograms.h:207

Member Function Documentation

void HTH1D::Clear ( )
inlineoverride

Definition at line 201 of file Histograms.h.

201 { tH1D_->Clear(); }
TH1D * tH1D_
Definition: Histograms.h:207
void HTH1D::Fill ( const double &  x,
const double &  y 
)
inlineoverride

Definition at line 195 of file Histograms.h.

195 { tH1D_->Fill(x, y); }
TH1D * tH1D_
Definition: Histograms.h:207
TH1D* HTH1D::operator-> ( )
inline

Definition at line 204 of file Histograms.h.

204 { return tH1D_; }
TH1D * tH1D_
Definition: Histograms.h:207
virtual void HTH1D::SetXTitle ( const TString &  title)
inlinevirtual

Definition at line 202 of file Histograms.h.

202 { tH1D_->GetXaxis()->SetTitle(title); }
TH1D * tH1D_
Definition: Histograms.h:207
virtual void HTH1D::SetYTitle ( const TString &  title)
inlinevirtual

Definition at line 203 of file Histograms.h.

203 { tH1D_->GetYaxis()->SetTitle(title); }
TH1D * tH1D_
Definition: Histograms.h:207
void HTH1D::Write ( )
inlineoverride

Definition at line 196 of file Histograms.h.

196  {
197  if (histoDir_ != nullptr)
198  histoDir_->cd();
199  tH1D_->Write();
200  }
TH1D * tH1D_
Definition: Histograms.h:207

Member Data Documentation

TH1D* HTH1D::tH1D_
protected

Definition at line 207 of file Histograms.h.