ROOT
master
Reference Guide
Loading...
Searching...
No Matches
SharedOffset.h
Go to the documentation of this file.
1
/*
2
* Project: RooFit
3
* Authors:
4
* PB, Patrick Bos, Netherlands eScience Center, p.bos@esciencecenter.nl
5
*
6
* Copyright (c) 2024, CERN
7
*
8
* Redistribution and use in source and binary forms,
9
* with or without modification, are permitted according to the terms
10
* listed in LICENSE (http://roofit.sourceforge.net/license.txt)
11
*/
12
13
#ifndef ROOT_ROOFIT_TESTSTATISTICS_SHAREDOFFSET_H
14
#define ROOT_ROOFIT_TESTSTATISTICS_SHAREDOFFSET_H
15
16
#include <
Math/Util.h
>
17
#include <vector>
18
#include <memory>
// shared_ptr
19
20
class
SharedOffset
{
21
public
:
22
SharedOffset
();
23
using
OffsetVec
= std::vector<ROOT::Math::KahanSum<double>>;
24
25
void
clear
();
26
void
swap
(
const
std::vector<std::size_t> &
component_keys
);
27
28
inline
OffsetVec
&
offsets
() {
return
*
offsets_
; };
29
inline
OffsetVec
&
offsets_save
() {
return
*
offsets_save_
; };
30
31
private
:
32
std::shared_ptr<OffsetVec>
offsets_
;
33
std::shared_ptr<OffsetVec>
offsets_save_
;
34
};
35
36
#endif
// ROOT_ROOFIT_TESTSTATISTICS_SHAREDOFFSET_H
Util.h
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
SharedOffset
Definition
SharedOffset.h:20
SharedOffset::SharedOffset
SharedOffset()
Definition
SharedOffset.cxx:15
SharedOffset::swap
void swap(const std::vector< std::size_t > &component_keys)
When calculating an unbinned likelihood with square weights applied, a different offset is necessary.
Definition
SharedOffset.cxx:28
SharedOffset::OffsetVec
std::vector< ROOT::Math::KahanSum< double > > OffsetVec
Definition
SharedOffset.h:23
SharedOffset::clear
void clear()
Definition
SharedOffset.cxx:17
SharedOffset::offsets_save_
std::shared_ptr< OffsetVec > offsets_save_
Definition
SharedOffset.h:33
SharedOffset::offsets_save
OffsetVec & offsets_save()
Definition
SharedOffset.h:29
SharedOffset::offsets
OffsetVec & offsets()
Definition
SharedOffset.h:28
SharedOffset::offsets_
std::shared_ptr< OffsetVec > offsets_
Definition
SharedOffset.h:32
roofit
roofitcore
inc
RooFit
TestStatistics
SharedOffset.h
ROOT master - Reference Guide Generated on Mon Mar 10 2025 15:21:23 (GVA Time) using Doxygen 1.10.0