Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New metadata class to merge TRestRun files #382

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

juanangp
Copy link
Member

@juanangp juanangp commented Feb 26, 2023

juanangp Large: 337

New metadata class TRestRunMerger meant to merge different TRestRun files, merging of the files can be performed using rml config files or macros:

  • Merging of the files can only be done with the files that matches the run number.

@juanangp juanangp requested a review from jgalan February 26, 2023 21:28
@juanangp juanangp requested a review from lobis February 26, 2023 21:28
@jgalan
Copy link
Member

jgalan commented Feb 26, 2023

Why would we need to merge files? Each REST file has a unique TRestRun entry that identifies the data file. That's why I find a bit strange merging TRestRun files. Although we did this in the past ...

The data merging can be done at the TRestDataSet level, where the metadata of the TRestDataSet allows to univocally identify the file list used to generate the analysis dataset from a persistent read-only storage.

@juanangp
Copy link
Member Author

The data merging can be done at the TRestDataSet level, where the metadata of the TRestDataSet allows to univocally identify the file list used to generate the analysis dataset from a persistent read-only storage.

I am trying to perform the energy calibration of the data, this is the workflow that I have in mind:

  1. Data selection to avoid large files, this is done using TRestCut
  2. Merging of the files, now is possible using TRestRunMerger
  3. Perform the calibration and store the calibration constants and the converted energy in a TRestRun
  4. Perform a further analysis of the data.

So, in summary I would like to have a TRestRun with the calibration energy, but the calibration is split along several files, that's why I think it will be useful to perform the merging of TRestRuns. Also, note that the merging of the files is only performed among the files with the same run number.
The problem of TRestDataSet is that is read-only and I cannot save the calibration constants or the calibrated energy inside the files. So, I think that TRestDataSet can be used in step 4 but not in the steps before.
Otherwise, can you point me to a different workflow?

@lobis
Copy link
Member

lobis commented Feb 27, 2023

It's interesting that the clang-format failed even after the PR bot made the formatting changes... 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants