#include "HistoMaker.h" #include "TCanvas.h" void macro(int __num_iterations = 10){ //gSystem->Load("./libHistoMaker.so"); HistoMaker hmaker; vector histos; TCanvas *canvas = new TCanvas("can","Gaussian Histograms",25,25,500,500); canvas->Divide(2,2); for(int iter = 0; iter < __num_iterations; iter++){ cout << "Iteration: " << iter << endl; histos = hmaker.GetHistos(4,0.,1.,1000,iter); // 4 gaussians, 1000 entries for(int h = 0; h < 4; h++){ string name = histos[h]->GetName(); canvas->cd(h+1); histos[h]->SetFillColor(11); histos[h]->DrawCopy(); delete histos[h]; histos[h] = 0; cout << "deleted " << name << endl; } canvas->cd(); canvas->Update(); } }