Fine, Valeri wrote:
> Thank you for your information about Linux file system. This must be taken in account of course.
>> the other process(es) will just see the old contents.
Well, I'm not sure what I want, either.
What I definitely DON'T want is Windows' current behavior with my code, as it forces the user to remember to close the file in Root before re-running the simulation that over-writes the file. On Linux and Mac the user must re-open the file after overwriting it (not so bad).
My new plan will work the same on all OSs (which is a boon): In Root I'll remember the filename and TNtuple name (rather than a pointer to the always-open TNtuple), and open the file and TNtuple only while using it. When the user has the mouse held down on a slider I'll keep them open until mouse release (my HistoRoot class provides sliders for interactive cuts on the histograms, as in the old HistoScope program). This way when the simulation is re-run, the user need not re-open the file, or close it, just create a new histogram which will use the current contents of the file. To prevent moving a slider on an old histogram from switching it to the new data, I'll disable the sliders if the modification time of the file has changed, giving an error messagebox.
> For me this is a little bit confusing
> Normally If I open the file with one and the same name I do want to see one and the same data.
> You claim this is not the case under Linux. The result depends of some sort of luck.
This is well known and documented for Linux. Windows' behavior is also well known and documented. They are different. Personally I prefer the Linux way, but that's mostly due to experience than any objective criteria. It's been almost a decade since I have done any Windows C++ development, and the difference caught me by surprise (:-)).
Tom Roberts
> Anyway, the Windows and Linux file system behave differently and I had proposed the approach that may have made the application behavior consistent across of the platforms, had I ?
>
>> It is a shame that Windows cannot cope with deleted open files.
>>> While the file is open in Root, I cannot delete it using Windows >>> explorer. >> Do you think it is unreasonable? >> There are two scenarios >> 1. Either you can not change (delete, write append ...) the file >> that had been open by some program >> or >> 2. You can, but that program should not try to access the file >> anymore or crash. >> >> The average Linux file system doesn't provide such level of the >> protection. I would like to call your attention that this is the >> feature of the Windows file system rather the concrete Windows >> application. >>
This archive was generated by hypermail 2.2.0 : Mon Feb 12 2007 - 17:50:01 CET