Skip to content

Commit 70767c6

Browse files
committed
faster file list ingestion for flat lists
1 parent 8ebb7bc commit 70767c6

File tree

1 file changed

+8
-3
lines changed
  • src/main/java/edu/vanderbilt/accre/laurelin

1 file changed

+8
-3
lines changed

src/main/java/edu/vanderbilt/accre/laurelin/Root.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,14 @@ public TTreeDataSourceV2Reader(DataSourceOptions options, CacheFactory basketCac
231231
logger.trace("construct ttreedatasourcev2reader");
232232
this.sparkContext = sparkContext;
233233
try {
234-
this.paths = new LinkedList<String>();
235-
for (String path: options.paths()) {
236-
this.paths.addAll(IOFactory.expandPathToList(path));
234+
this.paths = new LinkedList<String>();
235+
String[] in_paths = options.paths();
236+
for (int i = 0; i < in_paths.length; ++i) {
237+
if(in_paths[i].endsWith(".root") ) {
238+
this.paths.add(in_paths[i]);
239+
} else {
240+
this.paths.addAll(IOFactory.expandPathToList(in_paths[i]));
241+
}
237242
}
238243
// FIXME - More than one file, please
239244
currFile = TFile.getFromFile(fileCache.getROOTFile(this.paths.get(0)));

0 commit comments

Comments
 (0)