Logo ROOT  
Reference Guide
RooArgList.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooArgList.h,v 1.14 2007/05/11 09:11:30 verkerke Exp $
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16#ifndef ROO_ARG_LIST
17#define ROO_ARG_LIST
18
19#include "RooAbsCollection.h"
20
22public:
23
24 // Constructors, assignment etc.
25 RooArgList();
26 RooArgList(const RooArgSet& set) ;
27 explicit RooArgList(const TCollection& tcoll, const char* name="") ;
28 explicit RooArgList(const char *name);
29 RooArgList(const RooAbsArg& var1,
30 const char *name="");
31 RooArgList(const RooAbsArg& var1, const RooAbsArg& var2,
32 const char *name="");
33 RooArgList(const RooAbsArg& var1, const RooAbsArg& var2,
34 const RooAbsArg& var3,
35 const char *name="");
36 RooArgList(const RooAbsArg& var1, const RooAbsArg& var2,
37 const RooAbsArg& var3, const RooAbsArg& var4,
38 const char *name="");
39 RooArgList(const RooAbsArg& var1, const RooAbsArg& var2,
40 const RooAbsArg& var3, const RooAbsArg& var4,
41 const RooAbsArg& var5,
42 const char *name="");
43 RooArgList(const RooAbsArg& var1, const RooAbsArg& var2,
44 const RooAbsArg& var3, const RooAbsArg& var4,
45 const RooAbsArg& var5, const RooAbsArg& var6,
46 const char *name="");
47 RooArgList(const RooAbsArg& var1, const RooAbsArg& var2,
48 const RooAbsArg& var3, const RooAbsArg& var4,
49 const RooAbsArg& var5, const RooAbsArg& var6,
50 const RooAbsArg& var7,
51 const char *name="");
52 RooArgList(const RooAbsArg& var1, const RooAbsArg& var2,
53 const RooAbsArg& var3, const RooAbsArg& var4,
54 const RooAbsArg& var5, const RooAbsArg& var6,
55 const RooAbsArg& var7, const RooAbsArg& var8,
56 const char *name="");
57 RooArgList(const RooAbsArg& var1, const RooAbsArg& var2,
58 const RooAbsArg& var3, const RooAbsArg& var4,
59 const RooAbsArg& var5, const RooAbsArg& var6,
60 const RooAbsArg& var7, const RooAbsArg& var8,
61 const RooAbsArg& var9, const char *name="");
62
63 virtual ~RooArgList();
64 // Create a copy of an existing list. New variables cannot be added
65 // to a copied list. The variables in the copied list are independent
66 // of the original variables.
67 RooArgList(const RooArgList& other, const char *name="");
68 virtual TObject* clone(const char* newname) const { return new RooArgList(*this,newname); }
69 virtual TObject* create(const char* newname) const { return new RooArgList(newname); }
70 RooArgList& operator=(const RooArgList& other) { RooAbsCollection::operator=(other) ; return *this ; }
71
72
73 /// Return object at given index, or nullptr if index is out of range
74 inline RooAbsArg* at(Int_t idx) const {
75
76 if (idx >= static_cast<Int_t>(_list.size()))
77 return nullptr;
78
79 return _list[idx];
80 }
81
82 // I/O streaming interface (machine readable)
83 virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t verbose=kFALSE) ;
84 virtual void writeToStream(std::ostream& os, Bool_t compact) ;
85
86 RooAbsArg& operator[](Int_t idx) const ;
87
88protected:
89
90 ClassDef(RooArgList,1) // Ordered list of RooAbsArg objects
91};
92
93#endif
const Bool_t kFALSE
Definition: RtypesCore.h:90
#define ClassDef(name, id)
Definition: Rtypes.h:322
char name[80]
Definition: TGX11.cxx:109
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:73
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooAbsCollection & operator=(const RooAbsCollection &other)
The assignment operator sets the value of any argument in our set that also appears in the other set.
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgList.h:21
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
Definition: RooArgList.h:74
virtual void writeToStream(std::ostream &os, Bool_t compact)
Write the contents of the argset in ASCII form to given stream.
Definition: RooArgList.cxx:299
RooArgList()
Default constructor.
Definition: RooArgList.cxx:62
virtual TObject * clone(const char *newname) const
Definition: RooArgList.h:68
RooArgList & operator=(const RooArgList &other)
Definition: RooArgList.h:70
RooAbsArg & operator[](Int_t idx) const
Array operator.
Definition: RooArgList.cxx:279
virtual TObject * create(const char *newname) const
Definition: RooArgList.h:69
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)
Read the contents of the argset in ASCII form from given stream.
Definition: RooArgList.cxx:322
virtual ~RooArgList()
Destructor.
Definition: RooArgList.cxx:265
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
Collection abstract base class.
Definition: TCollection.h:63
Mother of all ROOT objects.
Definition: TObject.h:37