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
24class RooArgProxy : public TNamed, public RooAbsProxy {
25public:
26
27 // Constructors, assignment etc.
28
29 /// Default constructor
31 } ;
32 RooArgProxy(const char* name, const char* desc, RooAbsArg* owner,
33 Bool_t valueServer, Bool_t shapeServer, Bool_t proxyOwnsArg=kFALSE) ;
34 RooArgProxy(const char* name, const char* desc, RooAbsArg* owner, RooAbsArg& arg,
35 Bool_t valueServer, Bool_t shapeServer, Bool_t proxyOwnsArg=kFALSE) ;
36 RooArgProxy(const char* name, RooAbsArg* owner, const RooArgProxy& other) ;
37 ~RooArgProxy() override ;
38
39 /// Return pointer to contained argument
40 inline RooAbsArg* absArg() const {
41 return _arg ;
42 }
43
44 /// Return name of proxy
45 const char* name() const override {
46 return GetName() ;
47 }
48 void print(std::ostream& os, Bool_t addContents=kFALSE) const override ;
49
50protected:
51
52 friend class RooSimultaneous ;
53 RooAbsArg* _owner ; ///< Pointer to owner of proxy
54 RooAbsArg* _arg ; ///< Pointer to content of proxy
55
56 Bool_t _valueServer ; ///< If true contents is value server of owner
57 Bool_t _shapeServer ; ///< If true contents is shape server of owner
58 Bool_t _isFund ; ///< If true proxy contains an lvalue
59 Bool_t _ownArg ; ///< If true proxy owns contents
60
61 friend class RooAbsArg ;
62
63 /// Returns true of contents is value server of owner
64 inline Bool_t isValueServer() const {
65 return _valueServer ;
66 }
67 /// Returns true if contents is shape server of owner
68 inline Bool_t isShapeServer() const {
69 return _shapeServer ;
70 }
71 Bool_t changePointer(const RooAbsCollection& newServerSet, Bool_t nameChange=kFALSE, Bool_t factoryInitMode=kFALSE) override ;
72
73 virtual void changeDataSet(const RooArgSet* newNormSet) ;
74
75 ClassDefOverride(RooArgProxy,1) // Abstract proxy for RooAbsArg objects
76};
77
78#endif
79
const Bool_t kFALSE
Definition: RtypesCore.h:101
const Bool_t kTRUE
Definition: RtypesCore.h:100
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition: RooAbsArg.h:78
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooAbsProxy is the abstact interface for proxy classes.
Definition: RooAbsProxy.h:30
RooArgProxy is the abstract interface for RooAbsArg proxy classes.
Definition: RooArgProxy.h:24
Bool_t isShapeServer() const
Returns true if contents is shape server of owner.
Definition: RooArgProxy.h:68
const char * name() const override
Return name of proxy.
Definition: RooArgProxy.h:45
Bool_t isValueServer() const
Returns true of contents is value server of owner.
Definition: RooArgProxy.h:64
RooAbsArg * _owner
Pointer to owner of proxy.
Definition: RooArgProxy.h:53
~RooArgProxy() override
Destructor.
Definition: RooArgProxy.cxx:93
virtual void changeDataSet(const RooArgSet *newNormSet)
Change the normalization set that should be offered to the content objects getVal() when evaluated.
RooAbsArg * absArg() const
Return pointer to contained argument.
Definition: RooArgProxy.h:40
RooArgProxy()
Default constructor.
Definition: RooArgProxy.h:30
Bool_t _isFund
If true proxy contains an lvalue.
Definition: RooArgProxy.h:58
RooAbsArg * _arg
Pointer to content of proxy.
Definition: RooArgProxy.h:54
Bool_t _ownArg
If true proxy owns contents.
Definition: RooArgProxy.h:59
void print(std::ostream &os, Bool_t addContents=kFALSE) const override
Print the name of the proxy on ostream.
Bool_t _valueServer
If true contents is value server of owner.
Definition: RooArgProxy.h:56
Bool_t changePointer(const RooAbsCollection &newServerSet, Bool_t nameChange=kFALSE, Bool_t factoryInitMode=kFALSE) override
Change proxied object to object of same name in given list.
Bool_t _shapeServer
If true contents is shape server of owner.
Definition: RooArgProxy.h:57
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:57
RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
const char * GetName() const override
Returns name of object.
Definition: TNamed.h:47