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 5ea414e commit 859fc25Copy full SHA for 859fc25
MC/config/PWGLF/ini/tests/GeneratorLF_pp1360_wDeInel.C
@@ -1,8 +1,28 @@
1
-int External() {
+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
}
-
-int Pythia8()
-{
- return External();
-}
0 commit comments