Functions | |
std::map< RooFit::Detail::DataKey, RooSpan< const double > > | getDataSpans (RooAbsData const &data, std::string const &rangeName, RooSimultaneous const *simPdf, bool skipZeroWeights, bool takeGlobalObservablesFromData, std::stack< std::vector< double > > &buffers) |
Extract all content from a RooFit datasets as a map of spans. | |
std::map< RooFit::Detail::DataKey, RooSpan< const double > > RooFit::BatchModeDataHelpers::getDataSpans | ( | RooAbsData const & | data, |
std::string const & | rangeName, | ||
RooSimultaneous const * | simPdf, | ||
bool | skipZeroWeights, | ||
bool | takeGlobalObservablesFromData, | ||
std::stack< std::vector< double > > & | buffers | ||
) |
Extract all content from a RooFit datasets as a map of spans.
Spans with the weights and squared weights will be also stored in the map, keyed with the names _weight
and the _weight_sumW2
. If the dataset is unweighted, these weight spans will only contain the single value 1.0
. Entries with zero weight will be skipped. If the input dataset is a RooDataHist, the output map will also contain an item for the key _bin_volume
with the bin volumes.
std::map
with spans keyed to name pointers. [in] | data | The input dataset. |
[in] | rangeName | Select only entries from the data in a given range (empty string for no range). |
[in] | simPdf | A simultaneous pdf to use as a guide for splitting the dataset. The spans from each channel data will be prefixed with the channel name. |
[in] | skipZeroWeights | Skip entries with zero weight when filling the data spans. Be very careful with enabling it, because the user might not expect that the batch results are not aligned with the original dataset anymore! |
[in] | takeGlobalObservablesFromData | Take also the global observables stored in the dataset. |
[in] | buffers | Pass here an empty stack of double vectors, which will be used as memory for the data if the memory in the dataset object can't be used directly (e.g. because you used the range selection or the splitting by categories). |
Definition at line 220 of file BatchModeDataHelpers.cxx.