Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooAbsProxy.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooAbsProxy.h,v 1.15 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_ABS_PROXY
17#define ROO_ABS_PROXY
18
19#ifdef _WIN32
20// Turn off 'warning C4355: 'this' : used in base member initializer list'
21//
22// This message will pop up for any class that initializes member proxy objects
23// Including the pragma here will automatically disable that warning message
24// for all such cases
25#pragma warning ( disable:4355 )
26#endif
27
28#include <TClass.h>
29
30#include <string>
31#include <unordered_map>
32
33class RooAbsArg;
35class RooArgSet;
36
38public:
39
40 // Constructors, assignment etc.
41 RooAbsProxy() ;
42 RooAbsProxy(const char* name, const RooAbsProxy& other) ;
43 virtual ~RooAbsProxy() {
44 // Destructor
45 } ;
46
47 virtual const char* name() const {
48 // Return name of proxy
49 return "dummy" ;
50 } ;
51
52 inline const RooArgSet* nset() const {
53 // Return normalization set to be used for evaluation of contents
54 return _nset ;
55 }
56 virtual void print(std::ostream& os, bool addContents=false) const ;
57
58protected:
59
60 RooArgSet* _nset = nullptr ; ///<! Normalization set to be used for evaluation of RooAbsPdf contents
61
62 friend class RooAbsArg ;
63 virtual bool changePointer(const RooAbsCollection& newServerSet, bool nameChange=false, bool factoryInitMode=false) = 0 ;
64 virtual bool changePointer(std::unordered_map<RooAbsArg*, RooAbsArg*> const& replacements) = 0 ;
65
66 friend class RooAbsPdf ;
67 virtual void changeNormSet(const RooArgSet* newNormSet) ;
68
69 ClassDef(RooAbsProxy,1) // Abstract proxy interface
70} ;
71
72#endif
73
#define ClassDef(name, id)
Definition Rtypes.h:337
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition RooAbsArg.h:74
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooAbsProxy is the abstact interface for proxy classes.
Definition RooAbsProxy.h:37
virtual void changeNormSet(const RooArgSet *newNormSet)
Destructor.
const RooArgSet * nset() const
Definition RooAbsProxy.h:52
RooAbsProxy()
Constructor.
virtual bool changePointer(std::unordered_map< RooAbsArg *, RooAbsArg * > const &replacements)=0
RooArgSet * _nset
! Normalization set to be used for evaluation of RooAbsPdf contents
Definition RooAbsProxy.h:60
virtual void print(std::ostream &os, bool addContents=false) const
Print proxy name.
virtual const char * name() const
Definition RooAbsProxy.h:47
virtual bool changePointer(const RooAbsCollection &newServerSet, bool nameChange=false, bool factoryInitMode=false)=0
virtual ~RooAbsProxy()
Definition RooAbsProxy.h:43
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55