Skip to content

Commit 9be9f6c

Browse files
committed
[test] test for entrylist within zip file
1 parent b70c119 commit 9be9f6c

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed
51.2 KB
Binary file not shown.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#include "TChain.h"
2+
#include "TDirectory.h"
3+
#include "TEntryList.h"
4+
5+
// First run: root $ROOTSYS/tutorials/tree/cernbuild.C
6+
// Then run: zip -n root cernstaff cernstaff.root
7+
8+
int execTEntryListZip()
9+
{
10+
TChain chain("T");
11+
chain.Add("cernstaff.zip#cernstaff.root");
12+
chain.Draw(">> elist0", "Age > 40", "entrylist");
13+
14+
// gDirectory->ls();
15+
auto el = static_cast<TEntryList *>(gDirectory->Get("elist0"));
16+
if (!el)
17+
return 2;
18+
// el->Print("V");
19+
20+
chain.SetEntryList(nullptr);
21+
chain.SetEntryList(el, "");
22+
23+
return (el == chain.GetEntryList()) ? 0 : 1;
24+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
Processing execTEntryListZip.cxx+...
3+
(int) 0

0 commit comments

Comments
 (0)