RooAbsCacheElement.cxx

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooAbsCacheElement.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 // RooAbsCacheElement is the abstract base class for objects to be stored
00021 // in RooAbsCache cache manager objects. Each storage element has an 
00022 // interface to pass on calls for server redirection, operation mode
00023 // change calls and constant term optimization management calls
00024 // END_HTML
00025 //
00026 //
00027 //
00028 
00029 
00030 #include "RooFit.h"
00031 #include "RooAbsCacheElement.h"
00032 #include "RooAbsArg.h"
00033 #include "RooArgList.h"
00034 
00035 ClassImp(RooAbsCacheElement) 
00036    ;
00037 
00038 
00039 //_____________________________________________________________________________
00040 Bool_t RooAbsCacheElement::redirectServersHook(const RooAbsCollection& /*newServerList*/, Bool_t /*mustReplaceAll*/, 
00041                                                Bool_t /*nameChange*/, Bool_t /*isRecursive*/) 
00042 { 
00043   // Interface for server redirect calls
00044   return kFALSE ; 
00045 } 
00046 
00047 
00048 
00049 //_____________________________________________________________________________
00050 void RooAbsCacheElement::printCompactTreeHook(std::ostream&, const char *, Int_t , Int_t )
00051 {
00052   // Hook function to print cache guts in tree printing mode of RooAbsArgs
00053 }
00054 
00055 
00056 
00057 //_____________________________________________________________________________
00058 void RooAbsCacheElement::operModeHook(RooAbsArg::OperMode) 
00059 {
00060   // Interface for operation mode change calls
00061 } 
00062 
00063 
00064 
00065 //_____________________________________________________________________________
00066 void RooAbsCacheElement::optimizeCacheMode(const RooArgSet& obs, RooArgSet& optNodes, RooLinkedList& processedNodes) 
00067 {
00068   // Interface for cache optimization calls. The default implementation is to forward all these
00069   // calls to all contained RooAbsArg objects as publicized through containedArg()
00070   
00071   RooArgList list = containedArgs(OptimizeCaching) ;
00072   TIterator* iter = list.createIterator() ;
00073   RooAbsArg* arg ;
00074   while((arg=(RooAbsArg*)iter->Next())) {    
00075     arg->optimizeCacheMode(obs, optNodes, processedNodes) ;
00076   }
00077   delete iter ;
00078 }
00079 
00080 
00081 
00082 //_____________________________________________________________________________
00083 void RooAbsCacheElement::findConstantNodes(const RooArgSet& obs, RooArgSet& cacheList, RooLinkedList& processedNodes) 
00084 {
00085   // Interface for constant term optimization calls. The default implementation is to forward all these
00086   // calls to all contained RooAbsArg objects as publicized through containedArg()
00087 
00088   RooArgList list = containedArgs(FindConstantNodes) ;
00089   TIterator* iter = list.createIterator() ;
00090   RooAbsArg* arg ;
00091   while((arg=(RooAbsArg*)iter->Next())) {    
00092     arg->findConstantNodes(obs,cacheList, processedNodes) ;
00093   }
00094   delete iter ;
00095 }

Generated on Tue Jul 5 15:05:19 2011 for ROOT_528-00b_version by  doxygen 1.5.1