Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooCachedPdf.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  *                                                                           *
0004  * Copyright (c) 2000-2005, Regents of the University of California          *
0005  *                          and Stanford University. All rights reserved.    *
0006  *                                                                           *
0007  * Redistribution and use in source and binary forms,                        *
0008  * with or without modification, are permitted according to the terms        *
0009  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0010  *****************************************************************************/
0011 
0012 #ifndef ROOCACHEDPDF
0013 #define ROOCACHEDPDF
0014 
0015 #include "RooAbsCachedPdf.h"
0016 #include "RooRealProxy.h"
0017 #include "RooAbsReal.h"
0018 
0019 
0020 class RooCachedPdf : public RooAbsCachedPdf {
0021 public:
0022   RooCachedPdf() {} ;
0023   RooCachedPdf(const char *name, const char *title, RooAbsPdf& _pdf, const RooArgSet& cacheObs);
0024   RooCachedPdf(const char *name, const char *title, RooAbsPdf& _pdf);
0025   RooCachedPdf(const RooCachedPdf& other, const char* name=nullptr) ;
0026   TObject* clone(const char* newname) const override { return new RooCachedPdf(*this,newname); }
0027 
0028   void preferredObservableScanOrder(const RooArgSet& obs, RooArgSet& orderedObs) const override ;
0029 
0030 protected:
0031 
0032   /// Return the base name for cache objects, in this case the name of the cached p.d.f
0033   const char* inputBaseName() const override {
0034     return pdf.arg().GetName() ;
0035   } ;
0036   RooFit::OwningPtr<RooArgSet> actualObservables(const RooArgSet& nset) const override;
0037   RooFit::OwningPtr<RooArgSet> actualParameters(const RooArgSet& nset) const override ;
0038   void fillCacheObject(PdfCacheElem& cachePdf) const override ;
0039   double evaluate() const override {
0040     // Dummy evaluate, it is never called
0041     return 0 ;
0042   }
0043 
0044   const char* payloadUniqueSuffix() const override { return pdf.arg().aggregateCacheUniqueSuffix() ; }
0045 
0046   RooRealProxy pdf ;       ///< Proxy to p.d.f being cached
0047   RooSetProxy  _cacheObs ; ///< Observable to be cached
0048 
0049 private:
0050 
0051   ClassDefOverride(RooCachedPdf,1) // P.d.f class that wraps another p.d.f and caches its output
0052 
0053 };
0054 
0055 #endif