ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
GetAmountHisto1D Struct Reference

#include <egammaLayerRecalibTool.h>

Inheritance diagram for GetAmountHisto1D:
Collaboration diagram for GetAmountHisto1D:

Public Member Functions

 GetAmountHisto1D (const TH1 &histo)
 
 GetAmountHisto1D (const GetAmountHisto1D &oth)
 
GetAmountHisto1Doperator= (const GetAmountHisto1D &oth)
 
virtual GetAmountHisto1Dclone () const
 
virtual float operator() (const StdCalibrationInputs &input) const
 

Protected Attributes

std::unique_ptr< TH1 > m_histo
 

Detailed Description

Definition at line 134 of file egammaLayerRecalibTool.h.

Constructor & Destructor Documentation

◆ GetAmountHisto1D() [1/2]

GetAmountHisto1D::GetAmountHisto1D ( const TH1 &  histo)
inline

Definition at line 136 of file egammaLayerRecalibTool.h.

136 : m_histo(static_cast<TH1*>(histo.Clone())) { m_histo->SetDirectory(nullptr); };

◆ GetAmountHisto1D() [2/2]

GetAmountHisto1D::GetAmountHisto1D ( const GetAmountHisto1D oth)
inline

Definition at line 137 of file egammaLayerRecalibTool.h.

137 : m_histo(static_cast<TH1*>(oth.m_histo->Clone())) { m_histo->SetDirectory(nullptr); };

Member Function Documentation

◆ clone()

virtual GetAmountHisto1D* GetAmountHisto1D::clone ( ) const
inlinevirtual

Implements GetAmountBase.

Reimplemented in GetAmountHisto1DErrorDown, GetAmountHisto1DErrorUp, GetAmountHisto1DDown, and GetAmountHisto1DUp.

Definition at line 146 of file egammaLayerRecalibTool.h.

146 { return new GetAmountHisto1D(*this); };

◆ operator()()

float GetAmountHisto1D::operator() ( const StdCalibrationInputs input) const
virtual

Implements GetAmountBase.

Reimplemented in GetAmountHisto1DErrorDown, GetAmountHisto1DErrorUp, GetAmountHisto1DDown, and GetAmountHisto1DUp.

Definition at line 55 of file egammaLayerRecalibTool.cxx.

55  {
56  const int bin = m_histo->FindFixBin(input.eta);
57  if (m_histo->IsBinUnderflow(bin) or m_histo->IsBinOverflow(bin)) return VALUE_OVERFLOW;
58  return m_histo->GetBinContent(bin);
59 }

◆ operator=()

GetAmountHisto1D& GetAmountHisto1D::operator= ( const GetAmountHisto1D oth)
inline

Definition at line 138 of file egammaLayerRecalibTool.h.

138  {
139  if (this != &oth) // protect against invalid self-assignment
140  {
141  m_histo.reset(static_cast<TH1*>(oth.m_histo->Clone()));
142  m_histo->SetDirectory(nullptr);
143  }
144  return *this;
145  }

Member Data Documentation

◆ m_histo

std::unique_ptr<TH1> GetAmountHisto1D::m_histo
protected

Definition at line 149 of file egammaLayerRecalibTool.h.


The documentation for this struct was generated from the following files:
bin
Definition: BinsDiffFromStripMedian.h:43
GetAmountHisto1D::GetAmountHisto1D
GetAmountHisto1D(const TH1 &histo)
Definition: egammaLayerRecalibTool.h:136
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
plotBeamSpotCompare.histo
histo
Definition: plotBeamSpotCompare.py:415
GetAmountHisto1D::m_histo
std::unique_ptr< TH1 > m_histo
Definition: egammaLayerRecalibTool.h:149