Skip to content
Snippets Groups Projects
Commit 1e9826ee authored by Danilo Piparo's avatar Danilo Piparo
Browse files

[TTreeProcessorMT][ROOT-9948] Add test

parent e34fc3f4
No related branches found
No related tags found
No related merge requests found
......@@ -170,4 +170,16 @@ TEST(TreeProcessorMT, MaxTasks)
gSystem->Unlink(filename);
ROOT::DisableImplicitMT();
}
\ No newline at end of file
}
TEST(TreeProcessorMT, PathName)
{
auto fname = "root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/ZZTo4mu.root";
auto f = std::unique_ptr<TFile>(TFile::Open(fname));
auto tree = f->Get<TTree>("Events");
ROOT::TTreeProcessorMT p(*tree);
std::atomic<unsigned int> n (0U);
auto func = [&n](TTreeReader &t) { while (t.Next()) n++;};
p.Process(func);
EXPECT_EQ(n.load(), 1499064U) << "Wrong number of events processed!\n";
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment