Logo ROOT  
Reference Guide
RooRealVarSharedProperties.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooRealVarSharedProperties.h,v 1.3 2007/05/11 09:11:30 verkerke 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
17/**
18\file RooRealVarSharedProperties.h
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#ifndef ROO_REAL_VAR_SHARED_PROPERTY
28#define ROO_REAL_VAR_SHARED_PROPERTY
29
30#include "RooAbsBinning.h"
31#include "RooSharedProperties.h"
32
33#include <memory>
34#include <unordered_map>
35#include <string>
36
37class RooAbsBinning;
38
40public:
41
42 /// Default constructor.
44 /// Constructor with unique-id string.
45 RooRealVarSharedProperties(const char* uuidstr) : RooSharedProperties(uuidstr) {}
46
47 /// Destructor
49 if (_ownBinnings) {
50 for (auto& item : _altBinning) {
51 delete item.second;
52 }
53 }
54 }
55
57 _ownBinnings = false;
58 }
59
60protected:
61
62 friend class RooRealVar ;
63
64 std::unordered_map<std::string,RooAbsBinning*> _altBinning ; // Optional alternative ranges and binnings
65 bool _ownBinnings{true}; //!
66 ClassDef(RooRealVarSharedProperties,2) // Shared properties of a RooRealVar clone set
67};
68
69
70#endif
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooAbsBinning is the abstract base class for RooRealVar binning definitions.
Definition: RooAbsBinning.h:26
Class RooRealVarSharedProperties is an implementation of RooSharedProperties that stores the properti...
virtual ~RooRealVarSharedProperties()
Destructor.
std::unordered_map< std::string, RooAbsBinning * > _altBinning
RooRealVarSharedProperties()
Default constructor.
RooRealVarSharedProperties(const char *uuidstr)
Constructor with unique-id string.
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:39
Class RooSharedProperties is the base class for shared properties that can be stored in RooSharedProp...