Logo ROOT  
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 "RooAbsProxy.h"
20 #include "RooLinkedListIter.h"
21 #include "RooAbsArg.h"
22 #include "RooArgList.h"
23 
24 class RooListProxy final : public RooArgList, public RooAbsProxy {
25 public:
26 
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() ;
33 
34  virtual const char* name() const { return GetName() ; }
35 
36  // List content management (modified for server hooks)
37  virtual Bool_t add(const RooAbsArg& var, Bool_t silent=kFALSE) ;
38  virtual Bool_t add(const RooAbsCollection& list, Bool_t silent=kFALSE) { return RooAbsCollection::add(list,silent) ; }
39  virtual Bool_t add(const RooAbsArg& var, Bool_t valueServer, Bool_t shapeServer, Bool_t silent) ;
40  virtual Bool_t addOwned(RooAbsArg& var, Bool_t silent=kFALSE);
41  virtual Bool_t addOwned(const RooAbsCollection& list, Bool_t silent=kFALSE) { return RooAbsCollection::addOwned(list,silent) ; }
42  virtual Bool_t replace(const RooAbsArg& var1, const RooAbsArg& var2) ;
43  virtual Bool_t remove(const RooAbsArg& var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) ;
44  virtual void removeAll() ;
45 
46  RooListProxy& operator=(const RooArgList& other) ;
47 
48  virtual void print(std::ostream& os, Bool_t addContents=kFALSE) const ;
49 
50 protected:
51 
52  RooAbsArg* _owner ; // Pointer to owner
53  Bool_t _defValueServer ; // Propagate value dirty flags?
54  Bool_t _defShapeServer ; // Propagate shape dirty flags?
55 
56  virtual Bool_t changePointer(const RooAbsCollection& newServerSet, Bool_t nameChange=kFALSE, Bool_t factoryInitMode=kFALSE) ;
57 
58  ClassDef(RooListProxy,1) // Proxy class for a RooArgList
59 };
60 
61 #endif
62 
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
RooLinkedListIter.h
RooArgList
Definition: RooArgList.h:21
RooAbsArg.h
RooListProxy::changePointer
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.
Definition: RooListProxy.cxx:188
RooAbsCollection::GetName
const char * GetName() const
Returns name of object.
Definition: RooAbsCollection.h:226
RooListProxy::~RooListProxy
virtual ~RooListProxy()
Destructor.
Definition: RooListProxy.cxx:79
bool
RooListProxy::operator=
RooListProxy & operator=(const RooArgList &other)
Reimplementation of standard RooArgList assignment operator.
Definition: RooListProxy.cxx:174
RooListProxy::remove
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Reimplementation of standard RooArgList::remove()
Definition: RooListProxy.cxx:143
RooAbsProxy.h
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooAbsCollection
Definition: RooAbsCollection.h:30
RooAbsCollection::add
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
Definition: RooAbsCollection.cxx:437
RooListProxy::addOwned
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Reimplementation of standard RooArgList::addOwned()
Definition: RooListProxy.cxx:114
RooListProxy::add
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Reimplementation of standard RooArgList::add()
Definition: RooListProxy.cxx:104
RooListProxy::removeAll
virtual void removeAll()
Reimplementation of standard RooArgList::removeAll()
Definition: RooListProxy.cxx:157
RooListProxy::_defValueServer
Bool_t _defValueServer
Definition: RooListProxy.h:67
RooListProxy
Definition: RooListProxy.h:24
RooListProxy::_owner
RooAbsArg * _owner
Definition: RooListProxy.h:66
RooAbsCollection::addOwned
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
Definition: RooAbsCollection.cxx:389
RooListProxy::replace
virtual Bool_t replace(const RooAbsArg &var1, const RooAbsArg &var2)
Reimplementation of standard RooArgList::replace()
Definition: RooListProxy.cxx:127
RooListProxy::_defShapeServer
Bool_t _defShapeServer
Definition: RooListProxy.h:68
RooListProxy::RooListProxy
RooListProxy()
Definition: RooListProxy.h:42
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooListProxy::name
virtual const char * name() const
Definition: RooListProxy.h:48
RooAbsArg
Definition: RooAbsArg.h:73
RooAbsProxy
Definition: RooAbsProxy.h:30
RooListProxy::print
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.
Definition: RooListProxy.cxx:220
RooArgList.h