Logo ROOT   6.14/05
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 
22 RooAbsCache is the abstract base class for data members of RooAbsArgs
23 that cache other (composite) RooAbsArg expressions. The RooAbsCache
24 interface defines the interaction between the owning RooAbsArg object
25 and the cache data member to communicate server redirects, operation
26 mode 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 
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 
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:44
bool Bool_t
Definition: RtypesCore.h:59
STL namespace.
RooAbsCache is the abstract base class for data members of RooAbsArgs that cache other (composite) Ro...
Definition: RooAbsCache.h:27
void registerCache(RooAbsCache &cache)
Register RooAbsCache with this object.
Definition: RooAbsArg.cxx:2036
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:2045
virtual ~RooAbsCache()
Destructor. Unregisters cache with owner.
Definition: RooAbsCache.cxx:68
const Bool_t kFALSE
Definition: RtypesCore.h:88
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
Definition: RooLinkedList.h:35
#define ClassImp(name)
Definition: Rtypes.h:359
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects...
virtual void optimizeCacheMode(const RooArgSet &, RooArgSet &, RooLinkedList &)
Interface for processing of cache mode optimization calls.
Definition: RooAbsCache.cxx:80
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Definition: RooAbsArg.h:66