Skip to content

Avoid race condition in histogram creation

Peter Onyisi requested to merge ponyisi/athena:master-dq-tau-duplicates into master

When a histogram is created, it by default lives in the current gDirectory; creation of multiple histograms with the same name causes bad behavior in ROOT. Therefore multiple algorithms that want to create a histogram with the same name might execute on multiple threads and step on each other. This fix puts a global mutex around the creation of histograms & calling SetDirectory(0) to detach them from ROOT's memory management. This race condition was seen reliably when running DQ in MT mode.

Merge request reports