20 using namespace RooFit;
22 void rf508_listsetmanip()
29 RooRealVar a(
"a",
"a", 1, -10, 10);
30 RooRealVar b(
"b",
"b", 2, -10, 10);
31 RooRealVar c(
"c",
"c", 3, -10, 10);
32 RooRealVar d(
"d",
"d", 4, -10, 10);
33 RooRealVar x(
"x",
"x", 0, -10, 10);
39 RooCategory e(
"e",
"e");
44 RooGaussian g(
"g",
"g", x, a, b);
59 s.add(RooArgSet(c, d));
71 RooAbsArg *aptr = s.find(
"a");
74 RooArgSet *subset1 = (RooArgSet *)s.selectByName(
"a,b,c");
77 RooArgSet *subset2 = (RooArgSet *)s.selectByAttrib(
"Constant", kTRUE);
80 RooArgSet s1(a, b, c);
81 RooArgSet s2(c, d, e);
82 RooArgSet *subset3 = (RooArgSet *)s1.selectCommon(s2);
92 RooRealVar *ac = (RooRealVar *)a.clone(
"a");
93 RooRealVar *bc = (RooRealVar *)b.clone(
"b");
94 RooRealVar *cc = (RooRealVar *)c.clone(
"c");
97 s3.addOwned(RooArgSet(*ac, *bc, *cc));
101 s3.addClone(RooArgSet(d, e, g));
105 RooArgSet *sclone = (RooArgSet *)s3.Clone(
"sclone");
109 RooArgSet *sclone2 = (RooArgSet *)s3.snapshot();
119 RooArgSet *sclone3 = (RooArgSet *)s3.snapshot(kTRUE);
125 cout <<
"sclone = " << (*sclone) << endl;
140 RooArgList l(a, b, c, d);
143 l.add(RooArgList(a, b, c, d));
146 RooAbsArg *arg4 = l.at(4);