Skip to content

Commit 94ebdb2

Browse files
committed
Add checks
1 parent c2dab28 commit 94ebdb2

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
int External()
2+
{
3+
std::string path{"o2sim_Kine.root"};
4+
5+
TFile file(path.c_str(), "read");
6+
if (file.IsZombie()) {
7+
std::cerr << "Cannot open ROOT file " << path << std::endl;
8+
return 1;
9+
}
10+
11+
TTree* tree = (TTree*)file.Get("o2sim");
12+
13+
if (!tree) {
14+
std::cerr << "Cannot find tree o2sim in file " << path << "\n";
15+
return 1;
16+
}
17+
18+
return 0;
19+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pythia8_pp_clr-blc0_13tev.C
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pythia8_pp_clr-blc0_13tev.C

0 commit comments

Comments
 (0)