RooCachedPdf.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  *                                                                           *
00004  * Copyright (c) 2000-2005, Regents of the University of California          *
00005  *                          and Stanford University. All rights reserved.    *
00006  *                                                                           *
00007  * Redistribution and use in source and binary forms,                        *
00008  * with or without modification, are permitted according to the terms        *
00009  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00010  *****************************************************************************/
00011 
00012 #ifndef ROOCACHEDPDF
00013 #define ROOCACHEDPDF
00014 
00015 #include "RooAbsCachedPdf.h"
00016 #include "RooRealProxy.h"
00017 #include "RooAbsReal.h"
00018 
00019 
00020 class RooCachedPdf : public RooAbsCachedPdf {
00021 public:
00022   RooCachedPdf() {} ;
00023   RooCachedPdf(const char *name, const char *title, RooAbsPdf& _pdf, const RooArgSet& cacheObs);
00024   RooCachedPdf(const char *name, const char *title, RooAbsPdf& _pdf);
00025   RooCachedPdf(const RooCachedPdf& other, const char* name=0) ;
00026   virtual TObject* clone(const char* newname) const { return new RooCachedPdf(*this,newname); }
00027   virtual ~RooCachedPdf() ;
00028 
00029   virtual void preferredObservableScanOrder(const RooArgSet& obs, RooArgSet& orderedObs) const ;
00030 
00031 protected:
00032 
00033   virtual const char* inputBaseName() const { 
00034     // Return the base name for cache objects, in this case the name of the cached p.d.f
00035     return pdf.arg().GetName() ; 
00036   } ;
00037   virtual RooArgSet* actualObservables(const RooArgSet& nset) const ;
00038   virtual RooArgSet* actualParameters(const RooArgSet& nset) const ;
00039   virtual void fillCacheObject(PdfCacheElem& cachePdf) const ;
00040   virtual Double_t evaluate() const { 
00041     // Dummy evaluate, it is never called
00042     return 0 ; 
00043   }
00044 
00045   virtual const char* payloadUniqueSuffix() const { return pdf.arg().aggregateCacheUniqueSuffix() ; }
00046   
00047   RooRealProxy pdf ;       // Proxy to p.d.f being cached
00048   RooSetProxy  _cacheObs ; // Observable to be cached
00049 
00050 private:
00051 
00052   ClassDef(RooCachedPdf,1) // P.d.f class that wraps another p.d.f and caches its output 
00053 
00054 };
00055  
00056 #endif

Generated on Tue Jul 5 14:26:05 2011 for ROOT_528-00b_version by  doxygen 1.5.1