RooChangeTracker.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooChangeTracker.h 25184 2008-08-20 13:59:55Z wouter $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 #ifndef ROO_CHANGE_TRACKER
00017 #define ROO_CHANGE_TRACKER
00018 
00019 #include "RooAbsReal.h"
00020 #include "RooListProxy.h"
00021 #include <vector>
00022 
00023 class RooRealVar;
00024 class RooArgList ;
00025 
00026 class RooChangeTracker : public RooAbsReal {
00027 public:
00028 
00029   RooChangeTracker() ;
00030   RooChangeTracker(const char *name, const char *title, const RooArgSet& trackSet, Bool_t checkValues=kFALSE) ;
00031   virtual ~RooChangeTracker() ;
00032 
00033   RooChangeTracker(const RooChangeTracker& other, const char* name = 0);
00034   virtual TObject* clone(const char* newname) const { return new RooChangeTracker(*this, newname); }
00035 
00036   Bool_t hasChanged(Bool_t clearState) ;
00037 
00038   RooArgSet parameters() const ;
00039 
00040 
00041 protected:
00042 
00043   RooListProxy     _realSet ;        // List of reals to track 
00044   RooListProxy     _catSet ;         // List of categories to check
00045   std::vector<Double_t> _realRef ;   // Reference values for reals
00046   std::vector<Int_t>    _catRef ;    // Reference valyes for categories
00047   Bool_t       _checkVal ;           // Check contents as well if true
00048 
00049   mutable TIterator* _realSetIter ;     //! do not persist
00050   mutable TIterator* _catSetIter ;     //! do not persist
00051 
00052   Double_t evaluate() const { return 1 ; }
00053 
00054   ClassDef(RooChangeTracker,1) // Meta object that tracks changes in set of other arguments
00055 };
00056 
00057 #endif

Generated on Tue Jul 5 14:26:06 2011 for ROOT_528-00b_version by  doxygen 1.5.1