Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooObjCacheManager.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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_OBJ_CACHE_MANAGER
0017 #define ROO_OBJ_CACHE_MANAGER
0018 
0019 #include "Rtypes.h"
0020 
0021 #include "RooAbsReal.h"
0022 #include "RooArgSet.h"
0023 #include "RooArgList.h"
0024 #include "RooAbsCache.h"
0025 #include "RooAbsCacheElement.h"
0026 #include "RooCacheManager.h"
0027 
0028 
0029 class RooObjCacheManager : public RooCacheManager<RooAbsCacheElement> {
0030 
0031 public:
0032 
0033   RooObjCacheManager(RooAbsArg* owner=nullptr, Int_t maxSize=2, bool clearCacheOnServerRedirect=true, bool allowOptimize=false) ;
0034   RooObjCacheManager(const RooObjCacheManager& other, RooAbsArg* owner=nullptr) ;
0035   ~RooObjCacheManager() override ;
0036 
0037   bool redirectServersHook(const RooAbsCollection& /*newServerList*/, bool /*mustReplaceAll*/, bool /*nameChange*/, bool /*isRecursive*/) override ;
0038   void operModeHook() override ;
0039   void optimizeCacheMode(const RooArgSet& /*obs*/, RooArgSet& /*optSet*/, RooLinkedList& /*processedNodes*/) override ;
0040   void printCompactTreeHook(std::ostream&, const char *) override ;
0041   void findConstantNodes(const RooArgSet& /*obs*/, RooArgSet& /*cacheList*/, RooLinkedList& /*processedNodes*/) override ;
0042 
0043   void insertObjectHook(RooAbsCacheElement&) override ;
0044 
0045   void sterilize() override ;
0046 
0047   static void doClearObsList(bool flag) { _clearObsList = flag ; }
0048   static bool clearObsList() { return _clearObsList ; }
0049 
0050   void setClearOnRedirect(bool flag) { _clearOnRedirect = flag ; }
0051 
0052 protected:
0053 
0054   bool _clearOnRedirect ;
0055   bool _allowOptimize ;
0056   bool _optCacheModeSeen  ;              ///<!
0057 
0058   RooArgSet* _optCacheObservables = nullptr; ///<! current optCacheObservables
0059 
0060   static bool _clearObsList ; ///< Clear obslist on sterilize?
0061 
0062   ClassDefOverride(RooObjCacheManager,3) ///< Cache manager for generic caches that contain RooAbsArg objects
0063 } ;
0064 
0065 
0066 
0067 #endif