Skip to content

Evtpool merger#15593

Open
jackal1-66 wants to merge 2 commits into
AliceO2Group:devfrom
jackal1-66:evtpoolMerger
Open

Evtpool merger#15593
jackal1-66 wants to merge 2 commits into
AliceO2Group:devfrom
jackal1-66:evtpoolMerger

Conversation

@jackal1-66

Copy link
Copy Markdown
Collaborator

A multi-threaded merger is created for the evtpool files (Kine files will work as well). Only the file reading is multi-worker based, while the writing is sequential. The development takes care of increasing the EventID in the MCEventHeader. std::optional is used in order to distinguish the cases in which a file is opened, succesfully read but it is empty (in this case an empty vector is returned), with the case in which the file is not read at all (a std::null_opt is returned in this other case) . In addition:

  • --input accepts a mix of .root pool files and list files (local or alien://), one path per line, # comments, resolved recursively and protection against recursion (a files list cannot include itself).
  • Concurrent TFile::Open("alien://...") from multiple reader threads crashes because TJAlienConnectionManager is a non-reentrant singleton, and simultaneous Connect() calls corrupt its shared websocket/TLS state. This is not covered by ROOT::EnableThreadSafety() --> the open/connect step for alien:// paths is serialized behind a mutex (gAlienOpenMutex); local files and the actual per-file tree reads after opening remain fully parallel.

Should an example be generated as well? opened the PR to test full compatibility with CI, tested already locally and output tested with the help of @romainschotter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant