fact-project / fact-tools

The fact-tools are an extension to the streams framework to analyse the data of the First G-APD Cherenkov Telescope.
http://sfb876.tu-dortmund.de/FACT/
GNU General Public License v3.0
6 stars 1 forks source link

Support classpath:/ urls for input files #328

Closed maxnoe closed 6 years ago

maxnoe commented 6 years ago

This fixes some long standing issues of using -Ddrsfile=classpath:/testDrsFile.fits.gz or something similar

See this: which was actually not fixed https://github.com/fact-project/fact-tools/issues/90

kbruegge commented 6 years ago

This is nice. Does that mean we can remove this SourceURL business everywhere?

maxnoe commented 6 years ago

If I didn't overlook anything, the only place where it is still used is Stream implementations, as the constructor requires aSourceURL

kbruegge commented 6 years ago

So this means we can finally add classpathes to the xmls here right? https://github.com/fact-project/fact-tools/blob/ec792dd0ea13d0d880438e171493d3bea5b4e85d/examples/stdAnalysis.xml#L4-L6

maxnoe commented 6 years ago

Oh yes, this should work now!

maxnoe commented 6 years ago

For the inputfiles, it works but not for the aux folder

maxnoe commented 6 years ago

The AuxFileService uses Paths, I think these cannot handle classpath resources

kbruegge commented 6 years ago

To make this work with auxfile thingy I'd have to restructure the HDUreader to accept inputstreams. That's not entirely trivial. Maybe another time.

kbruegge commented 6 years ago

Refactored a bit in the last two commits.

kbruegge commented 6 years ago

Wow. I can approve my own commits. Nice. 🥇