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

std analysis erna observations does not work anymore with erna.process_fact_data #353

Closed jebuss closed 6 years ago

jebuss commented 6 years ago

Using the recent fact-tools version with erna.process_fact_data does not work anymore for two reasons:

  1. it still uses the old fact.auxservice.SqliteService, which is not needed anymore since there is fact.auxservice.AuxFileService that can handle directory trees.

https://github.com/fact-project/fact-tools/blob/328feab9e6b9136057e410a8227395a206298b6e/examples/forErna/std_analysis_erna_observations.xml#L8-L12

  1. erna provides the drs-file as key-value-pair in the data item via fact.io.FactFileListMultiStream but classpath:/analysis/calibration.xml uses fact.datacorrection.DrsCalibration with a URL given by a property "${drsfile}" this way the key @drsFileis never checked.

https://github.com/fact-project/fact-tools/blob/328feab9e6b9136057e410a8227395a206298b6e/src/main/resources/analysis/calibration.xml#L11-L15

I suggest:

  1. exchange fact.auxservice.SqliteService by fact.auxservice.AuxFileService
  2. delete: https://github.com/fact-project/fact-tools/blob/328feab9e6b9136057e410a8227395a206298b6e/src/main/resources/analysis/calibration.xml#L12 and put a <stream.data.SetValue key="@drsFile" value "${drsfile}"/> into the std-analysis.
jebuss commented 6 years ago

fact.datacorrection.DrsCalibration will anyways search the data item for @drsFile if no URL is provided: https://github.com/fact-project/fact-tools/blob/328feab9e6b9136057e410a8227395a206298b6e/src/main/java/fact/datacorrection/DrsCalibration.java#L40-L42

https://github.com/fact-project/fact-tools/blob/328feab9e6b9136057e410a8227395a206298b6e/src/main/java/fact/datacorrection/DrsCalibration.java#L100-L102

tarrox commented 6 years ago

This problem is also in part a problem that is also discussed in #351