Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:20

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitCore                                                       *
0004  *    File: $Id$
0005  * Authors:                                                                  *
0006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
0007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
0008  *                                                                           *
0009  * Copyright (c) 2000-2005, Regents of the University of California          *
0010  *                          and Stanford University. All rights reserved.    *
0011  *                                                                           *
0012  * Redistribution and use in source and binary forms,                        *
0013  * with or without modification, are permitted according to the terms        *
0014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0015  *****************************************************************************/
0016 #ifndef ROO_CHANGE_TRACKER
0017 #define ROO_CHANGE_TRACKER
0018 
0019 #include "RooAbsReal.h"
0020 #include "RooListProxy.h"
0021 #include <vector>
0022 
0023 class RooChangeTracker : public RooAbsReal {
0024 public:
0025 
0026   RooChangeTracker() = default;
0027   RooChangeTracker(const char *name, const char *title, const RooArgSet& trackSet, bool checkValues=false) ;
0028 
0029   RooChangeTracker(const RooChangeTracker& other, const char* name = nullptr);
0030   TObject* clone(const char* newname) const override { return new RooChangeTracker(*this, newname); }
0031 
0032   bool hasChanged(bool clearState) ;
0033 
0034   RooArgSet parameters() const ;
0035 
0036 
0037 protected:
0038 
0039   RooListProxy     _realSet ;        ///< List of reals to track
0040   RooListProxy     _catSet ;         ///< List of categories to check
0041   std::vector<double> _realRef ;   ///< Reference values for reals
0042   std::vector<Int_t>    _catRef ;    ///< Reference values for categories
0043   bool       _checkVal = false;           ///< Check contents as well if true
0044 
0045   bool        _init = false; //!
0046 
0047   double evaluate() const override { return 1 ; }
0048 
0049   ClassDefOverride(RooChangeTracker,1) // Meta object that tracks changes in set of other arguments
0050 };
0051 
0052 #endif