17#ifndef ROOFIT_ROOFITCORE_INC_ROOHELPERS_H_
18#define ROOFIT_ROOFITCORE_INC_ROOHELPERS_H_
50 unsigned int extraTopics = 0u,
51 unsigned int removeTopics = 0u,
52 bool overrideExternalLevel =
true);
58 std::vector<RooMsgService::StreamConfig>
fOldConf;
89 std::vector<RooMsgService::StreamConfig>
_oldConf;
96 double min = -std::numeric_limits<double>::max(),
double max = std::numeric_limits<double>::max(),
97 bool limitsInAllowedRange =
false, std::string
const& extraMessage =
"");
144 std::unique_ptr<T> clone{
static_cast<T *
>(arg.cloneTree())};
146 arg.getParameters(observables, origParams);
147 clone->recursiveRedirectServers(origParams);
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
void setOperMode(OperMode mode, bool recurseADirty=true)
Set the operation mode of this node.
static void setDirtyInhibit(bool flag)
Control global dirty inhibit mode.
RooAbsData is the common abstract base class for binned and unbinned datasets.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Struct to temporarily change the operation mode of a RooAbsArg until it goes out of scope.
RooAbsArg::OperMode _oldOpMode
ChangeOperModeRAII(RooAbsArg *arg, RooAbsArg::OperMode opMode)
Hijacks all messages with given level and topic (and optionally object name) while alive.
std::ostringstream & stream()
RooFit::MsgLevel _oldKillBelow
std::vector< RooMsgService::StreamConfig > _oldConf
~HijackMessageStream()
Deregister the hijacked stream and restore the stream state of all previous streams.
const HijackMessageStream & operator<<(const T &v) const
Switches the message service to a different level while the instance is alive.
RooFit::MsgLevel fOldKillBelow
std::vector< RooMsgService::StreamConfig > fOldConf
Mother of all ROOT objects.
MsgLevel
Verbosity level for RooMsgService::StreamConfig in RooMsgService.
MsgTopic
Topics for a RooMsgService::StreamConfig in RooMsgService.
void getSortedComputationGraph(RooAbsReal const &func, RooArgSet &out)
Get the topologically-sorted list of all nodes in the computation graph.
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.
std::unique_ptr< T > cloneTreeWithSameParameters(T const &arg, RooArgSet const *observables=nullptr)
Clone RooAbsArg object and reattach to original parameters.
std::string getRangeNameForSimComponent(std::string const &rangeName, bool splitRange, std::string const &catName)
RooArgSet selectFromArgSet(RooArgSet const &, std::string const &names)
Construct a RooArgSet of objects in a RooArgSet whose names match to those in the names string.
bool checkIfRangesOverlap(RooArgSet const &observables, std::vector< std::string > const &rangeNames)
Check if there is any overlap when a list of ranges is applied to a set of observables.
BinnedLOutput getBinnedL(RooAbsPdf const &pdf)
std::pair< double, double > getRangeOrBinningInterval(RooAbsArg const *arg, const char *rangeName)
Get the lower and upper bound of parameter range if arg can be casted to RooAbsRealLValue.
std::string getColonSeparatedNameString(RooArgSet const &argSet)
Create a string with all sorted names of RooArgSet elements separated by colons.
Disable all caches for sub-branches in an expression tree.
DisableCachingRAII(bool oldState)
Inhibit all dirty-state propagation, and assume every node as dirty.
Wrap an object into a TObject. Sometimes needed to avoid reinterpret_cast or enable RTTI.