mouse button: 2 questions

From: <>
Date: Wed, 13 Apr 2005 14:57:41 +0200

Hi all,

I have two questions about the macro that i put in attachment.

  1. If i run it like this, it works well. But if i prefer to do in root: TFile * f = new TFile("test.root","RECREATE"); TH1F * hALL = new TH1F("hALL","hALL",100,-3,3); hALL->FillRandom("gaus",1000); f->Write(); and then to change test() like this: //TH1F * hALL = new TH1F("hALL","hALL",100,-3,3); TFile f("test.root","READ") ; // hALL->FillRandom("gaus",1000); TCanvas * c1 = new TCanvas("c1"); hALL->Draw(); c1->Update(); c1->AddExec("test","exectest()");

I cannot see any more the hitogramm seems to be masked by something you understand my problem ?

2) once i clicked on the canvas with the mouse and that some markers appeared, i'd like to be able to move some of them at another place in the canvas by the way of the mouse.
Could you explain me how to do that ?

Thank you a lot by advance!


Received on Wed Apr 13 2005 - 14:57:49 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:06 MET