Logo ROOT   6.10/09
Reference Guide
RooArgProxy.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooArgProxy.h,v 1.21 2007/07/12 20:30:28 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_ARG_PROXY
17 #define ROO_ARG_PROXY
18 
19 #include "TNamed.h"
20 #include "RooAbsProxy.h"
21 #include "RooAbsArg.h"
22 
23 
24 class RooArgProxy : public TNamed, public RooAbsProxy {
25 public:
26 
27  // Constructors, assignment etc.
29  // Default constructor
30  } ;
31  RooArgProxy(const char* name, const char* desc, RooAbsArg* owner,
32  Bool_t valueServer, Bool_t shapeServer, Bool_t proxyOwnsArg=kFALSE) ;
33  RooArgProxy(const char* name, const char* desc, RooAbsArg* owner, RooAbsArg& arg,
34  Bool_t valueServer, Bool_t shapeServer, Bool_t proxyOwnsArg=kFALSE) ;
35  RooArgProxy(const char* name, RooAbsArg* owner, const RooArgProxy& other) ;
36  virtual ~RooArgProxy() ;
37  inline RooAbsArg* absArg() const {
38  // Return pointer to contained argument
39  return _arg ;
40  }
41 
42  virtual const char* name() const {
43  // Return name of proxy
44  return GetName() ;
45  }
46  virtual void print(std::ostream& os, Bool_t addContents=kFALSE) const ;
47 
48 protected:
49 
50  friend class RooSimultaneous ;
51  RooAbsArg* _owner ; // Pointer to owner of proxy
52  RooAbsArg* _arg ; // Pointer to content of proxy
53 
54  Bool_t _valueServer ; // If true contents is value server of owner
55  Bool_t _shapeServer ; // If true contents is shape server of owner
56  Bool_t _isFund ; // If true proxy contains an lvalue
57  Bool_t _ownArg ; // If true proxy owns contents
58 
59  friend class RooAbsArg ;
60 
61  inline Bool_t isValueServer() const {
62  // Returns true of contents is value server of owner
63  return _valueServer ;
64  }
65  inline Bool_t isShapeServer() const {
66  // Returns true if contents is shape server of owner
67  return _shapeServer ;
68  }
69  virtual Bool_t changePointer(const RooAbsCollection& newServerSet, Bool_t nameChange=kFALSE, Bool_t factoryInitMode=kFALSE) ;
70 
71  virtual void changeDataSet(const RooArgSet* newNormSet) ;
72 
73  ClassDef(RooArgProxy,1) // Abstract proxy for RooAbsArg objects
74 };
75 
76 #endif
77 
virtual Bool_t changePointer(const RooAbsCollection &newServerSet, Bool_t nameChange=kFALSE, Bool_t factoryInitMode=kFALSE)
Change proxied object to object of same name in given list.
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
Bool_t _isFund
Definition: RooArgProxy.h:56
virtual void changeDataSet(const RooArgSet *newNormSet)
Change the normalization set that should be offered to the content objects getVal() when evaluated...
RooAbsArg * _arg
Definition: RooArgProxy.h:52
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:297
Bool_t _valueServer
Definition: RooArgProxy.h:54
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
Bool_t isShapeServer() const
Definition: RooArgProxy.h:65
virtual const char * name() const
Definition: RooArgProxy.h:42
Bool_t _shapeServer
Definition: RooArgProxy.h:55
RooAbsProxy is the abstact interface for proxy classes.
Definition: RooAbsProxy.h:31
Bool_t _ownArg
Definition: RooArgProxy.h:57
RooAbsArg * absArg() const
Definition: RooArgProxy.h:37
Bool_t isValueServer() const
Definition: RooArgProxy.h:61
virtual void print(std::ostream &os, Bool_t addContents=kFALSE) const
Print the name of the proxy on ostream.
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects...
RooArgProxy is the abstact interface for RooAbsArg proxy classes.
Definition: RooArgProxy.h:24
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:66
RooAbsArg * _owner
Definition: RooArgProxy.h:51
virtual ~RooArgProxy()
Destructor.
Definition: RooArgProxy.cxx:96
RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset...
const Bool_t kTRUE
Definition: RtypesCore.h:91