Logo ROOT  
Reference Guide
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 
22 Class RooRealVarSharedProperties is an implementation of RooSharedProperties
23 that stores the properties of a RooRealVar that are shared among clones.
24 For RooRealVars these are the definitions of the named ranges.
25 **/
26 
27 #include "RooFit.h"
29 #include "RooAbsBinning.h"
30 
31 #include <iostream>
32 
33 using 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
59  RooSharedProperties(other),
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 
RooRealVarSharedProperties
Class RooRealVarSharedProperties is an implementation of RooSharedProperties that stores the properti...
Definition: RooRealVarSharedProperties.h:27
RooFit.h
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
RooRealVarSharedProperties::RooRealVarSharedProperties
RooRealVarSharedProperties()
Default constructor.
Definition: RooRealVarSharedProperties.cxx:43
RooRealVarSharedProperties::_ownBinnings
bool _ownBinnings
Definition: RooRealVarSharedProperties.h:49
RooRealVarSharedProperties::_altBinning
std::unordered_map< std::string, RooAbsBinning * > _altBinning
Definition: RooRealVarSharedProperties.h:48
RooSharedProperties
Class RooSharedProperties is the base class for shared properties that can be stored in RooSharedProp...
Definition: RooSharedProperties.h:23
RooRealVarSharedProperties::~RooRealVarSharedProperties
virtual ~RooRealVarSharedProperties()
Destructor.
Definition: RooRealVarSharedProperties.cxx:71
RooAbsBinning.h
RooRealVarSharedProperties.h