ROOT logo
/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 *    File: $Id: RooAbsCacheElement.h 24247 2008-06-12 14:54:32Z wouter $
 * Authors:                                                                  *
 *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
 *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
 *                                                                           *
 * Copyright (c) 2000-2005, Regents of the University of California          *
 *                          and Stanford University. All rights reserved.    *
 *                                                                           *
 * Redistribution and use in source and binary forms,                        *
 * with or without modification, are permitted according to the terms        *
 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
 *****************************************************************************/
#ifndef ROO_ABS_CACHE_ELEMENT
#define ROO_ABS_CACHE_ELEMENT

#include "Rtypes.h"
#include "RooAbsArg.h"

class RooAbsCollection ;
class RooArgSet ;
class RooArgList ;

class RooAbsCacheElement {

public:
  RooAbsCacheElement() : _owner(0) {
    // Default constructor
  } ;
  virtual Bool_t redirectServersHook(const RooAbsCollection& /*newServerList*/, Bool_t /*mustReplaceAll*/, 
				     Bool_t /*nameChange*/, Bool_t /*isRecursive*/)  ;
  virtual void printCompactTreeHook(std::ostream&, const char *, Int_t curElem, Int_t totElem) ;
  virtual ~RooAbsCacheElement() {
    // Destructor
  } ;

  enum Action { OperModeChange,OptimizeCaching,FindConstantNodes } ;
  virtual RooArgList containedArgs(Action) = 0 ;
  virtual void operModeHook(RooAbsArg::OperMode) ;
  virtual void optimizeCacheMode(const RooArgSet& obs, RooArgSet& optNodes, RooLinkedList& processedNodes)  ;
  virtual void findConstantNodes(const RooArgSet& obs, RooArgSet& cacheList, RooLinkedList& processedNodes) ;

  void setOwner(RooAbsArg* owner) { 
    // Store pointer to owner
    _owner = owner ; 
  }
  
protected:

  RooAbsArg* _owner ; //! Pointer to owning RooAbsArg

  ClassDef(RooAbsCacheElement,1) // Base class for cache elements

} ;


#endif 
 RooAbsCacheElement.h:1
 RooAbsCacheElement.h:2
 RooAbsCacheElement.h:3
 RooAbsCacheElement.h:4
 RooAbsCacheElement.h:5
 RooAbsCacheElement.h:6
 RooAbsCacheElement.h:7
 RooAbsCacheElement.h:8
 RooAbsCacheElement.h:9
 RooAbsCacheElement.h:10
 RooAbsCacheElement.h:11
 RooAbsCacheElement.h:12
 RooAbsCacheElement.h:13
 RooAbsCacheElement.h:14
 RooAbsCacheElement.h:15
 RooAbsCacheElement.h:16
 RooAbsCacheElement.h:17
 RooAbsCacheElement.h:18
 RooAbsCacheElement.h:19
 RooAbsCacheElement.h:20
 RooAbsCacheElement.h:21
 RooAbsCacheElement.h:22
 RooAbsCacheElement.h:23
 RooAbsCacheElement.h:24
 RooAbsCacheElement.h:25
 RooAbsCacheElement.h:26
 RooAbsCacheElement.h:27
 RooAbsCacheElement.h:28
 RooAbsCacheElement.h:29
 RooAbsCacheElement.h:30
 RooAbsCacheElement.h:31
 RooAbsCacheElement.h:32
 RooAbsCacheElement.h:33
 RooAbsCacheElement.h:34
 RooAbsCacheElement.h:35
 RooAbsCacheElement.h:36
 RooAbsCacheElement.h:37
 RooAbsCacheElement.h:38
 RooAbsCacheElement.h:39
 RooAbsCacheElement.h:40
 RooAbsCacheElement.h:41
 RooAbsCacheElement.h:42
 RooAbsCacheElement.h:43
 RooAbsCacheElement.h:44
 RooAbsCacheElement.h:45
 RooAbsCacheElement.h:46
 RooAbsCacheElement.h:47
 RooAbsCacheElement.h:48
 RooAbsCacheElement.h:49
 RooAbsCacheElement.h:50
 RooAbsCacheElement.h:51
 RooAbsCacheElement.h:52
 RooAbsCacheElement.h:53
 RooAbsCacheElement.h:54
 RooAbsCacheElement.h:55
 RooAbsCacheElement.h:56
 RooAbsCacheElement.h:57
 RooAbsCacheElement.h:58
 RooAbsCacheElement.h:59