Hi all, first : Axel - thanks a lot for your help ! > Translated to existing root methods it could look something like this: > double EVA::customValue(void) { > double result = gROOT->ProcessLineFast( > Form("/where/script/resides/script.cc(%p);", > &stlVectorWithDoubles)); > return result; > } > > Your script will have to look like this: > double script(std::vector<double>* pvec){ > ... > } >From what I can see, gROOT is a global variable set in TROOT.cxx as a pointer to an instance of TROOT. My intention is to use root as an extension language both in a multithreaded environment and in MPI programs. While having more than one root session running isn't a problem in the MPI case (each is constrained to a separate MPI application), the same does not apply to the POSIX Thread case. I'm not too sure whether root uses gROOT anywhere internally, in which case having more than one instance of TROOT in my application would break things. If gROOT is only for the benefit of root users, I could simply "forbid" users to use it and instead e.g. provide them with an argument for script.cc that contains a pointer to my TROOT instance. Are there better ways of doing this and is anybody using multiple instances of root in a multithreaded environment ? Thanks and have a nice day, Ruediger
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET