ROOT logo
/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 *    File: $Id: RooListProxy.h,v 1.11 2007/07/13 21:24:36 wouter Exp $
 * Authors:                                                                  *
 *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
 *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
 *                                                                           *
 * Copyright (c) 2000-2005, Regents of the University of California          *
 *                          and Stanford University. All rights reserved.    *
 *                                                                           *
 * Redistribution and use in source and binary forms,                        *
 * with or without modification, are permitted according to the terms        *
 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
 *****************************************************************************/
#ifndef ROO_LIST_PROXY
#define ROO_LIST_PROXY

#include "TObject.h"
#include "Riosfwd.h"
#include "RooAbsProxy.h"
#include "RooAbsArg.h"
#include "RooArgList.h"

class RooListProxy : public RooArgList, public RooAbsProxy  {
public:

  // Constructors, assignment etc.
  RooListProxy() : _defValueServer(kTRUE), _defShapeServer(kFALSE) { _iter = createIterator() ; _owner=0 ; } ;
  RooListProxy(const char* name, const char* desc, RooAbsArg* owner, 
	      Bool_t defValueServer=kTRUE, Bool_t defShapeServer=kFALSE) ;
  RooListProxy(const char* name, RooAbsArg* owner, const RooListProxy& other) ;
  virtual ~RooListProxy() ;

  virtual const char* name() const { return GetName() ; }

  // List content management (modified for server hooks)
  virtual Bool_t add(const RooAbsArg& var, Bool_t silent=kFALSE) ;
  virtual Bool_t add(const RooAbsCollection& list, Bool_t silent=kFALSE) { return RooAbsCollection::add(list,silent) ; }
  virtual Bool_t add(const RooAbsArg& var, Bool_t valueServer, Bool_t shapeServer, Bool_t silent) ;
  virtual Bool_t addOwned(RooAbsArg& var, Bool_t silent=kFALSE);
  virtual Bool_t addOwned(const RooAbsCollection& list, Bool_t silent=kFALSE) { return RooAbsCollection::addOwned(list,silent) ; }
  virtual Bool_t replace(const RooAbsArg& var1, const RooAbsArg& var2) ;
  virtual Bool_t remove(const RooAbsArg& var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) ;
  virtual void removeAll() ;

  RooListProxy& operator=(const RooArgList& other) ;

  virtual void print(ostream& os, Bool_t addContents=kFALSE) const ;
  
protected:
    
  RooAbsArg* _owner ;       // Pointer to owner
  Bool_t _defValueServer ;  // Propagate value dirty flags?
  Bool_t _defShapeServer ;  // Propagate shape dirty flags?
  TIterator* _iter ; //! do not persist

  virtual Bool_t changePointer(const RooAbsCollection& newServerSet, Bool_t nameChange=kFALSE, Bool_t factoryInitMode=kFALSE) ;

  ClassDef(RooListProxy,1) // Proxy class for a RooArgList
};

#endif

 RooListProxy.h:1
 RooListProxy.h:2
 RooListProxy.h:3
 RooListProxy.h:4
 RooListProxy.h:5
 RooListProxy.h:6
 RooListProxy.h:7
 RooListProxy.h:8
 RooListProxy.h:9
 RooListProxy.h:10
 RooListProxy.h:11
 RooListProxy.h:12
 RooListProxy.h:13
 RooListProxy.h:14
 RooListProxy.h:15
 RooListProxy.h:16
 RooListProxy.h:17
 RooListProxy.h:18
 RooListProxy.h:19
 RooListProxy.h:20
 RooListProxy.h:21
 RooListProxy.h:22
 RooListProxy.h:23
 RooListProxy.h:24
 RooListProxy.h:25
 RooListProxy.h:26
 RooListProxy.h:27
 RooListProxy.h:28
 RooListProxy.h:29
 RooListProxy.h:30
 RooListProxy.h:31
 RooListProxy.h:32
 RooListProxy.h:33
 RooListProxy.h:34
 RooListProxy.h:35
 RooListProxy.h:36
 RooListProxy.h:37
 RooListProxy.h:38
 RooListProxy.h:39
 RooListProxy.h:40
 RooListProxy.h:41
 RooListProxy.h:42
 RooListProxy.h:43
 RooListProxy.h:44
 RooListProxy.h:45
 RooListProxy.h:46
 RooListProxy.h:47
 RooListProxy.h:48
 RooListProxy.h:49
 RooListProxy.h:50
 RooListProxy.h:51
 RooListProxy.h:52
 RooListProxy.h:53
 RooListProxy.h:54
 RooListProxy.h:55
 RooListProxy.h:56
 RooListProxy.h:57
 RooListProxy.h:58
 RooListProxy.h:59
 RooListProxy.h:60
 RooListProxy.h:61
 RooListProxy.h:62
 RooListProxy.h:63
 RooListProxy.h:64