ROOT  6.06/09
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 //
19 // BEGIN_HTML
20 // RooAbsCache is the abstract base class for data members of RooAbsArgs
21 // that cache other (composite) RooAbsArg expressions. The RooAbsCache
22 // interface defines the interaction between the owning RooAbsArg object
23 // and the cache data member to communicate server redirects, operation
24 // mode changes and constant term optimization management calls.
25 // END_HTML
26 //
27 //
28 
29 
30 #include "RooFit.h"
31 #include "RooAbsCache.h"
32 #include "RooAbsArg.h"
33 #include "RooArgList.h"
34 
35 using namespace std;
36 
38  ;
39 
40 
41 ////////////////////////////////////////////////////////////////////////////////
42 /// Constructor. Takes owner as argument and register cache with owner
43 
44 RooAbsCache::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 
56 RooAbsCache::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 
89 Bool_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 
117 void RooAbsCache::printCompactTreeHook(std::ostream&, const char *)
118 {
119 }
120 
virtual void findConstantNodes(const RooArgSet &, RooArgSet &, RooLinkedList &)
Interface for constant term node finding calls.
virtual void operModeHook()
Interface for operation mode changes.
Definition: RooAbsCache.cxx:99
RooAbsArg * _owner
Definition: RooAbsCache.h:45
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
STL namespace.
void registerCache(RooAbsCache &cache)
Register RooAbsCache with this object.
Definition: RooAbsArg.cxx:2044
virtual Bool_t redirectServersHook(const RooAbsCollection &, Bool_t, Bool_t, Bool_t)
Interface for server redirect calls.
Definition: RooAbsCache.cxx:89
RooAbsCache(RooAbsArg *owner=0)
Constructor. Takes owner as argument and register cache with owner.
Definition: RooAbsCache.cxx:44
virtual void printCompactTreeHook(std::ostream &, const char *)
Interface for printing of cache guts in tree mode printing.
void unRegisterCache(RooAbsCache &cache)
Unregister a RooAbsCache. Called from the RooAbsCache destructor.
Definition: RooAbsArg.cxx:2053
virtual ~RooAbsCache()
Destructor. Unregisters cache with owner.
Definition: RooAbsCache.cxx:68
virtual void optimizeCacheMode(const RooArgSet &, RooArgSet &, RooLinkedList &)
Interface for processing of cache mode optimization calls.
Definition: RooAbsCache.cxx:80
ClassImp(RooAbsCache)
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:66