Re: [ROOT] showing ROOT histograms while running Geant4

From: Rene Brun (Rene.Brun@cern.ch)
Date: Sat Oct 04 2003 - 12:58:43 MEST


Hi Allister,

You must create a TApplication object in your program.

#include "TApplication.h"

int main(int argc, char** argv) {

  TApplication myapp("myapp,&argc,argv);
  ..your code

Note that you can also view your histograms during your event loop,
if at regular intervals, you call
  gSystem->ProcessEvents();

Rene Brun

On Sat, 4 Oct 2003, 
Allister & Maricel Sanchez wrote:

> Hi,
> 
> I've been using TFile, TTree, and TH1D to store data during a Geant4 run 
> and it worked fine.
> However, at times I also want to see the histogram on a canvas getting 
> filled per event.  Could someone point out how I can implement this?  
> Simply including the TCanvas.h header and then calling 
> TCanvas::Update(), TCanvas::Modified() at the end of each event doesn't 
> seem to work, that is, I can't see a canvas.
> 
> Thanks in advance,
> Allister Sanchez
> Niigata University, Japan
> 
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET