Logo ROOT  
Reference Guide
Go to the documentation of this file.
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooListProxy.h,v 1.11 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_LIST_PROXY
17#define ROO_LIST_PROXY
19#include "RooAbsProxy.h"
20#include "RooLinkedListIter.h"
21#include "RooAbsArg.h"
22#include "RooArgList.h"
24class RooListProxy final : public RooArgList, public RooAbsProxy {
27 // Constructors, assignment etc.
29 RooListProxy(const char* name, const char* desc, RooAbsArg* owner,
30 Bool_t defValueServer=kTRUE, Bool_t defShapeServer=kFALSE) ;
31 RooListProxy(const char* name, RooAbsArg* owner, const RooListProxy& other) ;
32 virtual ~RooListProxy() ;
34 virtual const char* name() const override { return GetName() ; }
36 // List content management (modified for server hooks)
38 virtual Bool_t add(const RooAbsArg& var, Bool_t silent=kFALSE) override;
39 virtual Bool_t add(const RooAbsArg& var, Bool_t valueServer, Bool_t shapeServer, Bool_t silent) ;
42 virtual Bool_t addOwned(RooAbsArg& var, Bool_t silent=kFALSE) override;
43 virtual Bool_t replace(const RooAbsArg& var1, const RooAbsArg& var2) override;
44 virtual Bool_t remove(const RooAbsArg& var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) override;
45 virtual void removeAll() override;
47 RooListProxy& operator=(const RooArgList& other) ;
49 virtual void print(std::ostream& os, Bool_t addContents=kFALSE) const override;
53 RooAbsArg* _owner ; // Pointer to owner
54 Bool_t _defValueServer ; // Propagate value dirty flags?
55 Bool_t _defShapeServer ; // Propagate shape dirty flags?
57 virtual Bool_t changePointer(const RooAbsCollection& newServerSet, Bool_t nameChange=kFALSE, Bool_t factoryInitMode=kFALSE) override;
59 ClassDefOverride(RooListProxy,1) // Proxy class for a RooArgList
const Bool_t kFALSE
Definition: RtypesCore.h:101
const Bool_t kTRUE
Definition: RtypesCore.h:100
#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:75
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add an argument and transfer the ownership to the collection.
const char * GetName() const
Returns name of object.
RooAbsProxy is the abstact interface for proxy classes.
Definition: RooAbsProxy.h:30
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgList.h:22
RooListProxy is the concrete proxy for RooArgList objects.
Definition: RooListProxy.h:24
virtual Bool_t replace(const RooAbsArg &var1, const RooAbsArg &var2) override
Reimplementation of standard RooArgList::replace()
Bool_t _defValueServer
Definition: RooListProxy.h:54
RooListProxy & operator=(const RooArgList &other)
Reimplementation of standard RooArgList assignment operator.
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE) override
Reimplementation of standard RooArgList::addOwned()
virtual const char * name() const override
Definition: RooListProxy.h:34
virtual ~RooListProxy()
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Reimplementation of standard RooArgList::add()
virtual Bool_t changePointer(const RooAbsCollection &newServerSet, Bool_t nameChange=kFALSE, Bool_t factoryInitMode=kFALSE) override
Internal function that implements consequences of a server redirect on the owner.
virtual void removeAll() override
Reimplementation of standard RooArgList::removeAll()
virtual void print(std::ostream &os, Bool_t addContents=kFALSE) const override
Print the name of the proxy, and if requested a summary of the contained elements as well.
Bool_t _defShapeServer
Definition: RooListProxy.h:55
RooAbsArg * _owner
Definition: RooListProxy.h:53
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) override
Reimplementation of standard RooArgList::remove()