Fw: cern-root: Compiling Macro

From: L. A. Linden Levy <lindenle_at_uiuc.edu>
Date: Tue, 21 Nov 2006 08:43:51 -0600


Hi ROOTers!

Does anyone know what a call to get one element of a TMatrixD should look like when you want to actually compile a root macro.

i.e.

[code]
#include "TMatrixD.h"

Int_t test()
{

	TMatrixD * f = new TMatrixD(2,2);
	f(1,1)=5;
	f->Print();
	return 1;

}

[/code]

Does not compile with:

root[0] .L test.C+

and I get this error:

error: 'f' cannot be used as a function

with root 5.12.00e, but it works when I load it in the cint interpreter. Thanks for any information/help.

P.S. I did search the documentation pretty thoroughly but I was unable to find anything that worked. Thanks so much.

Alex

-- 

---------------------------------------------
Loren A. Linden Levy 481 Loomis, Department of Physics University of Illinois at Urbana-Champaign 1110 W. Green St., Urbana, IL 61801-3080 Tel: 217-244-7995 (NPL) / +049 040 8998 4789 (DESY) Fax: 217-333-1215 (NPL) / +049 040 8998 4034 (DESY) Cell: 217-369-6580 (U.S.) / +049 (0)151 5496 1831 (Germany) Email: lindenle_at_uiuc.edu url: http://w3.physics.uiuc.edu/~lindenle/ _____________________________________________
---------------------------------------------
This email has been cryptographically signed. Search for "lindenle" at pgp.mit.edu to obtain my public key which can be used to verify the authenticity of this message. _____________________________________________
---------------------------------------------
--
---------------------------------------------
Loren A. Linden Levy 481 Loomis, Department of Physics University of Illinois at Urbana-Champaign 1110 W. Green St., Urbana, IL 61801-3080 Tel: 217-244-7995 (NPL) / +049 040 8998 4789 (DESY) Fax: 217-333-1215 (NPL) / +049 040 8998 4034 (DESY) Cell: 217-369-6580 (U.S.) / +049 (0)151 5496 1831 (Germany) Email: lindenle_at_uiuc.edu url: http://w3.physics.uiuc.edu/~lindenle/ _____________________________________________
---------------------------------------------
This email has been cryptographically signed. Search for "lindenle" at pgp.mit.edu to obtain my public key which can be used to verify the authenticity of this message. _____________________________________________
---------------------------------------------

!DSPAM:1000,4563095d54815848610666!

Received on Tue Nov 21 2006 - 15:44:36 MET

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:02 MET