/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 *    File: $Id$
 * 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)             *
 *****************************************************************************/

//////////////////////////////////////////////////////////////////////////////
// 
// BEGIN_HTML
// RooAbsCache is the abstract base class for data members of RooAbsArgs
// that cache other (composite) RooAbsArg expressions. The RooAbsCache
// interface defines the interaction between the owning RooAbsArg object
// and the cache data member to communicate server redirects, operation
// mode changes and constant term optimization management calls.
// END_HTML
//
//


#include "RooFit.h"
#include "RooAbsCache.h"
#include "RooAbsArg.h"
#include "RooArgList.h"

using namespace std;

ClassImp(RooAbsCache) 
   ;


//_____________________________________________________________________________
RooAbsCache::RooAbsCache(RooAbsArg* owner) : _owner(owner) 
{ 
  // Constructor. Takes owner as argument and register cache with owner
  if (_owner) {
    _owner->registerCache(*this) ; 
  }
} 



//_____________________________________________________________________________
RooAbsCache::RooAbsCache(const RooAbsCache&, RooAbsArg* owner ) : _owner(owner) 
{ 
  // Copy constructor. Takes owner as argument and registers cache with owne
  if (_owner) {
    owner->registerCache(*this) ; 
  }
}



//_____________________________________________________________________________
RooAbsCache::~RooAbsCache() 
{ 
  // Destructor. Unregisters cache with owner
  if (_owner) {
    _owner->unRegisterCache(*this) ; 
  }
}



//_____________________________________________________________________________
void RooAbsCache::optimizeCacheMode(const RooArgSet& /*obs*/, RooArgSet&, RooLinkedList& ) 
{
  // Interface for processing of cache mode optimization calls
}



//_____________________________________________________________________________
Bool_t RooAbsCache::redirectServersHook(const RooAbsCollection& /*newServerList*/, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive*/) 
{ 
  // Interface for server redirect calls
  return kFALSE ; 
} 



//_____________________________________________________________________________
void RooAbsCache::operModeHook() 
{
  // Interface for operation mode changes
} 



//_____________________________________________________________________________
void RooAbsCache::findConstantNodes(const RooArgSet&, RooArgSet&, RooLinkedList& ) 
{  
  // Interface for constant term node finding calls
}



//_____________________________________________________________________________
void RooAbsCache::printCompactTreeHook(std::ostream&, const char *)
{
  // Interface for printing of cache guts in tree mode printing
}

 RooAbsCache.cxx:1
 RooAbsCache.cxx:2
 RooAbsCache.cxx:3
 RooAbsCache.cxx:4
 RooAbsCache.cxx:5
 RooAbsCache.cxx:6
 RooAbsCache.cxx:7
 RooAbsCache.cxx:8
 RooAbsCache.cxx:9
 RooAbsCache.cxx:10
 RooAbsCache.cxx:11
 RooAbsCache.cxx:12
 RooAbsCache.cxx:13
 RooAbsCache.cxx:14
 RooAbsCache.cxx:15
 RooAbsCache.cxx:16
 RooAbsCache.cxx:17
 RooAbsCache.cxx:18
 RooAbsCache.cxx:19
 RooAbsCache.cxx:20
 RooAbsCache.cxx:21
 RooAbsCache.cxx:22
 RooAbsCache.cxx:23
 RooAbsCache.cxx:24
 RooAbsCache.cxx:25
 RooAbsCache.cxx:26
 RooAbsCache.cxx:27
 RooAbsCache.cxx:28
 RooAbsCache.cxx:29
 RooAbsCache.cxx:30
 RooAbsCache.cxx:31
 RooAbsCache.cxx:32
 RooAbsCache.cxx:33
 RooAbsCache.cxx:34
 RooAbsCache.cxx:35
 RooAbsCache.cxx:36
 RooAbsCache.cxx:37
 RooAbsCache.cxx:38
 RooAbsCache.cxx:39
 RooAbsCache.cxx:40
 RooAbsCache.cxx:41
 RooAbsCache.cxx:42
 RooAbsCache.cxx:43
 RooAbsCache.cxx:44
 RooAbsCache.cxx:45
 RooAbsCache.cxx:46
 RooAbsCache.cxx:47
 RooAbsCache.cxx:48
 RooAbsCache.cxx:49
 RooAbsCache.cxx:50
 RooAbsCache.cxx:51
 RooAbsCache.cxx:52
 RooAbsCache.cxx:53
 RooAbsCache.cxx:54
 RooAbsCache.cxx:55
 RooAbsCache.cxx:56
 RooAbsCache.cxx:57
 RooAbsCache.cxx:58
 RooAbsCache.cxx:59
 RooAbsCache.cxx:60
 RooAbsCache.cxx:61
 RooAbsCache.cxx:62
 RooAbsCache.cxx:63
 RooAbsCache.cxx:64
 RooAbsCache.cxx:65
 RooAbsCache.cxx:66
 RooAbsCache.cxx:67
 RooAbsCache.cxx:68
 RooAbsCache.cxx:69
 RooAbsCache.cxx:70
 RooAbsCache.cxx:71
 RooAbsCache.cxx:72
 RooAbsCache.cxx:73
 RooAbsCache.cxx:74
 RooAbsCache.cxx:75
 RooAbsCache.cxx:76
 RooAbsCache.cxx:77
 RooAbsCache.cxx:78
 RooAbsCache.cxx:79
 RooAbsCache.cxx:80
 RooAbsCache.cxx:81
 RooAbsCache.cxx:82
 RooAbsCache.cxx:83
 RooAbsCache.cxx:84
 RooAbsCache.cxx:85
 RooAbsCache.cxx:86
 RooAbsCache.cxx:87
 RooAbsCache.cxx:88
 RooAbsCache.cxx:89
 RooAbsCache.cxx:90
 RooAbsCache.cxx:91
 RooAbsCache.cxx:92
 RooAbsCache.cxx:93
 RooAbsCache.cxx:94
 RooAbsCache.cxx:95
 RooAbsCache.cxx:96
 RooAbsCache.cxx:97
 RooAbsCache.cxx:98
 RooAbsCache.cxx:99
 RooAbsCache.cxx:100
 RooAbsCache.cxx:101
 RooAbsCache.cxx:102
 RooAbsCache.cxx:103
 RooAbsCache.cxx:104
 RooAbsCache.cxx:105
 RooAbsCache.cxx:106
 RooAbsCache.cxx:107
 RooAbsCache.cxx:108
 RooAbsCache.cxx:109
 RooAbsCache.cxx:110
 RooAbsCache.cxx:111
 RooAbsCache.cxx:112