diff --git a/src/ramcore/SamToNTuple.cxx b/src/ramcore/SamToNTuple.cxx index f6d9a78..b649093 100644 --- a/src/ramcore/SamToNTuple.cxx +++ b/src/ramcore/SamToNTuple.cxx @@ -21,6 +21,7 @@ #include #include #include +#include namespace { @@ -36,14 +37,15 @@ void samtoramntuple(const char *datafile, int compression_algorithm, uint32_t quality_policy) { - TStopwatch stopwatch; - stopwatch.Start(); - - auto rootFile = std::unique_ptr(TFile::Open(treefile, "RECREATE")); - if (!rootFile || !rootFile->IsOpen()) { - printf("Failed to create RAM file %s\n", treefile); - return; - } + ROOT::EnableImplicitMT(); + TStopwatch stopwatch; + stopwatch.Start(); + + auto rootFile = std::unique_ptr(TFile::Open(treefile, "RECREATE")); + if (!rootFile || !rootFile->IsOpen()) { + std::cout << "Failed to create RAM file " << treefile << "\n"; + return; + } RAMNTupleRecord::InitializeRefs();