Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooAbsCacheElement.cxx
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id$
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16
17/**
18\file RooAbsCacheElement.cxx
19\class RooAbsCacheElement
20\ingroup Roofitcore
21
22Abstract base class for objects to be stored
23in RooAbsCache cache manager objects. Each storage element has an
24interface to pass on calls for server redirection, operation mode
25change calls and constant term optimization management calls
26**/
27
28#include "RooAbsCacheElement.h"
29#include "RooAbsArg.h"
30#include "RooArgList.h"
31
33
34
35////////////////////////////////////////////////////////////////////////////////
36/// Interface for server redirect calls
37
38bool RooAbsCacheElement::redirectServersHook(const RooAbsCollection& /*newServerList*/, bool /*mustReplaceAll*/,
39 bool /*nameChange*/, bool /*isRecursive*/)
40{
41 return false ;
42}
43
44
45
46////////////////////////////////////////////////////////////////////////////////
47/// Hook function to print cache guts in tree printing mode of RooAbsArgs
48
49void RooAbsCacheElement::printCompactTreeHook(std::ostream&, const char *, Int_t , Int_t )
50{
51}
52
53
54
55////////////////////////////////////////////////////////////////////////////////
56/// Interface for cache optimization calls. The default implementation is to forward all these
57/// calls to all contained RooAbsArg objects as publicized through containedArg()
58
59void RooAbsCacheElement::optimizeCacheMode(const RooArgSet& obs, RooArgSet& optNodes, RooLinkedList& processedNodes)
60{
62 arg->optimizeCacheMode(obs, optNodes, processedNodes) ;
63 }
64}
65
66
67
68////////////////////////////////////////////////////////////////////////////////
69/// Interface for constant term optimization calls. The default implementation is to forward all these
70/// calls to all contained RooAbsArg objects as publicized through containedArg()
71
72void RooAbsCacheElement::findConstantNodes(const RooArgSet& obs, RooArgSet& cacheList, RooLinkedList& processedNodes)
73{
75 for (const auto arg : list) {
76 arg->findConstantNodes(obs, cacheList, processedNodes);
77 }
78}
#define ClassImp(name)
Definition Rtypes.h:377
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Definition RooAbsArg.h:77
Abstract base class for objects to be stored in RooAbsCache cache manager objects.
virtual void optimizeCacheMode(const RooArgSet &obs, RooArgSet &optNodes, RooLinkedList &processedNodes)
Interface for cache optimization calls.
virtual RooArgList containedArgs(Action)=0
virtual bool redirectServersHook(const RooAbsCollection &, bool, bool, bool)
Interface for server redirect calls.
virtual void printCompactTreeHook(std::ostream &, const char *, Int_t curElem, Int_t totElem)
Hook function to print cache guts in tree printing mode of RooAbsArgs.
virtual void findConstantNodes(const RooArgSet &obs, RooArgSet &cacheList, RooLinkedList &processedNodes)
Interface for constant term optimization calls.
Abstract container object that can hold multiple RooAbsArg objects.
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
Collection class for internal use, storing a collection of RooAbsArg pointers in a doubly linked list...