From b3807450b154297fce539f7997d5e1e824af88c8 Mon Sep 17 00:00:00 2001 From: nemu Date: Wed, 27 Feb 2008 10:09:05 +0000 Subject: [PATCH] corrected histogram generation --- src/tests/skewedGaussianTest/fakeData.cpp | 38 +++++++++++++++++++---- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/src/tests/skewedGaussianTest/fakeData.cpp b/src/tests/skewedGaussianTest/fakeData.cpp index afc250f1..418310c0 100644 --- a/src/tests/skewedGaussianTest/fakeData.cpp +++ b/src/tests/skewedGaussianTest/fakeData.cpp @@ -298,18 +298,17 @@ int main(int argc, char *argv[]) cout << endl << ">> calculate all the histo_i(t) ..." << endl; // calculate the histograms - PIntVector idata; - vector histo; + vector histo; for (UInt_t i=0; i> histo " << i+1 << "/" << asym.size() << " done ..."; } @@ -340,6 +339,33 @@ int main(int argc, char *argv[]) TH1F *hh; TString name, title; for (UInt_t i=0; iShow(); + + name = "hh"; + name += i; + title = "asym"; + title += i; + hh = new TH1F(name.Data(), title.Data(), noOfChannels, + -timeResolution/2.0, (noOfChannels+0.5)*timeResolution); + for (Int_t j=0; jSetBinContent(j, asymmetry[i][j]); + } + hh->Draw("*H HIST"); + + tf.WriteTObject(chist); + + if (hh) + delete hh; + if (chist) + delete chist; + } + + for (UInt_t i=0; iSetBinContent(j, asymmetry[i][j]); + hh->SetBinContent(j, histo[i][j]); } hh->Draw("*H HIST");