From b2322306b55b9a070636f761dcbd4d3e8a0990d8 Mon Sep 17 00:00:00 2001 From: Korcsmaros Berta Date: Tue, 31 Oct 2017 14:03:30 +0100 Subject: [PATCH] fixed Plotter, fixed default value in BM1D.cc --- BM1D.cc | 15 ++++++++++++++- src/Plotter.cc | 5 ++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/BM1D.cc b/BM1D.cc index cb36052..a316b6c 100644 --- a/BM1D.cc +++ b/BM1D.cc @@ -35,6 +35,19 @@ int main(int argc, char* argv[]) else { //default runs with less parameters + random_type = 'l'; + nSteps = 1000; + nRuns = 10; + p0 = 0.5; + p1 = 0; + x1 = 20; + x2 = 30; + mu1 = 2; + mu2 = 2; + sigma1 = 0.3; + sigma2 = 1; + vis = 1; + typeOfRun = 1; } @@ -55,7 +68,7 @@ int main(int argc, char* argv[]) break; } - Plotter* myPlotter = new Plotter(true); + Plotter* myPlotter = new Plotter(vis==1); myPlotter->Plot(nRuns, nSteps, myBM1DProcess->GetT(), myBM1DProcess->GetX()); App.Run(); diff --git a/src/Plotter.cc b/src/Plotter.cc index 81441ba..0a944e9 100644 --- a/src/Plotter.cc +++ b/src/Plotter.cc @@ -1,13 +1,12 @@ #include "Plotter.hh" -Plotter::Plotter(bool draw) +Plotter::Plotter(bool draw_par = false) { +draw = draw_par; if(draw) { - draw = draw; canv = new TCanvas("canc","display",800,400); } -//g1 = new TGraph(); mg = new TMultiGraph(); } void Plotter::Plot(Int_t numRuns, Int_t nSteps, std::vector t, std::vector x)