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 
21 class RooArgList : public RooAbsCollection {
22 public:
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 
88 protected:
89 
90  ClassDef(RooArgList,1) // Ordered list of RooAbsArg objects
91 };
92 
93 #endif
RooArgList::create
virtual TObject * create(const char *newname) const
Definition: RooArgList.h:83
RooArgList::operator[]
RooAbsArg & operator[](Int_t idx) const
Array operator.
Definition: RooArgList.cxx:279
RooArgList
Definition: RooArgList.h:21
RooArgList::operator=
RooArgList & operator=(const RooArgList &other)
Definition: RooArgList.h:84
RooArgList::at
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
Definition: RooArgList.h:88
RooAbsCollection::operator=
RooAbsCollection & operator=(const RooAbsCollection &other)
The assignment operator sets the value of any argument in our set that also appears in the other set.
Definition: RooAbsCollection.cxx:310
bool
RooAbsCollection.h
RooArgList::RooArgList
RooArgList()
Default constructor.
Definition: RooArgList.cxx:62
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooAbsCollection
Definition: RooAbsCollection.h:30
RooArgList::writeToStream
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::~RooArgList
virtual ~RooArgList()
Destructor.
Definition: RooArgList.cxx:265
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
RooArgList::readFromStream
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
RooArgList::clone
virtual TObject * clone(const char *newname) const
Definition: RooArgList.h:82
genreflex::verbose
bool verbose
Definition: rootcling_impl.cxx:133
RooAbsArg
Definition: RooAbsArg.h:73
TCollection
Definition: TCollection.h:63
RooAbsCollection::_list
Storage_t _list
Definition: RooAbsCollection.h:249
RooArgSet
Definition: RooArgSet.h:28
int