18CountHelper::CountHelper(
const std::shared_ptr<ULong64_t> &
resultCount,
const unsigned int nSlots)
23void CountHelper::Exec(
unsigned int slot)
28void CountHelper::Finalize()
31 for (
auto &
c : fCounts) {
41void BufferedFillHelper::UpdateMinMax(
unsigned int slot,
double v)
49BufferedFillHelper::BufferedFillHelper(
const std::shared_ptr<Hist_t> &
h,
const unsigned int nSlots)
54 fBuffers.reserve(fNSlots);
56 for (
unsigned int i = 0; i < fNSlots; ++i) {
59 fBuffers.emplace_back(
v);
64void BufferedFillHelper::Exec(
unsigned int slot,
double v)
67 fBuffers[
slot].emplace_back(
v);
70void BufferedFillHelper::Exec(
unsigned int slot,
double v,
double w)
73 fBuffers[
slot].emplace_back(
v);
77Hist_t &BufferedFillHelper::PartialUpdate(
unsigned int slot)
88void BufferedFillHelper::Finalize()
90 for (
unsigned int i = 0; i < fNSlots; ++i) {
92 throw std::runtime_error(
"Cannot fill weighted histogram with values in containers of different sizes.");
100 globalMax != std::numeric_limits<BufEl_t>::lowest()) {
104 for (
unsigned int i = 0; i < fNSlots; ++i) {
110MeanHelper::MeanHelper(
const std::shared_ptr<double> &
meanVPtr,
const unsigned int nSlots)
115void MeanHelper::Exec(
unsigned int slot,
double v)
125void MeanHelper::Finalize()
139 for (
auto &
c : fCounts)
144double &MeanHelper::PartialUpdate(
unsigned int slot)
150StdDevHelper::StdDevHelper(
const std::shared_ptr<double> &
meanVPtr,
const unsigned int nSlots)
155void StdDevHelper::Exec(
unsigned int slot,
double v)
158 auto count = ++fCounts[
slot];
159 auto delta =
v - fMeans[
slot];
160 auto mean = fMeans[
slot] + delta / count;
164 fCounts[
slot] = count;
169void StdDevHelper::Finalize()
173 for (
auto c : fCounts) {
183 for (
unsigned int i = 0; i < fNSlots; ++i) {
189 for (
unsigned int i = 0; i < fNSlots; ++i) {
190 if (fCounts[i] == 0) {
224 throw std::invalid_argument(
"Snapshot: cannot open file \"" + fileName +
"\" in update mode");
231 if (
opts.fOverwriteIfExists) {
232 if (
outTree->InheritsFrom(
"TTree")) {
238 const std::string
msg =
"Snapshot: tree \"" +
treeName +
"\" already present in file \"" + fileName +
239 "\". If you want to delete the original tree and write another, please set "
240 "RSnapshotOptions::fOverwriteIfExists to true.";
241 throw std::invalid_argument(
msg);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
unsigned long long ULong64_t
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Mother of all ROOT objects.
A TTree represents a columnar dataset.
void ValidateSnapshotOutput(const RSnapshotOptions &opts, const std::string &treeName, const std::string &fileName)
constexpr std::size_t CacheLineStep()
Stepping through CacheLineStep<T> values in a vector<T> brings you to a new cache line.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
A collection of options to steer the creation of the dataset on file.