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

hddm_merge_files utility doesn't work anymore #687

Open
jonzarling opened this issue Aug 24, 2022 · 5 comments
Open

hddm_merge_files utility doesn't work anymore #687

jonzarling opened this issue Aug 24, 2022 · 5 comments

Comments

@jonzarling
Copy link
Contributor

I'm trying to use the hddm_merge_files program to merge smeared and danarest files, as a way to reduce the large number of files that MCWrapper produces. It looks like it doesn't work though. Both smeared files and REST files seem to loop endlessly, writing out way more events than were supplied. Maybe something in the while loop in Process_r.cc and Process_s.cc is busted?

One can verify this behavior on the farm with the following steps:

  • cp -r /w/halld-scshelf2101/home/jzarling/github_issues/hddm_merge_REST .
  • hddm_merge_files -osmeared_out_test.hddm genEtaRegge_*_smeared.hddm
  • or hddm_merge_files -odana_merged_test.hddm dana_rest*.hddm

The original two files contain 20,000 and 319 events respectively. You can see the merged output file quickly exceeds this number.

@aaust
Copy link
Contributor

aaust commented Aug 24, 2022

You can try python instead:
https://halldweb.jlab.org/wiki/index.php/Guide_to_roll-your-own_python_hddm_transforms#example_1:_merging_files
We use this to merge the hddm files during the post-processing.

@rjones30
Copy link
Contributor

rjones30 commented Aug 31, 2022 via email

@rjones30
Copy link
Contributor

rjones30 commented Aug 31, 2022 via email

@rjones30
Copy link
Contributor

rjones30 commented Sep 3, 2022 via email

@jonzarling
Copy link
Contributor Author

jonzarling commented Sep 7, 2022

Thanks very much for working on the solution Richard, I was able to try today. Looks like it's partially working.

For the case of merging smeared hit-level files, the fix appears to work. However, the output file appears a little more than twice the input files in size. Maybe the output compression is different?

For the case of merging REST data files, things aren't quite working yet. The updated hddm_merge_files does loop over all events and exit fine, but the file outputted is too small and when running hd_dump appears to contain no events. That might need something additional done to it.

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

No branches or pull requests

3 participants