Logo ROOT  
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 
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
RooArgProxy::_isFund
Bool_t _isFund
Definition: RooArgProxy.h:70
RooArgProxy::changeDataSet
virtual void changeDataSet(const RooArgSet *newNormSet)
Change the normalization set that should be offered to the content objects getVal() when evaluated.
Definition: RooArgProxy.cxx:142
RooArgProxy::_arg
RooAbsArg * _arg
Definition: RooArgProxy.h:66
RooArgProxy::changePointer
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.
Definition: RooArgProxy.cxx:108
TNamed.h
RooArgProxy::_valueServer
Bool_t _valueServer
Definition: RooArgProxy.h:68
RooAbsArg.h
RooArgProxy::isShapeServer
Bool_t isShapeServer() const
Definition: RooArgProxy.h:79
bool
RooAbsProxy.h
RooArgProxy
Definition: RooArgProxy.h:24
TNamed
Definition: TNamed.h:29
RooArgProxy::absArg
RooAbsArg * absArg() const
Definition: RooArgProxy.h:51
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooAbsCollection
Definition: RooAbsCollection.h:30
RooArgProxy::name
virtual const char * name() const
Definition: RooArgProxy.h:56
RooArgProxy::isValueServer
Bool_t isValueServer() const
Definition: RooArgProxy.h:75
RooArgProxy::_shapeServer
Bool_t _shapeServer
Definition: RooArgProxy.h:69
RooArgProxy::_ownArg
Bool_t _ownArg
Definition: RooArgProxy.h:71
RooArgProxy::_owner
RooAbsArg * _owner
Definition: RooArgProxy.h:65
RooArgProxy::RooArgProxy
RooArgProxy()
Definition: RooArgProxy.h:42
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooArgProxy::print
virtual void print(std::ostream &os, Bool_t addContents=kFALSE) const
Print the name of the proxy on ostream.
Definition: RooArgProxy.cxx:154
RooAbsArg
Definition: RooAbsArg.h:73
RooAbsProxy
Definition: RooAbsProxy.h:30
RooArgProxy::~RooArgProxy
virtual ~RooArgProxy()
Destructor.
Definition: RooArgProxy.cxx:95
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:53
RooSimultaneous
Definition: RooSimultaneous.h:37
RooArgSet
Definition: RooArgSet.h:28