31#define USEMEMPOOLFORARGSET
32template <
class RooSet_t,
size_t>
38#ifdef USEMEMPOOLFORARGSET
39 void*
operator new (
size_t bytes);
40 void*
operator new (
size_t bytes,
void* ptr)
noexcept;
41 void operator delete (
void *ptr);
60 template<
typename... Args_t>
73 processArgs(arg, std::forward<Args_t>(moreArgsOrName)...);
78 template<
typename... Args_t>
80 :
RooArgSet{arg, std::move(arg), std::forward<Args_t>(moreArgsOrName)...} {}
82 template<
typename... Args_t>
83 explicit RooArgSet(
double arg, Args_t &&... moreArgsOrName) {
84 processArgs(arg, std::forward<Args_t>(moreArgsOrName)...);
92 template<
typename Iterator_t,
93 typename value_type =
typename std::remove_pointer<typename std::iterator_traits<Iterator_t>::value_type>
::type,
94 typename = std::enable_if<std::is_convertible<const value_type*, const RooAbsArg*>::value> >
97 for (
auto it = beginIt; it != endIt; ++it) {
109 for(
auto const& arg :
vec) {
120 const char *
name=
"");
132 using RooAbsCollection::operator[];
138 virtual bool readFromStream(std::istream& is,
bool compact,
bool verbose=
false) {
143 virtual void writeToStream(std::ostream& os,
bool compact,
const char* section=0)
const;
150 return find(var) == &var;
181 template<
typename... Args_t>
184 int dummy[] = { 0, (
processArg(std::forward<Args_t>(args)), 0) ... };
190 template<
class Arg_t>
203#ifdef USEMEMPOOLFORARGSET
218template<
class... Args_t>
220 return {std::forward<Args_t>(args)...};
typedef void(GLAPIENTRYP _GLUfuncptr)(void)
#define ClassDefOverride(name, id)
Memory pool for RooArgSet and RooDataSet.
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
static void assert_is_no_temporary(T &&)
const char * GetName() const
Returns name of object.
RooAbsCollection & operator=(const RooAbsCollection &other)
Assign values from the elements in other to our elements.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
void processArg(RooAbsCollection &&coll)
TObject * clone(const char *newname) const override
RooArgSet & operator=(const RooArgSet &other)
RooArgSet(RooAbsArg &&arg, Args_t &&... moreArgsOrName)
This constructor will provoke a static_assert, because passing a RooAbsArg as r-value reference is no...
RooArgSet * snapshot(bool deepCopy=true) const
Use RooAbsCollection::snapshot(), but return as RooArgSet.
void processArg(Arg_t &&arg)
RooArgSet()
Default constructor.
RooFit::UniqueId< RooArgSet > const & uniqueId() const
Returns a unique ID that is different for every instantiated RooArgSet.
RooArgSet(std::vector< RooAbsArgPtrOrDouble > const &vec)
Construct a non-owning RooArgSet from a vector of RooAbsArg pointers.
~RooArgSet() override
Destructor.
Bool_t snapshot(RooAbsCollection &output, Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents.
Bool_t readFromFile(const char *fileName, const char *flagReadAtt=0, const char *section=0, Bool_t verbose=kFALSE)
Read contents of the argset from specified file.
Bool_t isInRange(const char *rangeSpec)
virtual void writeToStream(std::ostream &os, bool compact, const char *section=0) const
Write the contents of the argset in ASCII form to given stream.
void processArg(const char *name)
RooArgSet(RooArgSet &&other)
Move constructor.
void writeToFile(const char *fileName) const
Write contents of the argset to specified file.
TObject * create(const char *newname) const override
static MemPool * memPool()
void processArgs(Args_t &&... args)
virtual bool canBeAdded(const RooAbsArg &arg, bool silent) const override
Determine whether it's possible to add a given RooAbsArg to the collection or not.
void processArg(const RooAbsArg *arg)
void processArg(const RooAbsCollection &coll)
Bool_t containsInstance(const RooAbsArg &var) const override
Check if this exact instance is in this collection.
RooArgSet(double arg, Args_t &&... moreArgsOrName)
MemPoolForRooSets< RooArgSet, 10 *600 > MemPool
void processArg(const RooArgList &list)
void processArg(RooAbsArg *var)
const RooFit::UniqueId< RooArgSet > _uniqueId
Bool_t checkForDup(const RooAbsArg &arg, Bool_t silent) const
Check if element with var's name is already in set.
virtual bool readFromStream(std::istream &is, bool compact, bool verbose=false)
Shortcut for readFromStream(std::istream&, Bool_t, const char*, const char*, Bool_t),...
RooArgSet(Iterator_t beginIt, Iterator_t endIt, const char *name="")
Construct a (non-owning) RooArgSet from iterators.
void processArg(const RooAbsArg &arg)
RooAbsArg & operator[](const TString &str) const
Get reference to an element using its name.
RooArgSet(const RooAbsArg &arg, Args_t &&... moreArgsOrName)
Construct a (non-owning) RooArgSet from one or more RooFit objects.
Collection abstract base class.
Mother of all ROOT objects.
RooArgSet S(Args_t &&... args)
A UniqueId can be added as a class member to enhance any class with a unique identifier for each inst...
static void output(int code)