Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
optional_parameter_types.cxx
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) 2021, 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
14
15namespace RooFit {
16namespace TestStatistics {
17
18ConstrainedParameters::ConstrainedParameters(const RooArgSet &parameters) : set(parameters) {}
19// N.B.: the default constructor must be _user-provided_ defaulted, otherwise aggregate initialization will be possible,
20// which bypasses the explicit constructor and even leads to errors in some compilers; when initializing as
21// ConstrainedParameters({someRooArgSet})
22// compilers can respond with
23// call of overloaded ‘GlobalObservables(<brace-enclosed initializer list>)’ is ambiguous
24// This problem is well documented in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1008r0.pdf. The solution
25// used here is detailed in section 1.4 of that paper. Note that in C++17, the workaround is no longer necessary and
26// the constructor can be _user-declared_ default (i.e. directly in the declaration above).
28
29ExternalConstraints::ExternalConstraints(const RooArgSet &constraints) : set(constraints) {}
31
32GlobalObservables::GlobalObservables(const RooArgSet &observables) : set(observables) {}
34
35}
36}
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:35
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Definition Common.h:18