Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooRealVarSharedProperties.cxx
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * @(#)root/roofitcore:$Id$
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
17/**
18\file RooRealVarSharedProperties.cxx
19\class RooRealVarSharedProperties
20\ingroup Roofitcore
21
22Class RooRealVarSharedProperties is an implementation of RooSharedProperties
23that stores the properties of a RooRealVar that are shared among clones.
24For RooRealVars these are the definitions of the named ranges.
25**/
26
27#include "RooFit.h"
29#include "RooAbsBinning.h"
30
31#include <iostream>
32
33using namespace std;
34
36;
37
38
39
40////////////////////////////////////////////////////////////////////////////////
41/// Default constructor
42
44{
45}
46
47
48////////////////////////////////////////////////////////////////////////////////
49/// Constructor with unique-id string
50
52{
53}
54
55
56////////////////////////////////////////////////////////////////////////////////
57/// Copy constructor
60 _altBinning(other._altBinning),
61 _ownBinnings(false)
62{
63 std::cerr << "Warning: RooRealVarSharedProperties should not be copied. The copy will not own the binnings." << std::endl;
64}
65
66
67
68////////////////////////////////////////////////////////////////////////////////
69/// Destructor
70
72{
73 if (_ownBinnings) {
74 for (auto& item : _altBinning) {
75 delete item.second;
76 }
77 }
78}
79
80
#define ClassImp(name)
Definition Rtypes.h:364
Class RooRealVarSharedProperties is an implementation of RooSharedProperties that stores the properti...
std::unordered_map< std::string, RooAbsBinning * > _altBinning
RooRealVarSharedProperties()
Default constructor.
virtual ~RooRealVarSharedProperties()
Destructor.
Class RooSharedProperties is the base class for shared properties that can be stored in RooSharedProp...