22 #include "StMultiH1F.h"
23 #include "StMultiH2F.h"
28 TString QAH::preString =
"";
29 TString QAH::QAHistName =
"";
30 TString QAH::QAHistTitle =
"";
34 TH1F*
QAH::H1F(const Text_t* name, const Text_t* title,
35 Int_t nbinsx, Axis_t xlow, Axis_t xup) {
38 TH1F(NameIt(name),TitleIt(title),nbinsx,xlow,xup);
39 if (maker) maker->AddHist(hist);
44 TH1F* QAH::H1F(
const Text_t* name,
const Text_t* title,
45 Int_t nbinsx,
const Double_t* xbins) {
48 TH1F(NameIt(name),TitleIt(title),nbinsx,xbins);
49 if (maker) maker->AddHist(hist);
54 TH2F* QAH::H2F(
const Text_t* name,
const Text_t* title,
55 Int_t nbinsx, Axis_t xlow, Axis_t xup,
56 Int_t nbinsy, Axis_t ylow, Axis_t yup) {
59 TH2F(NameIt(name),TitleIt(title),nbinsx,xlow,xup,nbinsy,ylow,yup);
60 if (maker) maker->AddHist(hist);
65 TH2F* QAH::H2F(
const Text_t* name,
const Text_t* title,
66 Int_t nbinsx,
const Double_t* xbins,
67 Int_t nbinsy, Axis_t ylow, Axis_t yup) {
70 TH2F(NameIt(name),TitleIt(title),nbinsx,xbins,nbinsy,ylow,yup);
71 if (maker) maker->AddHist(hist);
76 TH2F* QAH::MH1F(
const Text_t* name,
const Text_t* title,
77 Int_t nbinsx, Axis_t xlow, Axis_t xup, Int_t nbinsy) {
79 TH2F* hist = (TH2F*)
new
80 StMultiH1F(NameIt(name),TitleIt(title),nbinsx,xlow,xup,nbinsy);
81 if (maker) maker->AddHist(hist);
86 void QAH::MMH1F(TH2F** histp, Int_t nhist,
const Text_t* name,
const Text_t* title,
87 Int_t nbinsx, Axis_t xlow, Axis_t xup, Int_t nbinsy, Int_t first) {
89 for (Int_t i=0; i<nhist; i++) {
90 Int_t j = first + (i * nbinsy);
91 Int_t k = j + nbinsy - 1;
92 histp[i] = QAH::MH1F(Form(name,i),Form(title,j,k),nbinsx,xlow,xup,nbinsy);
93 for (Int_t l=0; l<nbinsy; l++) histp[i]->Rebin(l,Form(
"%d",j+l));
94 histp[i]->SetStats(kFALSE);
99 TH3F* QAH::MH2F(
const Text_t* name,
const Text_t* title,
100 Int_t nbinsx, Axis_t xlow, Axis_t xup, Int_t nbinsy, Axis_t ylow, Axis_t yup,
103 TH3F* hist = (TH3F*)
new
104 StMultiH2F(NameIt(name),TitleIt(title),nbinsx,xlow,xup,nbinsy,ylow,yup,nbinsz);
105 if (maker) maker->AddHist(hist);
110 const char* QAH::NameIt(
const char* name) {
112 return ((QAHistName=preString) += name).Data();
116 const char* QAH::TitleIt(
const char* name) {
118 return (((QAHistTitle=preString) +=
" ") += name).Data();