34#include <unordered_map>
44 msg.setGlobalKillBelow(
lvl);
46 for (
int i = 0; i <
msg.numStreams(); ++i) {
49 msg.getStream(i).minLevel =
lvl;
51 msg.setStreamStatus(i,
true);
64 for (
int i = 0; i <
msg.numStreams(); ++i) {
65 if (i <
static_cast<int>(
fOldConf.size()))
82 msg.setGlobalKillBelow(level);
84 std::vector<RooMsgService::StreamConfig>
tmpStreams;
85 for (
int i = 0; i <
msg.numStreams(); ++i) {
89 msg.setStreamStatus(i,
false);
108 for (
unsigned int i = 0; i <
_oldConf.size(); ++i) {
131 if (par && ((par->getMin() < min || par->getMax() > max) ||
135 if (min > -std::numeric_limits<double>::max()) {
141 if (max < std::numeric_limits<double>::max()) {
148 <<
"The parameter '" << par->GetName() <<
"' with range [" << par->getMin(
"") <<
", " << par->getMax()
150 <<
"' exceeds the safe range of " <<
rangeMsg.str() <<
". Advise to limit its range."
179 const double fractions[] = {0.04, 0.27, 0.5, 0.73, 0.96};
184 for (std::size_t i = 0; i + 1 < boundaries.size() &&
isFlat; ++i) {
185 const double lo = boundaries[i];
186 const double hi = boundaries[i + 1];
187 double reference = 0.0;
191 const double val = function.getVal();
197 const double scale = std::max(std::abs(reference), 1
e-12);
211 auto out =
new std::list<double>;
215 const double delta = (xhi - xlo) * 1
e-8;
217 for (
double boundary : boundaries) {
223 out->push_front(xlo);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Abstract container object that can hold multiple RooAbsArg objects.
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
virtual void setVal(double value)=0
Set the current value of the object. Needs to be overridden by implementations.
Abstract base class for objects that represent a real value and implements functionality common to al...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
Object to represent discrete states.
Named container for two doubles, two integers two object points and three string pointers that can be...
RooFit::MsgLevel _oldKillBelow
HijackMessageStream(RooFit::MsgLevel level, RooFit::MsgTopic topics, const char *objectName=nullptr)
Hijack all messages with given level and topics while this object is alive.
std::vector< RooMsgService::StreamConfig > _oldConf
~HijackMessageStream()
Deregister the hijacked stream and restore the stream state of all previous streams.
RooFit::MsgLevel fOldKillBelow
LocalChangeMsgLevel(RooFit::MsgLevel lvl=RooFit::DEBUG, unsigned int extraTopics=0u, unsigned int removeTopics=0u, bool overrideExternalLevel=true)
Change message level (and topics) while this object is alive, reset when it goes out of scope.
std::vector< RooMsgService::StreamConfig > fOldConf
static RooMsgService & instance()
Return reference to singleton instance.
Variable that can be changed from the outside.
RooCmdArg ClassName(const char *name)
RooCmdArg OutputStream(std::ostream &os)
RooCmdArg Topic(Int_t topic)
RooCmdArg TagName(const char *name)
RooCmdArg BaseClassName(const char *name)
RooCmdArg ObjectName(const char *name)
MsgLevel
Verbosity level for RooMsgService::StreamConfig in RooMsgService.
MsgTopic
Topics for a RooMsgService::StreamConfig in RooMsgService.
void checkRangeOfParameters(const RooAbsReal *callingClass, std::initializer_list< const RooAbsReal * > pars, double min=-std::numeric_limits< double >::max(), double max=std::numeric_limits< double >::max(), bool limitsInAllowedRange=false, std::string const &extraMessage="")
Check if the parameters have a range, and warn if the range extends below / above the set limits.
bool isFunctionFlatInBins(const RooAbsReal &function, RooAbsRealLValue &obs, std::span< const double > boundaries, double relTol=1e-9)
Check that function is constant (flat) inside each bin defined by the sorted boundaries when scanning...
std::list< double > * binBoundariesInRange(std::span< const double > boundaries, double xlo, double xhi)
Return a newly allocated list with the subset of boundaries that lies strictly inside [xlo,...
bool setAllConstant(const RooAbsCollection &coll, bool constant=true)
set all RooRealVars to constants. return true if at least one changed status