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 2761632 commit 99bc6c8Copy full SHA for 99bc6c8
MC/config/PWGLF/ini/tests/GeneratorLFStrangenessInJets_gap4.C
@@ -0,0 +1,28 @@
1
+#include "TFile.h"
2
+#include "TTree.h"
3
+#include <vector>
4
+#include <iostream>
5
+#include "SimulationDataFormat/MCTrack.h"
6
+
7
+int Hybrid()
8
+{
9
+ std::string path{"o2sim_Kine.root"};
10
11
+ TFile file(path.c_str(), "READ");
12
+ if (file.IsZombie()) {
13
+ std::cerr << "Cannot open ROOT file " << path << "\n";
14
+ return 1;
15
+ }
16
17
+ auto tree = (TTree *)file.Get("o2sim");
18
+ if (!tree) {
19
+ std::cerr << "Cannot find tree o2sim in file " << path << "\n";
20
21
22
23
+ std::vector<o2::MCTrack> *tracks{};
24
+ tree->SetBranchAddress("MCTrack", &tracks);
25
26
+ std::cout << "Found " << tree->GetEntries() << " events." << std::endl;
27
+ return 0;
28
+}
0 commit comments