27 _clonedArgsSet.emplace(arg.
namePtr(), &arg);
32 auto existingServerClone = _clonedArgsSet.find(arg.
namePtr());
33 if (existingServerClone != _clonedArgsSet.end()) {
34 return existingServerClone->second;
42 for (
const auto server : arg.
servers()) {
43 if (
auto serverClone = this->compile(*server, arg, normSet)) {
44 serverClones.
add(*serverClone);
52 if (
auto existingServerClone = this->find(arg)) {
53 return existingServerClone;
63 newArg->setAttribute(
"_COMPILED");
64 const std::string attrib = std::string(
"ORIGNAME:") + arg.
GetName();
65 newArg->setAttribute(attrib.c_str());
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
const TNamed * namePtr() const
De-duplicated pointer to this object's name.
bool addOwnedComponents(const RooAbsCollection &comps)
Take ownership of the contents of 'comps'.
bool redirectServers(const RooAbsCollection &newServerList, bool mustReplaceAll=false, bool nameChange=false, bool isRecursionStep=false)
Replace all direct servers of this object with the new servers in newServerList.
virtual std::unique_ptr< RooAbsArg > compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext &ctx) const
const RefCountList_t & servers() const
List of all servers of this object.
bool getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
virtual bool isFundamental() const
Is this object a fundamental type that can be added to a dataset? Fundamental-type subclasses overrid...
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
void compileServers(RooAbsArg &arg, RooArgSet const &normSet)
RooAbsArg * find(RooAbsArg &arg) const
RooAbsArg * compileImpl(RooAbsArg &arg, RooAbsArg &owner, RooArgSet const &normSet)
CompileContext(RooArgSet const &topLevelNormSet)
const char * GetName() const override
Returns name of object.