celeritas
celeritas copied to clipboard
Update celer-g4 ROOT I/O
The ROOT I/O system in the celer-g4 integration app is currently fully managed by a single class (RootIO) that manages all the data, all the ROOT files (for each thread), and the merging of in-memory TFiles from worker threads into a final ROOT file in the master thread that is written to disk.
An overhaul of the I/O system includes:
- Making ROOT a build option (currently a requirement), for different output implementations (simple diagnostics, ADIOS, and so on).
- Easier maintainability by splitting different purposes to different classes:
RootFileManagerwould manage all in-memory TFiles from different threads.- A new class would manage thread-local TTree data storage for hit data.
- A new class would manage ROOT histograms for quick validation and small output files.
- A new class would manage the merging of the in-memory files if needed. Since different threads manage different events, each file is still a complete file, and
celer-g4could simply write all thread-local files to disk. Analyses would loop over multiple files or possibly just use ROOT'shaddcommand line tool to merge them.