![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "GaudiKernel/Bootstrap.h"
9 #include "GaudiKernel/ISvcLocator.h"
10 #include "GaudiKernel/Service.h"
11 #include "GaudiKernel/IToolSvc.h"
22 validArguments(
const float arg) {
23 return not (std::isnan(
arg));
27 validArguments(
const float arg1,
const float arg2) {
28 return not (std::isnan(arg1) or std::isnan(arg2));
32 validArguments(
const float arg1,
const float arg2,
const float arg3) {
33 return not (std::isnan(arg1) or std::isnan(arg2) or std::isnan(arg3));
41 m_histoDefSvc(nullptr) {}
47 ATH_MSG_WARNING(
"Histogram definition is empty for identifier " << histoIdentifier);
63 ATH_MSG_WARNING(
"Histogram definition is empty for identifier " << histoIdentifier);
80 ATH_MSG_WARNING(
"Histogram definition is empty for identifier " << histoIdentifier);
97 if (pTh1 and validArguments(
value)) {
103 if (pTh1 and validArguments(
value)) {
110 if (pTh2 and validArguments(
xval,
yval)) {
116 if (pTh2 and validArguments(
xval,
yval)) {
123 if (pTh3 and validArguments(
xval,
yval, zval)) {
129 if (pTh3 and validArguments(
xval,
yval, zval)) {
137 ATH_MSG_DEBUG(
"Retrieving SingleHistogramDefinition for "<< histoIdentifier);
140 ISvcLocator* svcLoc = Gaudi::svcLocator();
142 if (
sc.isFailure()) {
143 ATH_MSG_FATAL(
"failed to retrieve HistogramDefinitionSvc in " << __FILE__);
144 throw std::runtime_error(
"Could initialise the HistogramDefinitionSvc");
148 bool folderDefault = (
folder.empty() or
folder ==
"default");
151 if (folderDefault and
s.empty()) {
152 const std::string otherDefault = (
folder.empty()) ? (
"default") :
"";
156 ATH_MSG_WARNING(
"Histogram definition is empty for identifier " << histoIdentifier);
TH1F * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
TH2F * Book2D(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
Book a TH2D histogram.
IHistogramDefinitionSvc::axesLimits_t xAxis
static void fillHisto(TH1 *pTh1, const float value)
SingleHistogramDefinition retrieveDefinition(const std::string &histoIdentifier, const std::string &folder="default")
Retrieve a single histogram definition, given the unique string identifier.
int Fill(double, double, double)
::StatusCode StatusCode
StatusCode definition for legacy code.
IHistogramDefinitionSvc * m_histoDefSvc
Class to provide easy MsgStream access and capabilities.
virtual SingleHistogramDefinition definition(const std::string &name, const std::string &dirName="") const =0
Return a histogram definition, retrieved by histogram identifier (and directory name,...
TH3F * Book3D(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, int nBinsZ, float startZ, float endZ, bool prependDir=true)
Book a TH3D histogram.
Almost-a-struct for holding the single histogram definition.
TCCPlotsBase(PlotBase *pParent, const std::string &folder)
#define ATH_MSG_WARNING(x)
IHistogramDefinitionSvc::axesLimits_t yAxis
bool isValid() const
Is the histogram definition valid.
IHistogramDefinitionSvc::axesLimits_t zAxis
bool empty() const
Is the histogram definition empty?
void book(TH1 *&pHisto, const SingleHistogramDefinition &hd)
Book a TH1 histogram.