JeffersonLab / hcana

Hall C++ Analyzer
7 stars 118 forks source link

Hodtest fixup #467

Closed hansenjo closed 3 years ago

hansenjo commented 3 years ago

examples/hodtest.C crashed on me when running it with the current version of hcana. The error was not particularly clear. I traced it to two apparently incorrect entries in examples/PARAM/hcana.param, which are corrected here. hodtest.C now works for me, and the histograms more or less match what's in the wiki.

I also added a clarifying message to be printed in case the program exits because of bad parameters. Perhaps instead of calling exit(), throwing an exception would be a little cleaner, especially if such fatal errors may occur in several different places, but I'll leave it as it is for now.