Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooChangeTracker.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $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#ifndef ROO_CHANGE_TRACKER
17#define ROO_CHANGE_TRACKER
18
19#include "RooAbsReal.h"
20#include "RooListProxy.h"
21#include <vector>
22
24public:
25
26 RooChangeTracker() = default;
27 RooChangeTracker(const char *name, const char *title, const RooArgSet& trackSet, bool checkValues=false) ;
28
29 RooChangeTracker(const RooChangeTracker& other, const char* name = nullptr);
30 TObject* clone(const char* newname) const override { return new RooChangeTracker(*this, newname); }
31
32 bool hasChanged(bool clearState) ;
33
34 RooArgSet parameters() const ;
35
36
37protected:
38
39 RooListProxy _realSet ; ///< List of reals to track
40 RooListProxy _catSet ; ///< List of categories to check
41 std::vector<double> _realRef ; ///< Reference values for reals
42 std::vector<Int_t> _catRef ; ///< Reference values for categories
43 bool _checkVal = false; ///< Check contents as well if true
44
45 bool _init = false; //!
46
47 double evaluate() const override { return 1 ; }
48
49 ClassDefOverride(RooChangeTracker,1) // Meta object that tracks changes in set of other arguments
50};
51
52#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
char name[80]
Definition TGX11.cxx:110
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
Meta object that tracks value changes in a given set of RooAbsArgs by registering itself as value cli...
bool hasChanged(bool clearState)
Returns true if state has changed since last call with clearState=true.
RooListProxy _catSet
List of categories to check.
bool _checkVal
Check contents as well if true.
RooChangeTracker()=default
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
std::vector< Int_t > _catRef
Reference values for categories.
TObject * clone(const char *newname) const override
RooArgSet parameters() const
std::vector< double > _realRef
Reference values for reals.
RooListProxy _realSet
List of reals to track.
Mother of all ROOT objects.
Definition TObject.h:41