whats the number of times the letter s appears in:
i save a histogram on a tfile and then open it in another macro. opening it in interactive mode is not a problem. opening it is compiled mode (through the macro), i do not get to view it. a hint from a collague was to use tapplication and the function run(), but when i do this, i lose the connection with interactive mode - my session seems to be locked and i cannot run my macro a second time. any ideas for solutions?
please provide more information about what you are trying to do, if possible a script.
[quote]file2.close(); // this i cannot use at all without getting segmentation fault [/quote]this is the expected result . the tfile object owns by default the histogram and ttree object you read from it. when the tfile is closed, all the object the tfile owns are deleted (and hence your h1->draw() uses random memory!).
that did the trick . amazing that that was all i needed to do , i have been working around the problem all week having to close and reopen terminal windows every time i ran my code.
user
The passage contains thirty-eight "s"s.
assistant