We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4319f1d commit 2040ba3Copy full SHA for 2040ba3
MC/config/PWGLF/ini/tests/GeneratorLF_Strangeness_OO5360_injection.C
@@ -0,0 +1,28 @@
1
+int External()
2
+{
3
+ std::string path{"o2sim_Kine.root"};
4
+
5
+ TFile file(path.c_str(), "READ");
6
+ if (file.IsZombie())
7
+ {
8
+ std::cerr << "Cannot open ROOT file " << path << "\n";
9
+ return 1;
10
+ }
11
12
+ auto tree = (TTree *)file.Get("o2sim");
13
+ if (!tree)
14
15
+ std::cerr << "Cannot find tree o2sim in file " << path << "\n";
16
17
18
+ std::vector<o2::MCTrack> *tracks{};
19
+ tree->SetBranchAddress("MCTrack", &tracks);
20
21
+ auto nEvents = tree->GetEntries();
22
+ if (nEvents < 1)
23
24
+ std::cerr << "No events actually generated: not OK!";
25
26
27
+ return 0;
28
+}
0 commit comments