Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooSetProxy.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooSetProxy.h,v 1.21 2007/07/13 21:24:36 wouter 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_SET_PROXY
17#define ROO_SET_PROXY
18
19#include "RooAbsProxy.h"
20#include "RooAbsArg.h"
21#include "RooArgSet.h"
22
23class RooSetProxy final : public RooArgSet, public RooAbsProxy {
24public:
25
26#ifdef USEMEMPOOLFORARGSET
27 void* operator new (size_t bytes);
28 void operator delete (void *ptr);
29#endif
30
31 // Constructors, assignment etc.
33 _owner{nullptr},
34 _defValueServer{false},
35 _defShapeServer{false} { }
36
37 RooSetProxy(const char* name, const char* desc, RooAbsArg* owner,
38 Bool_t defValueServer=kTRUE, Bool_t defShapeServer=kFALSE) ;
39 RooSetProxy(const char* name, RooAbsArg* owner, const RooSetProxy& other) ;
40 virtual ~RooSetProxy() ;
41
42 virtual const char* name() const override { return GetName() ; }
43
44 // List content management (modified for server hooks)
46 virtual Bool_t add(const RooAbsArg& var, Bool_t silent=kFALSE) override;
47 virtual Bool_t add(const RooAbsArg& var, Bool_t valueServer, Bool_t shapeServer, Bool_t silent) ;
48
50 virtual Bool_t addOwned(RooAbsArg& var, Bool_t silent=kFALSE) override;
51
53 virtual RooAbsArg *addClone(const RooAbsArg& var, Bool_t silent=kFALSE) override;
54
55 virtual Bool_t replace(const RooAbsArg& var1, const RooAbsArg& var2) override;
56 virtual Bool_t remove(const RooAbsArg& var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) override;
57 Bool_t remove(const RooAbsCollection& list, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) ;
58 virtual void removeAll() override;
59
60 virtual void print(std::ostream& os, Bool_t addContents=kFALSE) const override;
61
62 RooSetProxy& operator=(const RooArgSet& other) ;
63
64protected:
65
69
70 virtual Bool_t changePointer(const RooAbsCollection& newServerSet, Bool_t nameChange=kFALSE, Bool_t factoryInitMode=kFALSE) override;
71
72 ClassDefOverride(RooSetProxy,1) // Proxy class for a RooArgSet
73};
74
75#endif
76
const Bool_t kFALSE
Definition RtypesCore.h:92
const Bool_t kTRUE
Definition RtypesCore.h:91
#define ClassDefOverride(name, id)
Definition Rtypes.h:329
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition RooAbsArg.h:72
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
virtual RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE)
Add a clone of the specified argument to list.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
const char * GetName() const
Returns name of object.
RooAbsProxy is the abstact interface for proxy classes.
Definition RooAbsProxy.h:30
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:29
RooSetProxy is the concrete proxy for RooArgSet objects.
Definition RooSetProxy.h:23
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) override
Remove object 'var' from set and deregister 'var' as server to owner.
RooSetProxy & operator=(const RooArgSet &other)
Assign values of arguments on other set to arguments in this set.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Overloaded RooArgSet::add() method inserts 'var' into set and registers 'var' as server to owner with...
virtual ~RooSetProxy()
Destructor.
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE) override
Overloaded RooArgSet::addOwned() method insert object into owning set and registers object as server ...
virtual RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE) override
Overloaded RooArgSet::addClone() method insert clone of object into owning set and registers cloned o...
virtual const char * name() const override
Definition RooSetProxy.h:42
virtual Bool_t replace(const RooAbsArg &var1, const RooAbsArg &var2) override
Replace object 'var1' in set with 'var2'.
Bool_t _defValueServer
Definition RooSetProxy.h:67
virtual void removeAll() override
Remove all argument inset using remove(const RooAbsArg&).
virtual Bool_t changePointer(const RooAbsCollection &newServerSet, Bool_t nameChange=kFALSE, Bool_t factoryInitMode=kFALSE) override
Process server change operation on owner.
RooAbsArg * _owner
Definition RooSetProxy.h:66
Bool_t _defShapeServer
Definition RooSetProxy.h:68
virtual void print(std::ostream &os, Bool_t addContents=kFALSE) const override
Printing name of proxy on ostream.