32#include "TGraphErrors.h"
33#include "TGraphAsymmErrors.h"
34#include "TMultiGraph.h"
36#include "TProfile2D.h"
38#include "TDirectory.h"
51 if (!subDir.empty()) path += (
"/" + subDir);
54 ATH_MSG_WARNING(
"Could not register histogram : " << path +
"/" + hist->GetName() );
64 if (!subDir.empty()) path += (
"/" + subDir);
67 ATH_MSG_WARNING(
"Could not register Graph : " << path +
"/" + graph->GetName() );
81 declareInterface<IMonitorToolBase>(
this);
126 std::ostringstream os;
128 os <<
" 0x" << std::hex << fragID << std::dec;
131 ATH_MSG_INFO(
"Tile DMU errors will be ignored in drawers (frag IDs):" << os.str());
138 std::ostringstream os;
140 os <<
" 0x" << std::hex << fragID << std::dec;
143 ATH_MSG_INFO(
"Special settings in histograms for demonstrator modules (frag IDs):" << os.str());
151 return StatusCode::SUCCESS;
160 const std::string & trigChain,
const std::string & mergeAlgo)
163 TH1D* hist =
new TH1D(TString(nam), TString(tit), nx,
xmin,
xmax);
164 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
171 const std::string & trigChain,
const std::string & mergeAlgo)
174 TH1F* hist =
new TH1F(TString(nam), TString(tit), nx,
xmin,
xmax);
175 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
182 const std::string & trigChain,
const std::string & mergeAlgo)
185 TH1C* hist =
new TH1C(TString(nam), TString(tit), nx,
xmin,
xmax);
186 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
193 const std::string & trigChain,
const std::string & mergeAlgo)
196 TH1S* hist =
new TH1S(TString(nam), TString(tit), nx,
xmin,
xmax);
197 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
202 int nx,
const Double_t *xlgbins,
204 const std::string & trigChain,
const std::string & mergeAlgo)
207 TH1S* hist =
new TH1S(TString(nam), TString(tit), nx, xlgbins);
208 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
215 const std::string & trigChain,
const std::string & mergeAlgo)
218 TH1I* hist =
new TH1I(TString(nam), TString(tit), nx,
xmin,
xmax);
219 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
230 const std::string & trigChain,
const std::string & mergeAlgo)
232 TH2D* hist =
new TH2D(TString(nam), TString(tit), nx,
xmin,
xmax, ny,
ymin,
ymax);
233 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
241 const std::string & trigChain,
const std::string & mergeAlgo)
243 TH2F* hist =
new TH2F(TString(nam), TString(tit), nx,
xmin,
xmax, ny,
ymin,
ymax);
244 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
250 int ny,
const double* ybins,
252 const std::string & trigChain,
const std::string & mergeAlgo)
254 TH2F* hist =
new TH2F(TString(nam), TString(tit), nx,
xmin,
xmax, ny, ybins);
255 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
264 const std::string & trigChain,
const std::string & mergeAlgo)
266 TH2I* hist =
new TH2I(TString(nam), TString(tit), nx,
xmin,
xmax, ny,
ymin,
ymax);
267 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
276 const std::string & trigChain,
const std::string & mergeAlgo)
278 TH2S *hist =
new TH2S(TString(nam), TString(tit), nx,
xmin,
xmax, ny,
ymin,
ymax);
279 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
287 const std::string & trigChain,
const std::string & mergeAlgo)
289 TH2C* hist =
new TH2C(TString(nam), TString(tit), nx,
xmin,
xmax, ny,
ymin,
ymax);
290 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
297 const std::string & trigChain,
const std::string & mergeAlgo)
299 TProfile* hist =
new TProfile(TString(nam), TString(tit), nx,
xmin,
xmax);
300 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
308 const std::string & trigChain,
const std::string & mergeAlgo)
310 TProfile* hist =
new TProfile(TString(nam), TString(tit), nx,
xmin,
xmax,
ymin,
ymax);
311 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
316 int nx,
const float* xbins,
318 const std::string & trigChain,
const std::string & mergeAlgo)
320 TProfile* hist =
new TProfile(TString(nam), TString(tit), nx, xbins);
321 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
328 double zmin,
double zmax,
330 const std::string & trigChain,
const std::string & mergeAlgo)
333 TProfile2D* hist =
new TProfile2D(TString(nam), TString(tit), nx,
xmin,
xmax, ny,
ymin,
ymax, zmin, zmax);
334 regHist(subdir, hist, interval, attribute, trigChain, mergeAlgo);
379 hist->SetName(TString(nam));
380 hist->SetTitle(TString(tit));
389 TGraphErrors1(
int N,
float * X,
float * Y,
float * X_errors,
float * Y_errors)
390 : TGraphErrors(N, X, Y, X_errors, Y_errors),
fDirectory(0) {
406TGraphErrors *
TilePaterMonTool::bookGraphErrors(
const std::string& subdir,
const std::string& nam,
const std::string& tit,
int N,
float * X,
float * Y,
float * X_errors,
float * Y_errors) {
408 TGraphErrors *hist =
new TGraphErrors(N, X, Y, X_errors, Y_errors);
409 hist->SetName(TString(nam));
410 hist->SetTitle(TString(tit));
418 if (obj->IsA()->InheritsFrom(
"TH1")) {
419 if (
deregHist(
static_cast<TH1*
> (obj)).isFailure()) {
421 return StatusCode::FAILURE;
425 }
else if (obj->IsA()->InheritsFrom(
"TGraph")) {
426 if (
deregGraph(
static_cast<TGraph*
> (obj)) != StatusCode::SUCCESS) {
428 return StatusCode::FAILURE;
433 ATH_MSG_WARNING(
"Asked to remove object " << obj->GetName() <<
"of unsupported type " << obj->IsA() );
434 return StatusCode::FAILURE;
438 return StatusCode::FAILURE;
440 return StatusCode::SUCCESS;
446 TGraphAsymmErrors1(
int N,
float * X,
float * Y,
float * X_errors1,
float * X_errors2,
float * Y_errors1,
float * Y_errors2)
447 : TGraphAsymmErrors(N, X, Y, X_errors1, X_errors2, Y_errors1, Y_errors2),
fDirectory(0) {
464 float* X,
float* Y,
float* X_errors1,
float* X_errors2,
465 float* Y_errors1,
float* Y_errors2)
468 TGraphAsymmErrors *hist =
new TGraphAsymmErrors(N, X, Y, X_errors1, X_errors2, Y_errors1, Y_errors2);
469 hist->SetName(TString(nam));
470 hist->SetTitle(TString(tit));
#define ATH_MSG_WARNING(x)
#define CHECK(...)
Evaluate an expression and check for errors.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
void SetDirectory(TDirectory *dir)
TDirectory * GetDirectory()
TGraph1(int N, float *X, float *Y)
void SetDirectory(TDirectory *dir)
TGraphAsymmErrors1(int N, float *X, float *Y, float *X_errors1, float *X_errors2, float *Y_errors1, float *Y_errors2)
TDirectory * GetDirectory()
TGraphErrors1(int N, float *X, float *Y, float *X_errors, float *Y_errors)
void SetDirectory(TDirectory *dir)
TDirectory * GetDirectory()
TDirectory * GetDirectory()
void SetDirectory(TDirectory *dir)
static const TileCablingService * getInstance()
get pointer to service instance
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.