Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooTemplateProxy.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooRealProxy.h,v 1.23 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_TEMPLATE_PROXY
17#define ROO_TEMPLATE_PROXY
18
19#include "RooAbsReal.h"
20#include "RooArgProxy.h"
21#include "RooAbsRealLValue.h"
22#include "RooAbsCategory.h"
23#include "RooMsgService.h"
24
25#include <ROOT/RConfig.hxx> // for the R__DEPRECATED macro
26
27#include <string>
28
29/**
30\class RooTemplateProxy
31\ingroup Roofitcore
32
33## Introduction
34A RooTemplateProxy is used to hold references to other RooFit objects in an expression tree.
35A `RooGaussian(..., x, mean, sigma)` can e.g. store references to `x, mean, sigma` as
36```
37RooTemplateProxy<RooAbsReal> _x;
38RooTemplateProxy<RooAbsReal> _mean;
39RooTemplateProxy<RooAbsReal> _sigma;
40```
41Now, the values of these three can be accessed, and the template argument ensures that only objects that evaluate
42to real numbers (RooAbsReal) can be stored in such a proxy. These can e.g. be variables, PDFs and functions.
43To store an object that's a `RooCategory`, one would, for example, use
44```
45RooTemplateProxy<RooCategory> _category;
46```
47
48Since %ROOT 6.22, the proxy can be used like a pointer to an instance of the template argument.
49For this, it provides `operator*` and `operator->`, e.g.
50```
51double oldValue = _x->getVal(normalisationSet);
52*_x = 17.;
53```
54
55RooTemplateProxy's base class RooArgProxy registers the proxied objects as "servers" of the object
56that holds the proxy. When the value of the proxied object is changed, the owner is
57notified, and can recalculate its own value. Renaming or exchanging objects that
58serve values to the owner of the proxy is handled automatically.
59
60## Modernisation of proxies in ROOT 6.22
61In ROOT 6.22, the classes RooRealProxy and RooCategoryProxy were replaced by RooTemplateProxy<class T>.
62
63Two typedefs have been defined for backward compatibility:
64- `RooRealProxy = RooTemplateProxy<RooAbsReal>`. Any generic object that converts to a real value.
65- `RooCategoryProxy = RooTemplateProxy<RooAbsCategory>`. Any category object.
66
67To modernise a class, one can change the template argument of the proxy to the most appropriate type,
68and increment the class version of the owner.
69
70<table>
71<tr><th> %RooFit before %ROOT 6.22 <th> %RooFit starting with %ROOT 6.22
72<tr><td>
73~~~{.cpp}
74// In .h: Declare member
75RooRealProxy pdfProxy;
76
77ClassDefOverride(MyPdf, 1)
78};
79
80// In .cxx: Initialise proxy in constructor
81// The proxy will accept any RooAbsArg, so the type of
82// "thePdf" has to be checked manually.
83MyPdf::MyPdf(name, title, ...) :
84 pdfProxy("pdfProxy", "Proxy holding a PDF", this, thePdf) {
85 [ Extra checking here ... ]
86}
87
88
89// In .cxx: Accessing the proxy
90RooAbsArg* absArg = pdfProxy.absArg();
91RooAbsPdf* pdf = dynamic_cast<RooAbsPdf*>(absArg);
92assert(pdf); // Manual type checking ...
93pdf->fitTo(...);
94~~~
95<td>
96~~~{.cpp}
97// In .h: Declare member
98RooTemplateProxy<RooAbsPdf> pdfProxy;
99
100ClassDefOverride(MyPdf, 2)
101};
102
103// In .cxx: Initialise proxy in constructor
104// The program will not compile if "thePdf" is not a
105// type deriving from RooAbsPdf
106MyPdf::MyPdf(name, title, ...) :
107 pdfProxy("pdfProxy", "Proxy holding a PDF", this, thePdf) {
108
109}
110
111
112// In .cxx: Accessing the proxy
113
114
115
116pdfProxy->fitTo(...);
117~~~
118</table>
119
120
121### How to modernise old code
122
1231. Choose the proper template argument for the proxy.
124 - If a PDF is stored: `RooTemplateProxy<RooAbsPdf>`.
125 - If a real-valued object is stored: `RooTemplateProxy<RooAbsReal>`.
126 - If a category is stored: `RooTemplateProxy<RooCategory>`.
127 - If a variable is stored (i.e. one wants to be able to assign values to it): `RooTemplateProxy<RooRealVar>`
128 Other template arguments are possible, as long as they derive from RooAbsArg.
1292. Increment the class version of the owning class.
1303. Make sure that the right type is passed in the constructor of the proxy.
1314. Always use `proxy->` and `*proxy` to work with the stored object. No need to cast.
1325. **Only if necessary** If errors about missing symbols connected to RooTemplateProxy appear at link time,
133 a specific template instantiation for RooTemplateProxy is not yet in ROOT's dictionaries.
134 These two lines should be added to the LinkDef.h of the project:
135 ~~~{.cpp}
136 #pragma link C++ class RooTemplateProxy<RooMultiCategory>+;
137 #pragma read sourceClass="RooCategoryProxy" targetClass="RooTemplateProxy<RooMultiCategory>"
138 ~~~
139 Replace `RooMultiCategory` by the proper type. If the proxy was holding a real-valued object, use `sourceClass="RooRealProxy"`.
140
141 The first line adds the proxy class to the dictionary, the second line enables reading a legacy
142 `RooCategoryProxy` from a file, and converting it to the new type-safe proxy. If no old proxies
143 have to be read from files, this line can be omitted.
144
145 If the template instantiation that triggered the missing symbols seems to be a very common instantiation,
146 request for it to be added to RooFit by creating a pull request for ROOT. If it is rather uncommon,
147 it is sufficient to add it to the LinkDef.h of the local project only.
148
149**/
150
151template<class T>
153public:
154
156
157 ////////////////////////////////////////////////////////////////////////////////
158 /// Constructor with owner.
159 /// \param[in] theName Name of this proxy (for printing).
160 /// \param[in] desc Description what this proxy should act as.
161 /// \param[in] owner The object that owns the proxy. This is important for tracking
162 /// of client-server dependencies.
163 /// \param[in] valueServer Notify the owner if value changes.
164 /// \param[in] shapeServer Notify the owner if shape (e.g. binning) changes.
165 template<typename Bool = bool, typename = std::enable_if_t<std::is_same<Bool,bool>::value>>
166 RooTemplateProxy(const char* theName, const char* desc, RooAbsArg* owner,
167 Bool valueServer=true, bool shapeServer=false)
168 : RooArgProxy(theName, desc, owner, valueServer, shapeServer, false) {
169 // Note for developers: the type of the first bool parameter is templated
170 // such that implicit conversion from int or pointers to bool is disabled.
171 // This is because there is another constructor with the signature
172 // `RooTemplateProxy(name, title, owner, T& ref)`. It happened already more
173 // than once that other developers accidentally used a `T*` pointer instead
174 // of a reference, in which case it resolved to this constructor via
175 // implicit conversion to bool. This is completely meaningless and should
176 // not happen.
177 }
178
179#ifndef ROOFIT_MEMORY_SAFE_INTERFACES
180 /// Constructor with owner.
181 ///
182 /// \deprecated Kept for backwards compatibility and will be removed in ROOT 6.36.
183 /// Either use RooTemplateProxy(const char*, const char*, RooAbsArg*, bool, bool),
184 /// and transfer the ownership with RooTemplateProxy::putOwnedArg(),
185 /// or use RooTemplateProxy(const char*, const char*, RooAbsArg*, std::unique_ptr<T>, bool, bool)
186 /// if you want the proxy to own the argument.
187 /// depending if you want to transfer ownership or not.
188 ///
189 /// \param[in] theName Name of this proxy (for printing).
190 /// \param[in] desc Description what this proxy should act as.
191 /// \param[in] owner The object that owns the proxy. This is important for tracking
192 /// of client-server dependencies.
193 /// \param[in] valueServer Notify the owner if value changes.
194 /// \param[in] shapeServer Notify the owner if shape (e.g. binning) changes.
195 /// \param[in] proxyOwnsArg Proxy will delete the payload if owning.
196 template<typename Bool = bool, typename = std::enable_if_t<std::is_same<Bool,bool>::value>>
197 R__DEPRECATED(6,36, "Use RooTemplateProxy(const char*, const char*, RooAbsArg*, bool, bool) and transfer the ownership with RooTemplateProxy::putOwnedArg().")
198 RooTemplateProxy(const char* theName, const char* desc, RooAbsArg* owner,
201 {}
202#endif
203
204 ////////////////////////////////////////////////////////////////////////////////
205 /// Constructor with owner and proxied object.
206 /// \param[in] theName Name of this proxy (for printing).
207 /// \param[in] desc Description what this proxy should act as.
208 /// \param[in] owner The object that owns the proxy. This is important for tracking
209 /// of client-server dependencies.
210 /// \param[in] ref Reference to the object that the proxy should hold.
211 /// \param[in] valueServer Notify the owner if value changes.
212 /// \param[in] shapeServer Notify the owner if shape (e.g. binning) changes.
213 RooTemplateProxy(const char* theName, const char* desc, RooAbsArg* owner, T& ref,
214 bool valueServer=true, bool shapeServer=false) :
215 RooArgProxy(theName, desc, owner, const_cast<typename std::remove_const<T>::type&>(ref), valueServer, shapeServer, false) { }
216
217#ifndef ROOFIT_MEMORY_SAFE_INTERFACES
218 ////////////////////////////////////////////////////////////////////////////////
219 /// Constructor with owner and proxied object.
220 ///
221 /// \deprecated Kept for backwards compatibility and will be removed in ROOT 6.36.
222 /// Please use RooTemplateProxy(const char*, const char*, RooAbsArg*, std::unique_ptr<T>, bool, bool)
223 /// or RooTemplateProxy(const char*, const char*, RooAbsArg*, T&, bool, bool),
224 /// depending if you want to transfer ownership or not.
225 ///
226 /// \param[in] theName Name of this proxy (for printing).
227 /// \param[in] desc Description what this proxy should act as.
228 /// \param[in] owner The object that owns the proxy. This is important for tracking
229 /// of client-server dependencies.
230 /// \param[in] ref Reference to the object that the proxy should hold.
231 /// \param[in] valueServer Notify the owner if value changes.
232 /// \param[in] shapeServer Notify the owner if shape (e.g. binning) changes.
233 /// \param[in] proxyOwnsArg Proxy will delete the payload if owning.
234 R__DEPRECATED(6,36, "Use constructors without proxyOwnsArg argument, taking the one that accepts a std::unique_ptr<T> if you want to pass ownership.")
235 RooTemplateProxy(const char* theName, const char* desc, RooAbsArg* owner, T& ref,
236 bool valueServer, bool shapeServer, bool proxyOwnsArg) :
237 RooArgProxy(theName, desc, owner, const_cast<typename std::remove_const<T>::type&>(ref), valueServer, shapeServer, proxyOwnsArg) { }
238#endif
239
240 ////////////////////////////////////////////////////////////////////////////////
241 /// Constructor with owner and proxied object, taking ownership of the proxied object.
242 ///
243 /// \param[in] theName Name of this proxy (for printing).
244 /// \param[in] desc Description what this proxy should act as.
245 /// \param[in] owner The object that owns the proxy. This is important for tracking
246 /// of client-server dependencies.
247 /// \param[in] ptr Owning smart pointer to the object that the proxy should hold. Ownership will be transferred to the proxy.
248 /// \param[in] valueServer Notify the owner if value changes.
249 /// \param[in] shapeServer Notify the owner if shape (e.g. binning) changes.
250 RooTemplateProxy(const char *theName, const char *desc, RooAbsArg *owner, std::unique_ptr<T> ptr,
251 bool valueServer = true, bool shapeServer = false)
252 : RooArgProxy(theName, desc, owner, *ptr, valueServer, shapeServer, true)
253 {
254 ptr.release();
255 }
256
257
258 ////////////////////////////////////////////////////////////////////////////////
259 /// Copy from an existing proxy.
260 /// It will accept any RooTemplateProxy instance, and attempt a dynamic_cast on its payload.
261 /// \param[in] theName Name of this proxy.
262 /// \param[in] owner Pointer to the owner this proxy should be registered to.
263 /// \param[in] other Instance of a different proxy whose payload should be copied.
264 /// \param[in] allowWrongTypes Instead of throwing a std::invalid_argument, only issue an
265 /// error message when payload with wrong type is found. This is unsafe, but may be necessary
266 /// when reading back legacy types. Defaults to false.
267 /// \throw std::invalid_argument if the types of the payloads are incompatible.
268 template<typename U>
269 RooTemplateProxy(const char* theName, RooAbsArg* owner, const RooTemplateProxy<U>& other, bool allowWrongTypes = false) :
270 RooArgProxy(theName, owner, other) {
271 if (_arg && !dynamic_cast<const T*>(_arg)) {
272 if (allowWrongTypes) {
273 coutE(InputArguments) << "Error trying to copy an argument from a proxy with an incompatible payload." << std::endl;
274 } else {
275 throw std::invalid_argument("Tried to construct a RooTemplateProxy with incompatible payload.");
276 }
277 }
278 }
279
280 TObject* Clone(const char* newName=nullptr) const override { return new RooTemplateProxy<T>(newName,_owner,*this); }
281
282
283 /// Return reference to the proxied object.
284 T& operator*() const {
285 return static_cast<T&>(*_arg);
286 }
287
288 /// Member access operator to proxied object.
289 T* operator->() const {
290 return static_cast<T*>(_arg);
291 }
292
293
294 /// Convert the proxy into a number.
295 /// \return A category proxy will return the index state, real proxies the result of RooAbsReal::getVal(normSet).
296 operator typename T::value_type() const {
297 return retrieveValue(arg());
298 }
299
300
301 ////////////////////////////////////////////////////////////////////////////////
302 /// Change object held in proxy into newRef
303 bool setArg(T& newRef) {
304 if (_arg) {
305 if (std::string(arg().GetName()) != newRef.GetName()) {
306 newRef.setAttribute(("ORIGNAME:" + std::string(arg().GetName())).c_str()) ;
307 }
308 return changePointer(RooArgSet(newRef), true);
309 } else {
310 return changePointer(RooArgSet(newRef), false, true);
311 }
312 }
313
314
315 ////////////////////////////////////////////////////////////////////////////////
316 /// Create a new object held and owned by proxy.
317 /// Can only be done if the proxy was non-owning before.
318 template<class U, class... ConstructorArgs>
319 U& emplaceOwnedArg(ConstructorArgs&&... constructorArgs) {
320 if(_ownArg) {
321 // let's maybe not support overwriting owned args unless it becomes necessary
322 throw std::runtime_error("Error in RooTemplateProxy: emplaceOwnedArg<>() called on a proxy already owning an arg.");
323 }
324 auto ownedArg = new U{std::forward<ConstructorArgs>(constructorArgs)...};
325 setArg(*ownedArg);
326 _ownArg = true;
327 return *ownedArg;
328 }
329
330
331 ////////////////////////////////////////////////////////////////////////////////
332 /// Move a new object held and owned by proxy.
333 /// Can only be done if the proxy was non-owning before.
334 template<class U>
335 U& putOwnedArg(std::unique_ptr<U> ownedArg) {
336 if(_ownArg) {
337 // let's maybe not support overwriting owned args unless it becomes necessary
338 throw std::runtime_error("Error in RooTemplateProxy: putOwnedArg<>() called on a proxy already owning an arg.");
339 }
340 auto argPtr = ownedArg.get();
341 setArg(*ownedArg.release());
342 _ownArg = true;
343 return *argPtr;
344 }
345
346 /// \name Legacy interface
347 /// In ROOT versions before 6.22, RooFit didn't have this typed proxy. Therefore, a number of functions
348 /// for forwarding calls to the proxied objects were necessary. The functions in this group can all be
349 /// replaced by directly accessing the proxied objects using e.g. the member access operator like
350 /// `proxy->function()` or by dereferencing like `*proxy = value`.
351 /// For this to work, choose the template argument appropriately. That is, if the
352 /// proxy stores a PDF, use `RooTemplateProxy<RooAbsPdf>`, *etc.*.
353 /// @{
354
355 /// Get the label of the current category state. This function only makes sense for category proxies.
356 const char* label() const {
357 return arg().getCurrentLabel();
358 }
359
360 /// Check if the stored object has a range with the given name.
361 bool hasRange(const char* rangeName) const {
362 return arg().hasRange(rangeName);
363 }
364
365 /// Return reference to object held in proxy.
366 const T& arg() const { return static_cast<const T&>(*_arg); }
367
368 /// Assign a new value to the object pointed to by the proxy.
369 /// This requires the payload to be assignable (RooAbsRealLValue or derived, RooAbsCategoryLValue).
370 RooTemplateProxy<T>& operator=(typename T::value_type value) {
371 lvptr(static_cast<T*>(nullptr))->operator=(value);
372 return *this;
373 }
374 /// Set a category state using its state name. This function can only work for category-type proxies.
375 RooTemplateProxy<T>& operator=(const std::string& newState) {
376 static_assert(std::is_base_of<RooAbsCategory, T>::value, "Strings can only be assigned to category proxies.");
377 lvptr(static_cast<RooAbsCategoryLValue*>(nullptr))->operator=(newState.c_str());
378 return *this;
379 }
380
381 /// Query lower limit of range. This requires the payload to be RooAbsRealLValue or derived.
382 double min(const char* rname=nullptr) const { return lvptr(static_cast<const T*>(nullptr))->getMin(rname) ; }
383 /// Query upper limit of range. This requires the payload to be RooAbsRealLValue or derived.
384 double max(const char* rname=nullptr) const { return lvptr(static_cast<const T*>(nullptr))->getMax(rname) ; }
385 /// Check if the range has a lower bound. This requires the payload to be RooAbsRealLValue or derived.
386 bool hasMin(const char* rname=nullptr) const { return lvptr(static_cast<const T*>(nullptr))->hasMin(rname) ; }
387 /// Check if the range has a upper bound. This requires the payload to be RooAbsRealLValue or derived.
388 bool hasMax(const char* rname=nullptr) const { return lvptr(static_cast<const T*>(nullptr))->hasMax(rname) ; }
389
390 /// @}
391
392
393private:
394 /// Are we a real-valued proxy or a category proxy?
395 using LValue_t = typename std::conditional<std::is_base_of<RooAbsReal, T>::value,
397
398 ////////////////////////////////////////////////////////////////////////////////
399 /// Return l-value pointer to contents. If the contents derive from RooAbsLValue or RooAbsCategoryLValue,
400 /// the conversion is safe, and the function directly returns the pointer using a static_cast.
401 /// If the template parameter of this proxy is not an LValue type, then
402 /// - in a debug build, a dynamic_cast with an assertion is used.
403 /// - in a release build, a static_cast is forced, irrespective of what the type of the object actually is. This
404 /// is dangerous, but equivalent to the behaviour before refactoring the RooFit proxies.
405 /// \deprecated This function is unnecessary if the template parameter is RooAbsRealLValue (+ derived types) or
406 /// RooAbsCategoryLValue (+derived types), as arg() will always return the correct type.
407 const LValue_t* lvptr(const LValue_t*) const {
408 return static_cast<const LValue_t*>(_arg);
409 }
410 /// \copydoc lvptr(const LValue_t*) const
411 LValue_t* lvptr(LValue_t*) {
412 return static_cast<LValue_t*>(_arg);
413 }
414 /// \copydoc lvptr(const LValue_t*) const
415 const LValue_t* lvptr(const RooAbsArg*) const
416 R__SUGGEST_ALTERNATIVE("The template argument of RooTemplateProxy needs to derive from RooAbsRealLValue or RooAbsCategoryLValue to safely call this function.") {
417#ifdef NDEBUG
418 return static_cast<const LValue_t*>(_arg);
419#else
420 auto theArg = dynamic_cast<const LValue_t*>(_arg);
421 assert(theArg);
422 return theArg;
423#endif
424 }
425 /// \copydoc lvptr(const LValue_t*) const
426 LValue_t* lvptr(RooAbsArg*)
427 R__SUGGEST_ALTERNATIVE("The template argument of RooTemplateProxy needs to derive from RooAbsRealLValue or RooAbsCategoryLValue to safely call this function.") {
428#ifdef NDEBUG
429 return static_cast<LValue_t*>(_arg);
430#else
431 auto theArg = dynamic_cast<LValue_t*>(_arg);
432 assert(theArg);
433 return theArg;
434#endif
435 }
436
437
438 /// Retrieve index state from a category.
439 typename T::value_type retrieveValue(const RooAbsCategory& cat) const {
440 return cat.getCurrentIndex();
441 }
442
443 /// Retrieve value from a real-valued object.
444 typename T::value_type retrieveValue(const RooAbsReal& real) const {
445 return real.getVal(_nset);
446 }
447
448 ClassDefOverride(RooTemplateProxy,1) // Proxy for a RooAbsReal object
449};
450
451#endif
#define R__SUGGEST_ALTERNATIVE(ALTERNATIVE)
Definition RConfig.hxx:512
#define R__DEPRECATED(MAJOR, MINOR, REASON)
Definition RConfig.hxx:504
#define coutE(a)
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
TTime operator*(const TTime &t1, const TTime &t2)
Definition TTime.h:85
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Definition RooAbsArg.h:79
Abstract base class for objects that represent a discrete value that can be set from the outside,...
A space to attach TBranches.
virtual value_type getCurrentIndex() const
Return index number of current state.
RooArgSet * _nset
! Normalization set to be used for evaluation of RooAbsPdf contents
Definition RooAbsProxy.h:60
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
Definition RooAbsReal.h:103
Abstract interface for RooAbsArg proxy classes.
Definition RooArgProxy.h:24
RooAbsArg * _owner
Pointer to owner of proxy.
Definition RooArgProxy.h:77
bool _ownArg
If true proxy owns contents.
Definition RooArgProxy.h:83
RooAbsArg * _arg
Pointer to content of proxy.
Definition RooArgProxy.h:78
RooArgProxy & operator=(RooArgProxy const &other)=delete
bool changePointer(const RooAbsCollection &newServerSet, bool nameChange=false, bool factoryInitMode=false) override
Change proxied object to object of same name in given list.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
LValue_t * lvptr(RooAbsArg *)
Return l-value pointer to contents.
T::value_type retrieveValue(const RooAbsCategory &cat) const
Retrieve index state from a category.
const char RooAbsArg Bool bool bool proxyOwnsArg
RooTemplateProxy(const char *theName, const char *desc, RooAbsArg *owner, Bool valueServer=true, bool shapeServer=false)
Constructor with owner.
const LValue_t * lvptr(const RooAbsArg *) const
Return l-value pointer to contents.
const char RooAbsArg Bool bool shapeServer
const LValue_t * lvptr(const LValue_t *) const
Return l-value pointer to contents.
const char RooAbsArg * owner
LValue_t * lvptr(LValue_t *)
Return l-value pointer to contents.
T::value_type retrieveValue(const RooAbsReal &real) const
Retrieve value from a real-valued object.
R__DEPRECATED(6, 36, "Use RooTemplateProxy(const char*, const char*, RooAbsArg*, bool, bool) and transfer the ownership with RooTemplateProxy::putOwnedArg().") RooTemplateProxy(const char *theName
Constructor with owner.
const char RooAbsArg Bool valueServer
TObject * Clone(const char *newname="") const override
Make a clone of an object using the Streamer facility.
Definition TNamed.cxx:74
const char * GetName() const override
Returns name of object.
Definition TNamed.h:47
Mother of all ROOT objects.
Definition TObject.h:41
double T(double x)
__device__ AFloat max(AFloat x, AFloat y)
Definition Kernels.cuh:207