RE: #pragma link C++ macro ...

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Thu, 03 Mar 2005 17:33:40 -0600


 Hi Jacek,

The problem with gROOT->ProcessLine (which appears only when called in the unusual way you are using), will be fixed shortly in the CVS repository.

Cheers,
Philippe.

-----Original Message-----
From: Jacek M. Holeczek [mailto:holeczek_at_us.edu.pl] Sent: Thursday, March 03, 2005 3:49 AM
To: Philippe Canal
Cc: 'RootTalk'; 'Masaharu Goto'
Subject: RE: [ROOT] #pragma link C++ macro ...

Hi,

> G__add_macro("MYMACRO=Expanded Macro");

A warning ... I've just tried it and I've found that ... a macro added this way is added to the "command line" macros ... It doesn't also work well when I try G__add_macro("G4endl=std::endl") ...

> However, all you need to do is
> gROOT->ProcessLine("G__CINT_ENDL G4endl;");

Many thanks for this hint ...
The "gROOT->ProcessLine", as usually, generates a "segmentation violation", but, using your hint, I've found that the following seems to work :


	static int a_completely_irrelevant_variable = (
		G__load_text("G__CINT_ENDL &G4endl = std::endl;"),
		G__load_text("istream &G4cin = std::cin;"), 0);
---------------------------------

Then, finally, I am able to see it in root :
	root [0] .L ./G4.so
	root [1] std::endl
	(class G__CINT_ENDL)144910904
	root [2] G4endl
	(class G__CINT_ENDL)144910904
	root [3] std::cin
	(istream)1090694592
	root [4] G4cin
	(istream)1090694592
---------------------------------

I hope that the "class G__CINT_ENDL" is not just a "temporary" solution which will disappear from CINT one day ...

Thanks again,
Best regards,
Jacek. Received on Fri Mar 04 2005 - 00:59:24 MET

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