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 213 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

◆ ~HTProfile()

HTProfile::~HTProfile ( )
inlineoverride

Definition at line 225 of file Histograms.h.

References tProfile_.

225 { delete tProfile_; }
TProfile * tProfile_
Definition: Histograms.h:238

Member Function Documentation

◆ Clear()

void HTProfile::Clear ( )
inlineoverride

Definition at line 232 of file Histograms.h.

References tProfile_.

232 { tProfile_->Clear(); }
TProfile * tProfile_
Definition: Histograms.h:238

◆ Fill()

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

Definition at line 226 of file Histograms.h.

References tProfile_, x, and y.

226 { tProfile_->Fill(x, y); }
TProfile * tProfile_
Definition: Histograms.h:238

◆ operator->()

TProfile* HTProfile::operator-> ( )
inline

Definition at line 235 of file Histograms.h.

References tProfile_.

235 { return tProfile_; }
TProfile * tProfile_
Definition: Histograms.h:238

◆ SetXTitle()

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

Definition at line 233 of file Histograms.h.

References runGCPTkAlMap::title, and tProfile_.

233 { tProfile_->GetXaxis()->SetTitle(title); }
TProfile * tProfile_
Definition: Histograms.h:238

◆ SetYTitle()

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

Definition at line 234 of file Histograms.h.

References runGCPTkAlMap::title, and tProfile_.

234 { tProfile_->GetYaxis()->SetTitle(title); }
TProfile * tProfile_
Definition: Histograms.h:238

◆ Write()

void HTProfile::Write ( )
inlineoverride

Definition at line 227 of file Histograms.h.

References tProfile_.

227  {
228  if (histoDir_ != nullptr)
229  histoDir_->cd();
230  tProfile_->Write();
231  }
TProfile * tProfile_
Definition: Histograms.h:238

Member Data Documentation

◆ tProfile_

TProfile* HTProfile::tProfile_
protected

Definition at line 238 of file Histograms.h.

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