Skip to content

[RF] Correctly implement additional dataset feature in HistFactory#10553

Merged
guitargeek merged 2 commits intoroot-project:masterfrom
guitargeek:hf_3
May 18, 2022
Merged

[RF] Correctly implement additional dataset feature in HistFactory#10553
guitargeek merged 2 commits intoroot-project:masterfrom
guitargeek:hf_3

Conversation

@guitargeek
Copy link
Copy Markdown
Contributor

@guitargeek guitargeek commented May 9, 2022

In HistFactory, the presence of a Channel::GetAdditionalDatas function
hinted to the possibility of defining additional datases for a
HistFactory model, besides the nominal observations dataset named
"obsData".

When reading a user-generated HistFactory XML, the additional datasets
were in fact read into the Channel::fAdditionalData member, and
corresponding RooDataSets were created in the per-channel proto
workspaces.

However, when defining the Measurement object in C++ and dumping the XML
via PrintXML, the additional datasets were not considered. They were
also not considered when merging the datasets in the per-channel proto
workspaces into the simultaneous dataset. This commit suggests to
implement this correctly.

Now, one can define additional datasets as follows in the XML:

<Data HistoName="data" InputFile="data/example.root" HistoPath="" Name="addData"/>

If there is no Name tag, the RooDataSet in the workspace will use the
HistoName as its name.

In the touched code, some cleaning of commented out code and general code modernization is also suggested.

Closes #10538.

@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu2004/soversion, mac1015/python3, mac11/cxx17, windows10/cxx14
How to customize builds

1 similar comment
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu2004/soversion, mac1015/python3, mac11/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Copy Markdown

Build failed on mac1015/python3.
Running on macitois21.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@jndrf
Copy link
Copy Markdown

jndrf commented May 17, 2022

Hi @guitargeek , did you have time to look into this -- or maybe one of the reviewers? I don't have access to a mac, so I can't help troubleshooting these build failures.

@guitargeek
Copy link
Copy Markdown
Contributor Author

Hi, thanks for asking! All is okay here, the test failures are unrelated to RooFit, and we are just waiting for the review by @lmoneta who was busy with other things last week. But this will come maybe today or tomorrow and then we merge this.

@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu2004/soversion, mac1015/python3, mac11/cxx17, windows10/cxx14
How to customize builds

Copy link
Copy Markdown
Member

@lmoneta lmoneta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Jonas for this improvement!

@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu2004/soversion, mac1015/python3, mac11/cxx17, windows10/cxx14
How to customize builds

In HistFactory, the presence of a `Channel::GetAdditionalDatas` function
hinted to the possibility of defining additional datases for a
HistFactory model, besides the nominal observations dataset named
`"obsData"`.

When reading a user-generated HistFactory XML, the additional datasets
were in fact read into the `Channel::fAdditionalData` member, and
corresponding RooDataSets were created in the per-channel proto
workspaces.

However, when defining the Measurement object in C++ and dumping the XML
via `PrintXML`, the additional datasets were not considered. They were
also not considered when merging the datasets in the per-channel proto
workspaces into the simultaneous dataset. This commit suggests to
implement this correctly.

Now, one can define additional datasets as follows in the XML:
```xml
<Data HistoName="data" InputFile="data/example.root" HistoPath="" Name="addData"/>
```
If there is no `Name` tag, the RooDataSet in the workspace will use the
`HistoName` as its name.

Closes root-project#10538.
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu2004/soversion, mac1015/python3, mac11/cxx17, windows10/cxx14
How to customize builds

@guitargeek guitargeek merged commit 66e201c into root-project:master May 18, 2022
@guitargeek guitargeek deleted the hf_3 branch May 18, 2022 16:41
@phsft-bot
Copy link
Copy Markdown

Build failed on mac1015/python3.
Running on macitois22.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2022-05-18T19:56:21.904Z] CMake Error at /Volumes/HD2/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1083 (message):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RF] AdditionalData is not exported to XML

4 participants