diff --git a/tutorials/fit/fitCircle.C b/tutorials/fit/fitCircle.C index 5c87100c3c9c2b6c293171911a68bda31c2e2289..6f3175c585f61b0fa5f1546fd06c5b83290b347a 100644 --- a/tutorials/fit/fitCircle.C +++ b/tutorials/fit/fitCircle.C @@ -29,7 +29,7 @@ void fitCircle(Int_t n=10000) { //generates n points around a circle and fit them TCanvas *c1 = new TCanvas("c1","c1",600,600); c1->SetGrid(); - gr = new TGraph(n); + TGraph* gr = new TGraph(n); if (n> 999) gr->SetMarkerStyle(1); else gr->SetMarkerStyle(3); TRandom3 r; diff --git a/tutorials/geom/RadioNuclides.C b/tutorials/geom/RadioNuclides.C index 2828f4e6078182fd92065c783cd02f2f20148b27..f019bb5e435aecd0e937a68a74b013645b2492ff 100644 --- a/tutorials/geom/RadioNuclides.C +++ b/tutorials/geom/RadioNuclides.C @@ -129,11 +129,11 @@ void RadioNuclides() pt->SetFillColor(5); pt->SetTextAlign(12); pt->SetTextColor(4); - text = pt->AddText("Time evolution of a population of radionuclides."); - text = pt->AddText("The concentration of a nuclide X represent the "); - text = pt->AddText("ratio between the number of X nuclei and the "); - text = pt->AddText("number of nuclei of the top element of the decay"); - text = pt->AddText("from which X derives from at T=0. "); + pt->AddText("Time evolution of a population of radionuclides."); + pt->AddText("The concentration of a nuclide X represent the "); + pt->AddText("ratio between the number of X nuclei and the "); + pt->AddText("number of nuclei of the top element of the decay"); + pt->AddText("from which X derives from at T=0. "); pt->Draw(); c1->Modified(); vect->Clear(); diff --git a/tutorials/geom/csgdemo.C b/tutorials/geom/csgdemo.C index a295e6d7c0fb09669149797f77f98c84156262b3..f289c2a4d314fd24a592a4931c1c8820ba6b8efd 100644 --- a/tutorials/geom/csgdemo.C +++ b/tutorials/geom/csgdemo.C @@ -13,7 +13,7 @@ Bool_t raytracing = kTRUE; void csgdemo () { gSystem->Load("libGeom"); - bar = new TControlBar("vertical", "TGeo composite shapes",20,20); + TControlBar* bar = new TControlBar("vertical", "TGeo composite shapes",20,20); bar->AddButton("How to run ","help()","Instructions "); bar->AddButton("Union ", "s_union()", "A + B "); bar->AddButton("Intersection ", "s_intersection()","A * B "); @@ -344,14 +344,14 @@ void help() { new TCanvas("chelp","Help to run demos",200,10,700,600); - welcome = new TPaveText(.1,.8,.9,.97); + TPaveText* welcome = new TPaveText(.1,.8,.9,.97); welcome->AddText("Welcome to the new geometry package"); welcome->SetTextFont(32); welcome->SetTextColor(4); welcome->SetFillColor(24); welcome->Draw(); - hdemo = new TPaveText(.05,.05,.95,.7); + TPaveText* hdemo = new TPaveText(.05,.05,.95,.7); hdemo->SetTextAlign(12); hdemo->SetTextFont(52); hdemo->AddText("- Demo for building TGeo composite shapes"); diff --git a/tutorials/geom/xtruSamples.C b/tutorials/geom/xtruSamples.C index 42a50c80b8f59a575dbabbc69fd82944a7750d21..5fff09145d4b53dce5f714328c64962c5f7d95d3 100644 --- a/tutorials/geom/xtruSamples.C +++ b/tutorials/geom/xtruSamples.C @@ -25,7 +25,7 @@ void xtruSamples() Bool_t domalformed = kFALSE; // domalformed = kTRUE; - c1 = new TCanvas("c1","sample TXTRU Shapes",200,10,640,640); + TCanvas* c1 = new TCanvas("c1","sample TXTRU Shapes",200,10,640,640); // Create a new geometry TGeometry* geom = new TGeometry("sample","sample"); diff --git a/tutorials/graphics/gaxis3.C b/tutorials/graphics/gaxis3.C index f0d8ff04b0a1675ca5680a57fb44f167cbfbd8fb..d7b5fca45df130592624aabb024ee591fa464244 100644 --- a/tutorials/graphics/gaxis3.C +++ b/tutorials/graphics/gaxis3.C @@ -19,7 +19,7 @@ /// \author Olivier Couet void gaxis3() { - c1 = new TCanvas("c1","Examples of Gaxis",10,10,800,400); + TCanvas* c1 = new TCanvas("c1","Examples of Gaxis",10,10,800,400); c1->Range(-6,-0.1,6,0.1); TGaxis *axis = new TGaxis(-5.5,0.,5.5,0.,0.0,100,510,""); diff --git a/tutorials/graphics/manyaxis.C b/tutorials/graphics/manyaxis.C index 4203083be1832b092f8b98eb7930ce425885e840..a6ef5a1a668a4fb2d0072fda3e781471ef01793a 100644 --- a/tutorials/graphics/manyaxis.C +++ b/tutorials/graphics/manyaxis.C @@ -10,7 +10,7 @@ void manyaxis() { - c1 = new TCanvas("c1","Examples of Gaxis",10,10,700,500); + TCanvas* c1 = new TCanvas("c1","Examples of Gaxis",10,10,700,500); c1->Range(-10,-1,10,1); diff --git a/tutorials/hist/DynamicSlice.C b/tutorials/hist/DynamicSlice.C index 53cf43f9d020d13d1de95ebb6d1b56c548ed4bbf..aa682f1b34fad5d2c82927bdbcb88f1c089dd3ec 100644 --- a/tutorials/hist/DynamicSlice.C +++ b/tutorials/hist/DynamicSlice.C @@ -12,7 +12,7 @@ void DynamicSlice() { // Create a new canvas. - c1 = new TCanvas("c1","Dynamic Slice Example",10,10,700,500); + TCanvas* c1 = new TCanvas("c1","Dynamic Slice Example",10,10,700,500); //create a 2-d histogram, fill and draw it TH2F *hpxpy = new TH2F("hpxpy","py vs px",40,-4,4,40,-4,4); diff --git a/tutorials/hist/hksimple.C b/tutorials/hist/hksimple.C index de165357fb57efe9fa5d823c339b1e6aba1eb463..fec4a087016ef8ff590f50f64bd2a81f2db7235f 100644 --- a/tutorials/hist/hksimple.C +++ b/tutorials/hist/hksimple.C @@ -26,7 +26,7 @@ void padRefresh(TPad *pad,int flag=0) void hksimple() { // Create a new canvas. - c1 = new TCanvas("c1","Dynamic Filling Example",200,10,600,900); + TCanvas* c1 = new TCanvas("c1","Dynamic Filling Example",200,10,600,900); // Create a normal histogram and two TH1K histograms TH1 *hpx[3]; diff --git a/tutorials/hist/xyplot.C b/tutorials/hist/xyplot.C index 4b472961a94ebe012b8fbf79cef3f6181e1dc2ae..6dca3335fc6a51b5fe1dfe828fd55dc947622953 100644 --- a/tutorials/hist/xyplot.C +++ b/tutorials/hist/xyplot.C @@ -22,7 +22,7 @@ void xyplot() const Int_t n = 4; Double_t x[n] = {-1, -3, -9, 3}; Double_t y[n] = {-1000, 900, 300, 300}; - gr = new TGraph(n,x,y); + TGraph* gr = new TGraph(n,x,y); gr->SetTitle("XY plot"); gr->SetMinimum(-1080); gr->SetMaximum(1080); diff --git a/tutorials/spectrum/DeconvolutionRL_wide.C b/tutorials/spectrum/DeconvolutionRL_wide.C index fd15aa5d4b57682a17aa67fd4cf8e1c407d7bdd3..f292c5e0279fb8bae51600b969e811cde3ca6365 100644 --- a/tutorials/spectrum/DeconvolutionRL_wide.C +++ b/tutorials/spectrum/DeconvolutionRL_wide.C @@ -20,9 +20,9 @@ void DeconvolutionRL_wide() { TString dir = gROOT->GetTutorialsDir(); TString file = dir+"/spectrum/TSpectrum.root"; TFile *f = new TFile(file.Data()); - h = (TH1F*) f->Get("decon3"); + TH1F* h = (TH1F*) f->Get("decon3"); h->SetTitle("Deconvolution of closely positioned overlapping peaks using Richardson-Lucy deconvolution method"); - d = (TH1F*) f->Get("decon_response_wide"); + TH1F* d = (TH1F*) f->Get("decon_response_wide"); for (i = 0; i < nbins; i++) source[i]=h->GetBinContent(i + 1); for (i = 0; i < nbins; i++) response[i]=d->GetBinContent(i + 1); diff --git a/tutorials/spectrum/DeconvolutionRL_wide_boost.C b/tutorials/spectrum/DeconvolutionRL_wide_boost.C index aa711fc05d0890dfd1f868a4560348e5c154d81f..0cdeb1904c8d97ce6a0574b999758ad5fcff8510 100644 --- a/tutorials/spectrum/DeconvolutionRL_wide_boost.C +++ b/tutorials/spectrum/DeconvolutionRL_wide_boost.C @@ -20,9 +20,9 @@ void DeconvolutionRL_wide_boost() { TString dir = gROOT->GetTutorialsDir(); TString file = dir+"/spectrum/TSpectrum.root"; TFile *f = new TFile(file.Data()); - h = (TH1F*) f->Get("decon3"); + TH1F* h = (TH1F*) f->Get("decon3"); h->SetTitle("Deconvolution of closely positioned overlapping peaks using boosted Richardson-Lucy deconvolution method"); - d = (TH1F*) f->Get("decon_response_wide"); + TH1F* d = (TH1F*) f->Get("decon_response_wide"); for (i = 0; i < nbins; i++) source[i]=h->GetBinContent(i + 1); for (i = 0; i < nbins; i++) response[i]=d->GetBinContent(i + 1);