CMS 3D CMS Logo

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

Inherits Histograms.

Public Member Functions

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

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 211 of file Histograms.h.

Constructor & Destructor Documentation

◆ HTProfile()

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 213 of file Histograms.h.

221  : Histograms(outputFile, name),
222  tProfile_(new TProfile(name + "Prof", title + " profile", xBins, xMin, xMax, yMin, yMax)) {}

◆ ~HTProfile()

HTProfile::~HTProfile ( )
inlineoverride

Definition at line 223 of file Histograms.h.

223 { delete tProfile_; }

References tProfile_.

Member Function Documentation

◆ Clear()

void HTProfile::Clear ( )
inlineoverride

Definition at line 230 of file Histograms.h.

230 { tProfile_->Clear(); }

References tProfile_.

◆ Fill()

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

Definition at line 224 of file Histograms.h.

224 { tProfile_->Fill(x, y); }

References tProfile_, x, and y.

◆ operator->()

TProfile* HTProfile::operator-> ( )
inline

Definition at line 233 of file Histograms.h.

233 { return tProfile_; }

References tProfile_.

◆ SetXTitle()

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

Definition at line 231 of file Histograms.h.

231 { tProfile_->GetXaxis()->SetTitle(title); }

References runGCPTkAlMap::title, and tProfile_.

◆ SetYTitle()

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

Definition at line 232 of file Histograms.h.

232 { tProfile_->GetYaxis()->SetTitle(title); }

References runGCPTkAlMap::title, and tProfile_.

◆ Write()

void HTProfile::Write ( )
inlineoverride

Definition at line 225 of file Histograms.h.

225  {
226  if (histoDir_ != nullptr)
227  histoDir_->cd();
228  tProfile_->Write();
229  }

References tProfile_.

Member Data Documentation

◆ tProfile_

TProfile* HTProfile::tProfile_
protected

Definition at line 236 of file Histograms.h.

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

DDAxes::y
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
HTProfile::tProfile_
TProfile * tProfile_
Definition: Histograms.h:236
photonAnalyzer_cfi.yMin
yMin
Definition: photonAnalyzer_cfi.py:86
DDAxes::x
photonAnalyzer_cfi.xMin
xMin
Definition: photonAnalyzer_cfi.py:82
download_sqlite_cfg.outputFile
outputFile
Definition: download_sqlite_cfg.py:5
multiplicitycorr_cfi.xBins
xBins
Definition: multiplicitycorr_cfi.py:5
multiplicitycorr_cfi.yMax
yMax
Definition: multiplicitycorr_cfi.py:6
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
multiplicitycorr_cfi.xMax
xMax
Definition: multiplicitycorr_cfi.py:5