Logo ROOT  
Reference Guide
RooAbsCache.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 RooAbsCache.cxx
19\class RooAbsCache
20\ingroup Roofitcore
21
22RooAbsCache is the abstract base class for data members of RooAbsArgs
23that cache other (composite) RooAbsArg expressions. The RooAbsCache
24interface defines the interaction between the owning RooAbsArg object
25and the cache data member to communicate server redirects, operation
26mode changes and constant term optimization management calls.
27**/
28
29
30#include "RooFit.h"
31#include "RooAbsCache.h"
32#include "RooAbsArg.h"
33#include "RooArgList.h"
34
35using namespace std;
36
38 ;
39
40
41////////////////////////////////////////////////////////////////////////////////
42/// Constructor. Takes owner as argument and register cache with owner
43
44RooAbsCache::RooAbsCache(RooAbsArg* owner) : _owner(owner)
45{
46 if (_owner) {
47 _owner->registerCache(*this) ;
48 }
49}
50
51
52
53////////////////////////////////////////////////////////////////////////////////
54/// Copy constructor. Takes owner as argument and registers cache with owne
55
56RooAbsCache::RooAbsCache(const RooAbsCache&, RooAbsArg* owner ) : _owner(owner)
57{
58 if (_owner) {
59 owner->registerCache(*this) ;
60 }
61}
62
63
64
65////////////////////////////////////////////////////////////////////////////////
66/// Destructor. Unregisters cache with owner
67
69{
70 if (_owner) {
71 _owner->unRegisterCache(*this) ;
72 }
73}
74
75
76
77////////////////////////////////////////////////////////////////////////////////
78/// Interface for processing of cache mode optimization calls
79
81{
82}
83
84
85
86////////////////////////////////////////////////////////////////////////////////
87/// Interface for server redirect calls
88
89Bool_t RooAbsCache::redirectServersHook(const RooAbsCollection& /*newServerList*/, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive*/)
90{
91 return kFALSE ;
92}
93
94
95
96////////////////////////////////////////////////////////////////////////////////
97/// Interface for operation mode changes
98
100{
101}
102
103
104
105////////////////////////////////////////////////////////////////////////////////
106/// Interface for constant term node finding calls
107
109{
110}
111
112
113
114////////////////////////////////////////////////////////////////////////////////
115/// Interface for printing of cache guts in tree mode printing
116
117void RooAbsCache::printCompactTreeHook(std::ostream&, const char *)
118{
119}
120
const Bool_t kFALSE
Definition: RtypesCore.h:90
#define ClassImp(name)
Definition: Rtypes.h:361
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:73
void unRegisterCache(RooAbsCache &cache)
Unregister a RooAbsCache. Called from the RooAbsCache destructor.
Definition: RooAbsArg.cxx:1881
void registerCache(RooAbsCache &cache)
Register RooAbsCache with this object.
Definition: RooAbsArg.cxx:1872
RooAbsCache is the abstract base class for data members of RooAbsArgs that cache other (composite) Ro...
Definition: RooAbsCache.h:27
virtual void printCompactTreeHook(std::ostream &, const char *)
Interface for printing of cache guts in tree mode printing.
virtual Bool_t redirectServersHook(const RooAbsCollection &, Bool_t, Bool_t, Bool_t)
Interface for server redirect calls.
Definition: RooAbsCache.cxx:89
virtual void optimizeCacheMode(const RooArgSet &, RooArgSet &, RooLinkedList &)
Interface for processing of cache mode optimization calls.
Definition: RooAbsCache.cxx:80
virtual void operModeHook()
Interface for operation mode changes.
Definition: RooAbsCache.cxx:99
virtual void findConstantNodes(const RooArgSet &, RooArgSet &, RooLinkedList &)
Interface for constant term node finding calls.
RooAbsCache(RooAbsArg *owner=0)
Constructor. Takes owner as argument and register cache with owner.
Definition: RooAbsCache.cxx:44
RooAbsArg * _owner
Definition: RooAbsCache.h:44
virtual ~RooAbsCache()
Destructor. Unregisters cache with owner.
Definition: RooAbsCache.cxx:68
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:35