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

Empty drs file, fixes #353, fixes #351 #360

Closed maxnoe closed 6 years ago

jebuss commented 6 years ago

fixes #353

jebuss commented 6 years ago

fixes #351

maxnoe commented 6 years ago

Yes, the idea was to set it to the empty string!

maxnoe commented 6 years ago

It has to be set, but now the empty string is a valid value.

jebuss commented 6 years ago

Make sense to me, but even with en empty property <property name="drsfile" value="" /> I still get:

$ java -jar target/fact-tools-v1.0.2-12-g0bd380a-dirty.jar examples/forErna/std_analysis_erna_observations.xml
streams exited on error: Error while creating instance of 'fact.datacorrection.DrsCalibration'
java.lang.IllegalArgumentException: Error while creating instance of 'fact.datacorrection.DrsCalibration'
    at stream.runtime.setup.factory.DefaultProcessFactory.createProcessorAndRegisterServices(DefaultProcessFactory.java:295)
    at stream.runtime.setup.factory.DefaultProcessFactory.createNestedProcessors(DefaultProcessFactory.java:277)
    at stream.runtime.setup.factory.DefaultProcessFactory.createAndRegisterProcesses(DefaultProcessFactory.java:255)
    at stream.runtime.setup.handler.ProcessElementHandler.handleElement(ProcessElementHandler.java:96)
    at stream.runtime.ProcessContainer.init(ProcessContainer.java:517)
    at stream.runtime.ProcessContainer.<init>(ProcessContainer.java:401)
    at stream.runtime.ProcessContainer.<init>(ProcessContainer.java:250)
    at stream.run.main(run.java:164)
    at stream.run.main(run.java:147)
    at fact.run.main(run.java:26)
Caused by: java.lang.IllegalArgumentException: Property drsfile is not set.
    at stream.util.Variables.substitute(Variables.java:157)
    at stream.util.Variables.substitute(Variables.java:121)
    at stream.util.Variables.expand(Variables.java:113)
    at stream.runtime.setup.factory.ObjectFactory.create(ObjectFactory.java:243)
    at stream.runtime.setup.factory.ObjectFactory.create(ObjectFactory.java:214)
    at stream.runtime.setup.factory.DefaultProcessFactory.createProcessorAndRegisterServices(DefaultProcessFactory.java:293)

Dunno why that is

maxnoe commented 6 years ago

I opened a PR in streams to enable setting empty properties here: https://bitbucket.org/cbockermann/streams/pull-requests/15/allow-empty-properties

maxnoe commented 6 years ago

Just waiting for the tests to pass