Logo ROOT   6.08/07
Reference Guide
RooListProxy.h
Go to the documentation of this file.
1 /*****************************************************************************
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
18 
19 #include "TObject.h"
20 #include "Riosfwd.h"
21 #include "RooAbsProxy.h"
22 #include "RooLinkedListIter.h"
23 #include "RooAbsArg.h"
24 #include "RooArgList.h"
25 
26 class RooListProxy : public RooArgList, public RooAbsProxy {
27 public:
28 
29  // Constructors, assignment etc.
31  RooListProxy(const char* name, const char* desc, RooAbsArg* owner,
32  Bool_t defValueServer=kTRUE, Bool_t defShapeServer=kFALSE) ;
33  RooListProxy(const char* name, RooAbsArg* owner, const RooListProxy& other) ;
34  virtual ~RooListProxy() ;
35 
36  virtual const char* name() const { return GetName() ; }
37 
38  // List content management (modified for server hooks)
39  virtual Bool_t add(const RooAbsArg& var, Bool_t silent=kFALSE) ;
40  virtual Bool_t add(const RooAbsCollection& list, Bool_t silent=kFALSE) { return RooAbsCollection::add(list,silent) ; }
41  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);
43  virtual Bool_t addOwned(const RooAbsCollection& list, Bool_t silent=kFALSE) { return RooAbsCollection::addOwned(list,silent) ; }
44  virtual Bool_t replace(const RooAbsArg& var1, const RooAbsArg& var2) ;
45  virtual Bool_t remove(const RooAbsArg& var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) ;
46  virtual void removeAll() ;
47 
48  RooListProxy& operator=(const RooArgList& other) ;
49 
50  virtual void print(std::ostream& os, Bool_t addContents=kFALSE) const ;
51 
52 protected:
53 
54  RooAbsArg* _owner ; // Pointer to owner
55  Bool_t _defValueServer ; // Propagate value dirty flags?
56  Bool_t _defShapeServer ; // Propagate shape dirty flags?
57 
58  virtual Bool_t changePointer(const RooAbsCollection& newServerSet, Bool_t nameChange=kFALSE, Bool_t factoryInitMode=kFALSE) ;
59 
60  ClassDef(RooListProxy,1) // Proxy class for a RooArgList
61 };
62 
63 #endif
64 
virtual Bool_t changePointer(const RooAbsCollection &newServerSet, Bool_t nameChange=kFALSE, Bool_t factoryInitMode=kFALSE)
Internal function that implements consequences of a server redirect on the owner. ...
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 the specified argument to list.
virtual ~RooListProxy()
Destructor.
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
RooListProxy & operator=(const RooArgList &other)
Reimplementation of standard RooArgList assignment operator.
virtual Bool_t add(const RooAbsCollection &list, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
Definition: RooListProxy.h:40
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Reimplementation of standard RooArgList::add()
Bool_t _defValueServer
Definition: RooListProxy.h:55
RooAbsArg * _owner
Definition: RooListProxy.h:54
RooAbsProxy is the abstact interface for proxy classes.
Definition: RooAbsProxy.h:32
RooListProxy is the concrete proxy for RooArgList objects.
Definition: RooListProxy.h:26
virtual void print(std::ostream &os, Bool_t addContents=kFALSE) const
Print the name of the proxy, and if requested a summary of the contained elements as well...
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Reimplementation of standard RooArgList::addOwned()
const char * GetName() const
Returns name of object.
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects...
virtual void removeAll()
Reimplementation of standard RooArgList::removeAll()
virtual Bool_t replace(const RooAbsArg &var1, const RooAbsArg &var2)
Reimplementation of standard RooArgList::replace()
Bool_t _defShapeServer
Definition: RooListProxy.h:56
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:66
virtual Bool_t addOwned(const RooAbsCollection &list, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
Definition: RooListProxy.h:43
const Bool_t kTRUE
Definition: Rtypes.h:91
virtual const char * name() const
Definition: RooListProxy.h:36