Class ThrObj can be used to simplify the work with TThreadedObject histograms in multithreaded applications. More...
#include <ThrObj.hpp>
Public Member Functions | |
ThrObj (const std::string &name, const std::string &title, const int xNBins, const double xLow, const double xMax, const std::string &fileDirectory="") | |
Constructor for TH1F, TH1D, and TH1L types. | |
ThrObj (const std::string &name, const std::string &title, const int xNBins, const double xLow, const double xMax, const int yNBins, const double yMin, const double yMax, const std::string &fileDirectory="") | |
Constructor for TH2F, TH2D, and TH2L types. | |
ThrObj (const std::string &name, const std::string &title, const int xNBins, const double xLow, const double xMax, const int yNBins, const double yMin, const double yMax, const int zNBins, const double zMin, const double zMax, const std::string &fileDirectory="") | |
Constructor for TH3F, TH3D, and TH3L types. | |
std::shared_ptr< T > | Get () |
Returns shared pointer to the object. | |
Protected Attributes | |
std::shared_ptr< T > | objPtr |
Pointer to the TThreadedObject. | |
Class ThrObj can be used to simplify the work with TThreadedObject histograms in multithreaded applications.
This class is especially useful when working with TTreeProcessorMT
Examples on usage will be added later
template ROOTTools::ThrObj< T >::ThrObj | ( | const std::string & | name, |
const std::string & | title, | ||
const int | xNBins, | ||
const double | xLow, | ||
const double | xMax, | ||
const std::string & | fileDirectory = "" ) |
Constructor for TH1F, TH1D, and TH1L types.
[in] | name | name of the histogram |
[in] | title | title of the histogram |
[in] | xNBins | number of bins on X axis |
[in] | xLow | lower edge of the first bin on X axis |
[in] | xUp | upper edge of the last bin on X axis |
[in] | fileDirectory | directory in which histogram will be written. If it does not exist it will be created |
template ROOTTools::ThrObj< T >::ThrObj | ( | const std::string & | name, |
const std::string & | title, | ||
const int | xNBins, | ||
const double | xLow, | ||
const double | xMax, | ||
const int | yNBins, | ||
const double | yMin, | ||
const double | yMax, | ||
const std::string & | fileDirectory = "" ) |
Constructor for TH2F, TH2D, and TH2L types.
[in] | name | name of the histogram |
[in] | title | title of the histogram |
[in] | xNBins | number of bins on X axis |
[in] | xLow | lower edge of the first bin on X axis |
[in] | xUp | upper edge of the last bin on X axis |
[in] | yNBins | number of bins on Y axis |
[in] | yLow | lower edge of the first bin on Y axis |
[in] | yUp | upper edge of the last bin on Y axis |
[in] | fileDirectory | directory in which histogram will be written. If it does not exist it will be created |
template ROOTTools::ThrObj< T >::ThrObj | ( | const std::string & | name, |
const std::string & | title, | ||
const int | xNBins, | ||
const double | xLow, | ||
const double | xMax, | ||
const int | yNBins, | ||
const double | yMin, | ||
const double | yMax, | ||
const int | zNBins, | ||
const double | zMin, | ||
const double | zMax, | ||
const std::string & | fileDirectory = "" ) |
Constructor for TH3F, TH3D, and TH3L types.
[in] | name | name of the histogram |
[in] | title | title of the histogram |
[in] | xNBins | number of bins on X axis |
[in] | xLow | lower edge of the first bin on X axis |
[in] | xUp | upper edge of the last bin on X axis |
[in] | yNBins | number of bins on Y axis |
[in] | yLow | lower edge of the first bin on Y axis |
[in] | yUp | upper edge of the last bin on Y axis |
[in] | zNBins | number of bins on Z axis |
[in] | zLow | lower edge of the first bin on Z axis |
[in] | zUp | upper edge of the last bin on Z axis |
[in] | fileDirectory | directory in which histogram will be written. If it does not exist it will be created |
template std::shared_ptr< TH3L > ROOTTools::ThrObj< T >::Get | ( | ) |
Returns shared pointer to the object.
This pointer is used to create one intance of TThreadedObject on a single thread for uninterrupted access to the object which makes writes safer and faster. Different instances from all threads can be merged after the process on each thread is finished
|
protected |
Pointer to the TThreadedObject.