Dear Expert,
I developed a Geant4 application and I’d like to visualise some of the results in ‘real-time’ during the simulation run. In particular I’d like to plot a ROOT histogram that is created during the simulation.
I included the ROOT libraries and I wrote something of this:
#include “TROOT.h”
#include “TCanvas.h”
#include “TFile.h”
#include “TH1F.h”
#include “TH2F.h”
#include “TGraph.h”
#include “TLegend.h”
#include “TLegendEntry.h”
#include “TStyle.h”
if (!theRootCanvas)
{
gROOT->Reset();
gROOT->SetStyle(“Plain”);
theRootCanvas = new TCanvas(“theRootCanvas”,“Interaction Parameters”,200, 10, 600,400);
theRootCanvas -> SetFillColor(20);
theRootCanvas -> SetBorderMode(1);
theRootCanvas -> SetBorderSize(1);
theRootCanvas -> SetFrameBorderMode(0);
theRootCanvas -> SetGrid();
…
…
The program compiles correctly but no canvas is created and nothing happens during the simulation run.
Someone can suggest me some example where this is done?
Thank you very much,
Pablo Cirrone