Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
37 ClassImp(RooAbsCache);
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 
68 RooAbsCache::~RooAbsCache()
69 {
70  if (_owner) {
71  _owner->unRegisterCache(*this) ;
72  }
73 }
74 
75 
76 
77 ////////////////////////////////////////////////////////////////////////////////
78 /// Interface for processing of cache mode optimization calls
79 
80 void RooAbsCache::optimizeCacheMode(const RooArgSet& /*obs*/, RooArgSet&, RooLinkedList& )
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 
99 void RooAbsCache::operModeHook()
100 {
101 }
102 
103 
104 
105 ////////////////////////////////////////////////////////////////////////////////
106 /// Interface for constant term node finding calls
107 
108 void RooAbsCache::findConstantNodes(const RooArgSet&, RooArgSet&, RooLinkedList& )
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