Logo ROOT  
Reference Guide
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 
23 class RooRealVar;
24 class RooArgList ;
25 
26 class RooChangeTracker : public RooAbsReal {
27 public:
28 
30  RooChangeTracker(const char *name, const char *title, const RooArgSet& trackSet, Bool_t checkValues=kFALSE) ;
31  virtual ~RooChangeTracker() ;
32 
33  RooChangeTracker(const RooChangeTracker& other, const char* name = 0);
34  virtual TObject* clone(const char* newname) const { return new RooChangeTracker(*this, newname); }
35 
36  Bool_t hasChanged(Bool_t clearState) ;
37 
38  RooArgSet parameters() const ;
39 
40 
41 protected:
42 
43  RooListProxy _realSet ; // List of reals to track
44  RooListProxy _catSet ; // List of categories to check
45  std::vector<Double_t> _realRef ; // Reference values for reals
46  std::vector<Int_t> _catRef ; // Reference valyes for categories
47  Bool_t _checkVal ; // Check contents as well if true
48 
49  Bool_t _init ; //!
50 
51  Double_t evaluate() const { return 1 ; }
52 
53  ClassDef(RooChangeTracker,1) // Meta object that tracks changes in set of other arguments
54 };
55 
56 #endif
RooChangeTracker::_init
Bool_t _init
Definition: RooChangeTracker.h:49
RooAbsReal.h
RooChangeTracker::_checkVal
Bool_t _checkVal
Definition: RooChangeTracker.h:47
RooArgList
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgList.h:21
RooAbsReal
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:61
RooChangeTracker::_realSet
RooListProxy _realSet
Definition: RooChangeTracker.h:43
bool
RooChangeTracker
RooChangeTracker is a meta object that tracks value changes in a given set of RooAbsArgs by registeri...
Definition: RooChangeTracker.h:26
RooChangeTracker::parameters
RooArgSet parameters() const
Definition: RooChangeTracker.cxx:216
RooChangeTracker::evaluate
Double_t evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Definition: RooChangeTracker.h:51
RooChangeTracker::_catRef
std::vector< Int_t > _catRef
Definition: RooChangeTracker.h:46
RooChangeTracker::~RooChangeTracker
virtual ~RooChangeTracker()
Destructor.
Definition: RooChangeTracker.cxx:207
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooChangeTracker::hasChanged
Bool_t hasChanged(Bool_t clearState)
Returns true if state has changed since last call with clearState=kTRUE.
Definition: RooChangeTracker.cxx:120
RooListProxy
RooListProxy is the concrete proxy for RooArgList objects.
Definition: RooListProxy.h:24
RooChangeTracker::_realRef
std::vector< Double_t > _realRef
Definition: RooChangeTracker.h:45
RooListProxy.h
Double_t
double Double_t
Definition: RtypesCore.h:59
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
RooChangeTracker::clone
virtual TObject * clone(const char *newname) const
Definition: RooChangeTracker.h:34
RooRealVar
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:36
RooChangeTracker::RooChangeTracker
RooChangeTracker()
Default constructor.
Definition: RooChangeTracker.cxx:53
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
RooChangeTracker::_catSet
RooListProxy _catSet
Definition: RooChangeTracker.h:44