Allow FSRootDataReader to Read Included Weight Branch#380
Allow FSRootDataReader to Read Included Weight Branch#380jrstevenjlab merged 6 commits intomasterfrom
Conversation
If a friend tree for the weights is not provided, the weight defaults to 1.0, but there is a possibility for the user to provide a weight branch in the main tree as well. This commit checks for that possibility.
Backwards compatibility is maintained, but user can now specify a custom branch name for event weights. Also added some usage comments, and aligned some of the styles between the two readers.
|
Just added the ability for the user to specify the name of the weight branch. Since the argument lists were getting quite long, I've added some comments for guidance as well. The usage is still backwards compatible though. |
|
@aaust is auto-build not running for halld_sim? I think this is ready to merge but it doesn't look like the build kicked off successfully |
|
Build status for this pull request: FAILURE Build log: /work/halld/pull_request_test/halld_sim^fsroot_reader_weights/make_fsroot_reader_weights.log |
| if (args.size() == 7) { | ||
| fourMomentumPrefix = args[6]; | ||
| } | ||
| else if (args.size() == 8) { |
There was a problem hiding this comment.
yep, I just pushed an update
|
Test status for this pull request: SUCCESS Summary: /work/halld/pull_request_test/halld_sim^fsroot_reader_weights/tests/summary.txt Build log: /work/halld/pull_request_test/halld_sim^fsroot_reader_weights/make_fsroot_reader_weights.log |
The current FSRootDataReader can only read event weights if a specified friend tree is included in the config file, but it's possible for the file itself to have a weight branch that can be read, like in ROOTDataReader. These commits add this ability.
There is also some small checks for opening the files and trees, and avoids a potential issue of having
ifstreamandTFileopen at the same time.