File tree Expand file tree Collapse file tree 3 files changed +87
-0
lines changed
MC/config/common/ini/tests Expand file tree Collapse file tree 3 files changed +87
-0
lines changed Original file line number Diff line number Diff line change 1+ int External () {
2+ std ::string path {"o2sim_Kine.root" };
3+
4+ TFile file (path .c_str (), "READ ");
5+ if (file .IsZombie ()) {
6+ std ::cerr << "Cannot open ROOT file " << path << "\n" ;
7+ return 1 ;
8+ }
9+
10+ auto tree = (TTree * )file .Get ("o2sim" );
11+ if (!tree ) {
12+ std ::cerr << "Cannot find tree o2sim in file " << path << "\n" ;
13+ return 1 ;
14+ }
15+ std ::vector < o2 ::MCTrack > * tracks {};
16+ tree -> SetBranchAddress ("MCTrack" , & tracks );
17+
18+ auto nEvents = tree -> GetEntries ();
19+ if (nEvents == 0 ) {
20+ std ::cerr << "No event of interest\n" ;
21+ return 1 ;
22+ }
23+ return 0 ;
24+ }
25+
26+ int Pythia8 ()
27+ {
28+ return External ();
29+ }
Original file line number Diff line number Diff line change 1+ int External () {
2+ std ::string path {"o2sim_Kine.root" };
3+
4+ TFile file (path .c_str (), "READ ");
5+ if (file .IsZombie ()) {
6+ std ::cerr << "Cannot open ROOT file " << path << "\n" ;
7+ return 1 ;
8+ }
9+
10+ auto tree = (TTree * )file .Get ("o2sim" );
11+ if (!tree ) {
12+ std ::cerr << "Cannot find tree o2sim in file " << path << "\n" ;
13+ return 1 ;
14+ }
15+ std ::vector < o2 ::MCTrack > * tracks {};
16+ tree -> SetBranchAddress ("MCTrack" , & tracks );
17+
18+ auto nEvents = tree -> GetEntries ();
19+ if (nEvents == 0 ) {
20+ std ::cerr << "No event of interest\n" ;
21+ return 1 ;
22+ }
23+ return 0 ;
24+ }
25+
26+ int Pythia8 ()
27+ {
28+ return External ();
29+ }
Original file line number Diff line number Diff line change 1+ int External () {
2+ std ::string path {"o2sim_Kine.root" };
3+
4+ TFile file (path .c_str (), "READ ");
5+ if (file .IsZombie ()) {
6+ std ::cerr << "Cannot open ROOT file " << path << "\n" ;
7+ return 1 ;
8+ }
9+
10+ auto tree = (TTree * )file .Get ("o2sim" );
11+ if (!tree ) {
12+ std ::cerr << "Cannot find tree o2sim in file " << path << "\n" ;
13+ return 1 ;
14+ }
15+ std ::vector < o2 ::MCTrack > * tracks {};
16+ tree -> SetBranchAddress ("MCTrack" , & tracks );
17+
18+ auto nEvents = tree -> GetEntries ();
19+ if (nEvents == 0 ) {
20+ std ::cerr << "No event of interest\n" ;
21+ return 1 ;
22+ }
23+ return 0 ;
24+ }
25+
26+ int Pythia8 ()
27+ {
28+ return External ();
29+ }
You can’t perform that action at this time.
0 commit comments