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::HTH1D ( TFile *  outputFile,
const TString &  name,
const TString &  title,
const int  xBins,
const double &  xMin,
const double &  xMax 
)
inline

Definition at line 187 of file Histograms.h.

193  : Histograms(outputFile, name), tH1D_(new TH1D(name, title, xBins, xMin, xMax)) {}

◆ ~HTH1D()

HTH1D::~HTH1D ( )
inlineoverride

Definition at line 194 of file Histograms.h.

194 { delete tH1D_; }

References tH1D_.

Member Function Documentation

◆ Clear()

void HTH1D::Clear ( )
inlineoverride

Definition at line 201 of file Histograms.h.

201 { tH1D_->Clear(); }

References tH1D_.

◆ Fill()

void HTH1D::Fill ( const double &  x,
const double &  y 
)
inlineoverride

Definition at line 195 of file Histograms.h.

195 { tH1D_->Fill(x, y); }

References tH1D_, x, and y.

◆ operator->()

TH1D* HTH1D::operator-> ( )
inline

Definition at line 204 of file Histograms.h.

204 { return tH1D_; }

References tH1D_.

◆ SetXTitle()

virtual void HTH1D::SetXTitle ( const TString &  title)
inlinevirtual

Definition at line 202 of file Histograms.h.

202 { tH1D_->GetXaxis()->SetTitle(title); }

References tH1D_, and runGCPTkAlMap::title.

◆ SetYTitle()

virtual void HTH1D::SetYTitle ( const TString &  title)
inlinevirtual

Definition at line 203 of file Histograms.h.

203 { tH1D_->GetYaxis()->SetTitle(title); }

References tH1D_, and runGCPTkAlMap::title.

◆ Write()

void HTH1D::Write ( )
inlineoverride

Definition at line 196 of file Histograms.h.

196  {
197  if (histoDir_ != nullptr)
198  histoDir_->cd();
199  tH1D_->Write();
200  }

References tH1D_.

Member Data Documentation

◆ tH1D_

TH1D* HTH1D::tH1D_
protected

Definition at line 207 of file Histograms.h.

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

DDAxes::y
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
DDAxes::x
photonAnalyzer_cfi.xMin
xMin
Definition: photonAnalyzer_cfi.py:82
download_sqlite_cfg.outputFile
outputFile
Definition: download_sqlite_cfg.py:5
HTH1D::tH1D_
TH1D * tH1D_
Definition: Histograms.h:207
multiplicitycorr_cfi.xBins
xBins
Definition: multiplicitycorr_cfi.py:5
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
multiplicitycorr_cfi.xMax
xMax
Definition: multiplicitycorr_cfi.py:5