Logo ROOT  
Reference Guide
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 #include <string>
25 
26 /**
27 \class RooTemplateProxy
28 \ingroup Roofitcore
29 
30 ## Introduction
31 A RooTemplateProxy is used to hold references to other RooFit objects in an expression tree.
32 A `RooGaussian(..., x, mean, sigma)` can e.g. store references to `x, mean, sigma` as
33 ```
34 RooTemplateProxy<RooAbsReal> _x;
35 RooTemplateProxy<RooAbsReal> _mean;
36 RooTemplateProxy<RooAbsReal> _sigma;
37 ```
38 Now, the values of these three can be accessed, and the template argument ensures that only objects that evaluate
39 to real numbers (RooAbsReal) can be stored in such a proxy. These can e.g. be variables, PDFs and functions.
40 To store an object that's a `RooCategory`, one would, for example, use
41 ```
42 RooTemplateProxy<RooCategory> _category;
43 ```
44 
45 Since %ROOT 6.22, the proxy can be used like a pointer to an instance of the template argument.
46 For this, it provides `operator*` and `operator->`, e.g.
47 ```
48 double oldValue = _x->getVal(normalisationSet);
49 *_x = 17.;
50 ```
51 
52 RooTemplateProxy's base class RooArgProxy registers the proxied objects as "servers" of the object
53 that holds the proxy. When the value of the proxied object is changed, the owner is
54 notified, and can recalculate its own value. Renaming or exchanging objects that
55 serve values to the owner of the proxy is handled automatically.
56 
57 ## Modernisation of proxies in %ROOT 6.22
58 In ROOT 6.22, the classes RooRealProxy and RooCategoryProxy were replaced by RooTemplateProxy<class T>.
59 
60 Two typedefs have been defined for backward compatibility:
61 - `RooRealProxy = RooTemplateProxy<RooAbsReal>`. Any generic object that converts to a real value.
62 - `RooCategoryProxy = RooTemplateProxy<RooAbsCategory>`. Any category object.
63 
64 To modernise a class, one can change the template argument of the proxy to the most appropriate type,
65 and increment the class version of the owner.
66 
67 <table>
68 <tr><th> %RooFit before %ROOT 6.22 <th> %RooFit starting with %ROOT 6.22
69 <tr><td>
70 ~~~{.cpp}
71 // In .h: Declare member
72 RooRealProxy pdfProxy;
73 
74 ClassDef(MyPdf, 1)
75 };
76 
77 // In .cxx: Initialise proxy in constructor
78 // The proxy will accept any RooAbsArg, so the type of
79 // "thePdf" has to be checked manually.
80 MyPdf::MyPdf(name, title, ...) :
81  pdfProxy("pdfProxy", "Proxy holding a PDF", this, thePdf) {
82  [ Extra checking here ... ]
83 }
84 
85 
86 // In .cxx: Accessing the proxy
87 RooAbsArg* absArg = pdfProxy.absArg();
88 RooAbsPdf* pdf = dynamic_cast<RooAbsPdf*>(absArg);
89 assert(pdf); // Manual type checking ...
90 pdf->fitTo(...);
91 ~~~
92 <td>
93 ~~~{.cpp}
94 // In .h: Declare member
95 RooTemplateProxy<RooAbsPdf> pdfProxy;
96 
97 ClassDef(MyPdf, 2)
98 };
99 
100 // In .cxx: Initialise proxy in constructor
101 // The program will not compile if "thePdf" is not a
102 // type deriving from RooAbsPdf
103 MyPdf::MyPdf(name, title, ...) :
104  pdfProxy("pdfProxy", "Proxy holding a PDF", this, thePdf) {
105 
106 }
107 
108 
109 // In .cxx: Accessing the proxy
110 
111 
112 
113 pdfProxy->fitTo(...);
114 ~~~
115 </table>
116 
117 
118 ### How to modernise old code
119 
120 1. Choose the proper template argument for the proxy.
121  - If a PDF is stored: `RooTemplateProxy<RooAbsPdf>`.
122  - If a real-valued object is stored: `RooTemplateProxy<RooAbsReal>`.
123  - If a category is stored: `RooTemplateProxy<RooCategory>`.
124  - If a variable is stored (i.e. one wants to be able to assign values to it): `RooTemplateProxy<RooRealVar>`
125  Other template arguments are possible, as long as they derive from RooAbsArg.
126 2. Increment the class version of the owning class.
127 3. Make sure that the right type is passed in the constructor of the proxy.
128 4. Always use `proxy->` and `*proxy` to work with the stored object. No need to cast.
129 5. **Only if necessary** If errors about missing symbols connected to RooTemplateProxy appear at link time,
130  a specific template instantiation for RooTemplateProxy is not yet in ROOT's dictionaries.
131  These two lines should be added to the LinkDef.h of the project:
132  ~~~{.cpp}
133  #pragma link C++ class RooTemplateProxy<RooMultiCategory>+;
134  #pragma read sourceClass="RooCategoryProxy" targetClass="RooTemplateProxy<RooMultiCategory>"
135  ~~~
136  Replace `RooMultiCategory` by the proper type. If the proxy was holding a real-valued object, use `sourceClass="RooRealProxy"`.
137 
138  The first line adds the proxy class to the dictionary, the second line enables reading a legacy
139  `RooCategoryProxy` from a file, and converting it to the new type-safe proxy. If no old proxies
140  have to be read from files, this line can be omitted.
141 
142  If the template instantiation that triggered the missing symbols seems to be a very common instantiation,
143  request for it to be added to RooFit by creating a pull request for ROOT. If it is rather uncommon,
144  it is sufficient to add it to the LinkDef.h of the local project only.
145 
146 **/
147 
148 template<class T>
150 public:
151 
153 
154  ////////////////////////////////////////////////////////////////////////////////
155  /// Constructor with owner.
156  /// \param[in] theName Name of this proxy (for printing).
157  /// \param[in] desc Description what this proxy should act as.
158  /// \param[in] owner The object that owns the proxy. This is important for tracking
159  /// of client-server dependencies.
160  /// \param[in] valueServer Notify the owner if value changes.
161  /// \param[in] shapeServer Notify the owner if shape (e.g. binning) changes.
162  /// \param[in] proxyOwnsArg Proxy will delete the payload if owning.
163  RooTemplateProxy(const char* theName, const char* desc, RooAbsArg* owner,
164  Bool_t valueServer=true, Bool_t shapeServer=false, Bool_t proxyOwnsArg=false)
165  : RooArgProxy(theName, desc, owner, valueServer, shapeServer, proxyOwnsArg) { }
166 
167  ////////////////////////////////////////////////////////////////////////////////
168  /// Constructor with owner and proxied object.
169  /// \param[in] theName Name of this proxy (for printing).
170  /// \param[in] desc Description what this proxy should act as.
171  /// \param[in] owner The object that owns the proxy. This is important for tracking
172  /// of client-server dependencies.
173  /// \param[in] ref Reference to the object that the proxy should hold.
174  /// \param[in] valueServer Notify the owner if value changes.
175  /// \param[in] shapeServer Notify the owner if shape (e.g. binning) changes.
176  /// \param[in] proxyOwnsArg Proxy will delete the payload if owning.
177  RooTemplateProxy(const char* theName, const char* desc, RooAbsArg* owner, T& ref,
178  Bool_t valueServer=true, Bool_t shapeServer=false, Bool_t proxyOwnsArg=false) :
179  RooArgProxy(theName, desc, owner, ref, valueServer, shapeServer, proxyOwnsArg) { }
180 
181 
182  ////////////////////////////////////////////////////////////////////////////////
183  /// Copy from an existing proxy.
184  /// It will accept any RooTemplateProxy instance, and attempt a dynamic_cast on its payload.
185  /// \param[in] theName Name of this proxy.
186  /// \param[in] owner Pointer to the owner this proxy should be registered to.
187  /// \param[in] other Instance of a differen proxy whose payload should be copied.
188  /// \param[in] allowWrongTypes Instead of throwing a std::invalid_argument, only issue an
189  /// error message when payload with wrong type is found. This is unsafe, but may be necessary
190  /// when reading back legacy types. Defaults to false.
191  /// \throw std::invalid_argument if the types of the payloads are incompatible.
192  template<typename U>
193  RooTemplateProxy(const char* theName, RooAbsArg* owner, const RooTemplateProxy<U>& other, bool allowWrongTypes = false) :
194  RooArgProxy(theName, owner, other) {
195  if (_arg && !dynamic_cast<const T*>(_arg)) {
196  if (allowWrongTypes) {
197  coutE(InputArguments) << "Error trying to copy an argument from a proxy with an incompatible payload." << std::endl;
198  } else {
199  throw std::invalid_argument("Tried to construct a RooTemplateProxy with incompatible payload.");
200  }
201  }
202  }
203 
204  virtual TObject* Clone(const char* newName=0) const { return new RooTemplateProxy<T>(newName,_owner,*this); }
205 
206 
207  /// Return reference to the proxied object.
208  T& operator*() const {
209  return static_cast<T&>(*_arg);
210  }
211 
212  /// Member access operator to proxied object.
213  T* operator->() const {
214  return static_cast<T*>(_arg);
215  }
216 
217 
218  /// Convert the proxy into a number.
219  /// \return A category proxy will return the index state, real proxies the result of RooAbsReal::getVal(normSet).
220  operator typename T::value_type() const {
221  return retrieveValue(arg());
222  }
223 
224 
225  ////////////////////////////////////////////////////////////////////////////////
226  /// Change object held in proxy into newRef
227  bool setArg(T& newRef) {
228  if (_arg) {
229  if (std::string(arg().GetName()) != newRef.GetName()) {
230  newRef.setAttribute(Form("ORIGNAME:%s", arg().GetName())) ;
231  }
232  return changePointer(RooArgSet(newRef), true);
233  } else {
234  return changePointer(RooArgSet(newRef), false, true);
235  }
236  }
237 
238 
239  /// \name Legacy interface
240  /// In ROOT versions before 6.22, RooFit didn't have this typed proxy. Therefore, a number of functions
241  /// for forwarding calls to the proxied objects were necessary. The functions in this group can all be
242  /// replaced by directly accessing the proxied objects using e.g. the member access operator like
243  /// `proxy->function()` or by dereferencing like `*proxy = value`.
244  /// For this to work, choose the template argument appropriately. That is, if the
245  /// proxy stores a PDF, use `RooTemplateProxy<RooAbsPdf>`, *etc.*.
246  /// @{
247 
248  /// Get the label of the current category state. This function only makes sense for category proxies.
249  const char* label() const {
250  return arg().getCurrentLabel();
251  }
252 
253  /// Check if the stored object has a range with the given name.
254  bool hasRange(const char* rangeName) const {
255  return arg().hasRange(rangeName);
256  }
257 
258 
259  /// Retrieve a batch of real or category data.
260  /// When retrieving real-valued data from e.g. a PDF, the normalisation set saved by this proxy will be passed
261  /// on the the proxied object.
262  /// \param[in] begin Begin of the range to be retrieved.
263  /// \param[in] batchSize Size of the range to be retrieved. Batch may be smaller if no more data available.
264  /// \return RooSpan<const double> for real-valued proxies, RooSpan<const int> for category proxies.
265  RooSpan<const typename T::value_type> getValBatch(std::size_t begin, std::size_t batchSize) const {
266  return retrieveBatchVal(begin, batchSize, arg());
267  }
268 
269 
270  /// Return reference to object held in proxy.
271  const T& arg() const { return static_cast<const T&>(*_arg); }
272 
273  /// Assign a new value to the object pointed to by the proxy.
274  /// This requires the payload to be assignable (RooAbsRealLValue or derived, RooAbsCategoryLValue).
275  RooTemplateProxy<T>& operator=(typename T::value_type value) {
276  lvptr(static_cast<T*>(nullptr))->operator=(value);
277  return *this;
278  }
279  /// Set a category state using its state name. This function can only work for category-type proxies.
280  RooTemplateProxy<T>& operator=(const std::string& newState) {
281  static_assert(std::is_base_of<RooAbsCategory, T>::value, "Strings can only be assigned to category proxies.");
282  lvptr(static_cast<RooAbsCategoryLValue*>(nullptr))->operator=(newState.c_str());
283  return *this;
284  }
285 
286  /// Query lower limit of range. This requires the payload to be RooAbsRealLValue or derived.
287  double min(const char* rname=0) const { return lvptr(static_cast<const T*>(nullptr))->getMin(rname) ; }
288  /// Query upper limit of range. This requires the payload to be RooAbsRealLValue or derived.
289  double max(const char* rname=0) const { return lvptr(static_cast<const T*>(nullptr))->getMax(rname) ; }
290  /// Check if the range has a lower bound. This requires the payload to be RooAbsRealLValue or derived.
291  bool hasMin(const char* rname=0) const { return lvptr(static_cast<const T*>(nullptr))->hasMin(rname) ; }
292  /// Check if the range has a upper bound. This requires the payload to be RooAbsRealLValue or derived.
293  bool hasMax(const char* rname=0) const { return lvptr(static_cast<const T*>(nullptr))->hasMax(rname) ; }
294 
295  /// @}
296 
297 
298 private:
299  /// Are we a real-valued proxy or a category proxy?
300  using LValue_t = typename std::conditional<std::is_base_of<RooAbsReal, T>::value,
302 
303  ////////////////////////////////////////////////////////////////////////////////
304  /// Return l-value pointer to contents. If the contents derive from RooAbsLValue or RooAbsCategoryLValue,
305  /// the conversion is safe, and the function directly returns the pointer using a static_cast.
306  /// If the template parameter of this proxy is not an LValue type, then
307  /// - in a debug build, a dynamic_cast with an assertion is used.
308  /// - in a release build, a static_cast is forced, irrespective of what the type of the object actually is. This
309  /// is dangerous, but equivalent to the behaviour before refactoring the RooFit proxies.
310  /// \deprecated This function is unneccessary if the template parameter is RooAbsRealLValue (+ derived types) or
311  /// RooAbsCategoryLValue (+derived types), as arg() will always return the correct type.
312  const LValue_t* lvptr(const LValue_t*) const {
313  return static_cast<const LValue_t*>(_arg);
314  }
315  /// \copydoc lvptr(const LValue_t*) const
317  return static_cast<LValue_t*>(_arg);
318  }
319  /// \copydoc lvptr(const LValue_t*) const
320  const LValue_t* lvptr(const RooAbsArg*) const
321  R__SUGGEST_ALTERNATIVE("The template argument of RooTemplateProxy needs to derive from RooAbsRealLValue or RooAbsCategoryLValue to safely call this function.") {
322 #ifdef NDEBUG
323  return static_cast<const LValue_t*>(_arg);
324 #else
325  auto theArg = dynamic_cast<const LValue_t*>(_arg);
326  assert(theArg);
327  return theArg;
328 #endif
329  }
330  /// \copydoc lvptr(const LValue_t*) const
332  R__SUGGEST_ALTERNATIVE("The template argument of RooTemplateProxy needs to derive from RooAbsRealLValue or RooAbsCategoryLValue to safely call this function.") {
333 #ifdef NDEBUG
334  return static_cast<LValue_t*>(_arg);
335 #else
336  auto theArg = dynamic_cast<LValue_t*>(_arg);
337  assert(theArg);
338  return theArg;
339 #endif
340  }
341 
342 
343  /// Retrieve index state from a category.
344  typename T::value_type retrieveValue(const RooAbsCategory& cat) const {
345  return cat.getCurrentIndex();
346  }
347 
348  /// Retrieve value from a real-valued object.
349  typename T::value_type retrieveValue(const RooAbsReal& real) const {
350  return real.getVal(_nset);
351  }
352 
353  /// Retrieve a batch of index states from a category.
354  RooSpan<const typename T::value_type> retrieveBatchVal(std::size_t begin, std::size_t batchSize, const RooAbsCategory& cat) const {
355  return cat.getValBatch(begin, batchSize);
356  }
357 
358  /// Retrieve a batch of values from a real-valued object. The current normalisation set associated to the proxy will be passed on.
359  RooSpan<const typename T::value_type> retrieveBatchVal(std::size_t begin, std::size_t batchSize, const RooAbsReal& real) const {
360  return real.getValBatch(begin, batchSize, _nset);
361  }
362 
363  ClassDef(RooTemplateProxy,1) // Proxy for a RooAbsReal object
364 };
365 
366 #endif
RooTemplateProxy::RooTemplateProxy
RooTemplateProxy(const char *theName, const char *desc, RooAbsArg *owner, T &ref, Bool_t valueServer=true, Bool_t shapeServer=false, Bool_t proxyOwnsArg=false)
Constructor with owner and proxied object.
Definition: RooTemplateProxy.h:177
RooTemplateProxy::lvptr
const LValue_t * lvptr(const LValue_t *) const
Return l-value pointer to contents.
Definition: RooTemplateProxy.h:312
RooAbsReal.h
RooMsgService.h
RooTemplateProxy::hasMax
bool hasMax(const char *rname=0) const
Check if the range has a upper bound. This requires the payload to be RooAbsRealLValue or derived.
Definition: RooTemplateProxy.h:293
RooAbsCategory::getCurrentIndex
virtual value_type getCurrentIndex() const
Return index number of current state.
Definition: RooAbsCategory.cxx:114
RooTemplateProxy::arg
const T & arg() const
Return reference to object held in proxy.
Definition: RooTemplateProxy.h:271
RooFit::InputArguments
@ InputArguments
Definition: RooGlobalFunc.h:68
Form
char * Form(const char *fmt,...)
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
RooTemplateProxy::getValBatch
RooSpan< const typename T::value_type > getValBatch(std::size_t begin, std::size_t batchSize) const
Retrieve a batch of real or category data.
Definition: RooTemplateProxy.h:265
coutE
#define coutE(a)
Definition: RooMsgService.h:33
RooTemplateProxy::hasMin
bool hasMin(const char *rname=0) const
Check if the range has a lower bound. This requires the payload to be RooAbsRealLValue or derived.
Definition: RooTemplateProxy.h:291
RooAbsReal::getVal
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
Definition: RooAbsReal.h:91
RooTemplateProxy::operator*
T & operator*() const
Return reference to the proxied object.
Definition: RooTemplateProxy.h:208
R__SUGGEST_ALTERNATIVE
#define R__SUGGEST_ALTERNATIVE(ALTERNATIVE)
Definition: RConfig.hxx:530
RooTemplateProxy::operator=
RooTemplateProxy< T > & operator=(const std::string &newState)
Set a category state using its state name. This function can only work for category-type proxies.
Definition: RooTemplateProxy.h:280
RooAbsReal
Definition: RooAbsReal.h:61
RooTemplateProxy::retrieveBatchVal
RooSpan< const typename T::value_type > retrieveBatchVal(std::size_t begin, std::size_t batchSize, const RooAbsCategory &cat) const
Retrieve a batch of index states from a category.
Definition: RooTemplateProxy.h:354
RooTemplateProxy::Clone
virtual TObject * Clone(const char *newName=0) const
Make a clone of an object using the Streamer facility.
Definition: RooTemplateProxy.h:204
bool
RooTemplateProxy::LValue_t
typename std::conditional< std::is_base_of< RooAbsReal, T >::value, RooAbsRealLValue, RooAbsCategoryLValue >::type LValue_t
Are we a real-valued proxy or a category proxy?
Definition: RooTemplateProxy.h:301
RooAbsReal::getValBatch
virtual RooSpan< const double > getValBatch(std::size_t begin, std::size_t maxSize, const RooArgSet *normSet=nullptr) const
Return value of object for all data events in the batch.
Definition: RooAbsReal.cxx:295
RooAbsCategory
Definition: RooAbsCategory.h:38
RooTemplateProxy::lvptr
const LValue_t * lvptr(const RooAbsArg *) const
Return l-value pointer to contents.
Definition: RooTemplateProxy.h:320
RooTemplateProxy::RooTemplateProxy
RooTemplateProxy()
Definition: RooTemplateProxy.h:152
RooTemplateProxy::operator=
RooTemplateProxy< T > & operator=(typename T::value_type value)
Assign a new value to the object pointed to by the proxy.
Definition: RooTemplateProxy.h:275
RooArgProxy
Definition: RooArgProxy.h:24
RooTemplateProxy::min
double min(const char *rname=0) const
Query lower limit of range. This requires the payload to be RooAbsRealLValue or derived.
Definition: RooTemplateProxy.h:287
RooTemplateProxy::operator->
T * operator->() const
Member access operator to proxied object.
Definition: RooTemplateProxy.h:213
RooTemplateProxy::retrieveValue
T::value_type retrieveValue(const RooAbsCategory &cat) const
Retrieve index state from a category.
Definition: RooTemplateProxy.h:344
RooTemplateProxy::RooTemplateProxy
RooTemplateProxy(const char *theName, const char *desc, RooAbsArg *owner, Bool_t valueServer=true, Bool_t shapeServer=false, Bool_t proxyOwnsArg=false)
Constructor with owner.
Definition: RooTemplateProxy.h:163
RooTemplateProxy::RooTemplateProxy
RooTemplateProxy(const char *theName, RooAbsArg *owner, const RooTemplateProxy< U > &other, bool allowWrongTypes=false)
Copy from an existing proxy.
Definition: RooTemplateProxy.h:193
RooAbsProxy::_nset
RooArgSet * _nset
Definition: RooAbsProxy.h:67
RooTemplateProxy::setArg
bool setArg(T &newRef)
Change object held in proxy into newRef.
Definition: RooTemplateProxy.h:227
RooTemplateProxy::label
const char * label() const
Get the label of the current category state. This function only makes sense for category proxies.
Definition: RooTemplateProxy.h:249
RooTemplateProxy
Definition: RooTemplateProxy.h:149
RooTemplateProxy::lvptr
LValue_t * lvptr(RooAbsArg *)
Return l-value pointer to contents.
Definition: RooTemplateProxy.h:331
RooAbsCategory.h
RooArgProxy::_owner
RooAbsArg * _owner
Definition: RooArgProxy.h:65
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooTemplateProxy::hasRange
bool hasRange(const char *rangeName) const
Check if the stored object has a range with the given name.
Definition: RooTemplateProxy.h:254
ROOT::Math::Chebyshev::T
double T(double x)
Definition: ChebyshevPol.h:52
RooTemplateProxy::max
double max(const char *rname=0) const
Query upper limit of range. This requires the payload to be RooAbsRealLValue or derived.
Definition: RooTemplateProxy.h:289
RooAbsArg
Definition: RooAbsArg.h:73
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:53
type
int type
Definition: TGX11.cxx:121
RooAbsCategoryLValue
Definition: RooAbsCategoryLValue.h:25
RooTemplateProxy::retrieveBatchVal
RooSpan< const typename T::value_type > retrieveBatchVal(std::size_t begin, std::size_t batchSize, const RooAbsReal &real) const
Retrieve a batch of values from a real-valued object. The current normalisation set associated to the...
Definition: RooTemplateProxy.h:359
RooAbsRealLValue
Definition: RooAbsRealLValue.h:31
RooAbsRealLValue.h
RooArgProxy.h
RooSpan
A simple container to hold a batch of data values.
Definition: RooSpan.h:33
RooTemplateProxy::retrieveValue
T::value_type retrieveValue(const RooAbsReal &real) const
Retrieve value from a real-valued object.
Definition: RooTemplateProxy.h:349
RooArgSet
Definition: RooArgSet.h:28
RooAbsCategory::getValBatch
virtual RooSpan< const value_type > getValBatch(std::size_t, std::size_t) const
Retrieve a batch of category values for events in the range [begin, begin+batchSize).
Definition: RooAbsCategory.h:52
RooTemplateProxy::lvptr
LValue_t * lvptr(LValue_t *)
Return l-value pointer to contents.
Definition: RooTemplateProxy.h:316