00001 /***************************************************************************** 00002 * Project: RooFit * 00003 * Package: RooFitCore * 00004 * File: $Id: RooAbsCache.cxx 24247 2008-06-12 14:54:32Z 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 00017 ////////////////////////////////////////////////////////////////////////////// 00018 // 00019 // BEGIN_HTML 00020 // RooAbsCache is the abstract base class for data members of RooAbsArgs 00021 // that cache other (composite) RooAbsArg expressions. The RooAbsCache 00022 // interface defines the interaction between the owning RooAbsArg object 00023 // and the cache data member to communicate server redirects, operation 00024 // mode changes and constant term optimization management calls. 00025 // END_HTML 00026 // 00027 // 00028 00029 00030 #include "RooFit.h" 00031 #include "RooAbsCache.h" 00032 #include "RooAbsArg.h" 00033 #include "RooArgList.h" 00034 00035 ClassImp(RooAbsCache) 00036 ; 00037 00038 00039 //_____________________________________________________________________________ 00040 RooAbsCache::RooAbsCache(RooAbsArg* owner) : _owner(owner) 00041 { 00042 // Constructor. Takes owner as argument and register cache with owner 00043 if (_owner) { 00044 _owner->registerCache(*this) ; 00045 } 00046 } 00047 00048 00049 00050 //_____________________________________________________________________________ 00051 RooAbsCache::RooAbsCache(const RooAbsCache&, RooAbsArg* owner ) : _owner(owner) 00052 { 00053 // Copy constructor. Takes owner as argument and registers cache with owne 00054 if (_owner) { 00055 owner->registerCache(*this) ; 00056 } 00057 } 00058 00059 00060 00061 //_____________________________________________________________________________ 00062 RooAbsCache::~RooAbsCache() 00063 { 00064 // Destructor. Unregisters cache with owner 00065 if (_owner) { 00066 _owner->unRegisterCache(*this) ; 00067 } 00068 } 00069 00070 00071 00072 //_____________________________________________________________________________ 00073 void RooAbsCache::optimizeCacheMode(const RooArgSet& /*obs*/, RooArgSet&, RooLinkedList& ) 00074 { 00075 // Interface for processing of cache mode optimization calls 00076 } 00077 00078 00079 00080 //_____________________________________________________________________________ 00081 Bool_t RooAbsCache::redirectServersHook(const RooAbsCollection& /*newServerList*/, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive*/) 00082 { 00083 // Interface for server redirect calls 00084 return kFALSE ; 00085 } 00086 00087 00088 00089 //_____________________________________________________________________________ 00090 void RooAbsCache::operModeHook() 00091 { 00092 // Interface for operation mode changes 00093 } 00094 00095 00096 00097 //_____________________________________________________________________________ 00098 void RooAbsCache::findConstantNodes(const RooArgSet&, RooArgSet&, RooLinkedList& ) 00099 { 00100 // Interface for constant term node finding calls 00101 } 00102 00103 00104 00105 //_____________________________________________________________________________ 00106 void RooAbsCache::printCompactTreeHook(std::ostream&, const char *) 00107 { 00108 // Interface for printing of cache guts in tree mode printing 00109 } 00110