Interactive mode creates empty ROOT file at end

Issue #115 resolved
Jochem Snuverink created an issue

The ROOT file is created at end of run, but a new file should only be created at start of run.

Comments (5)

  1. Jochem Snuverink reporter

    To make this possible, we need an additional Initialise() method in BDSOutputBase.hh. Currently we only have

    • Commit() : writes, closes and opens a new file
    • Write() : writes and closes

    Much more natural would be

    • Initialise() : opens a new file
    • Write() : writes and closes

    The current scheme is implemented for splitting up root files, but the second scheme can do that just as well. I don't see any showstoppers and will implement it soon.

  2. Laurie Nevay

    I agree about the changes to the functions. The current ones are really misnamed for what they do.

    I think Write() is still a bit of a misnomer though. Perhaps we can have:

    Initialise() = 0 : opens new file Write() = 0 : commits any buffered data / forces write Close() = 0 : closes file

    We then have the option of a non-virtual utility function in the base class to close the existing file and open a new one that calls the virtual methods - OR - this is just handled by the RunActions.

    Did Stewart change this in his rootevent branch?

  3. Jochem Snuverink reporter

    Agreed about the names, these are historic and follow ROOT convention.

    I am not aware of changes for this in the rootevent branch, but we can put this on hold until rootevent is merged, as this is not urgent.

  4. Log in to comment