CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/HiggsAnalysis/CombinedLimit/interface/SimpleCacheSentry.h

Go to the documentation of this file.
00001 #ifndef ROO_SIMPLE_CACHE_SENTRY
00002 #define ROO_SIMPLE_CACHE_SENTRY
00003 
00004 #include "RooRealVar.h"
00005 #include "RooSetProxy.h"
00006 #include "TIterator.h"
00007 
00008 class SimpleCacheSentry : public RooAbsArg {
00009     public:
00010         SimpleCacheSentry() ;
00011         SimpleCacheSentry(const RooRealVar &var) ;
00012         SimpleCacheSentry(const RooAbsCollection &vars) ;
00013         SimpleCacheSentry(const RooAbsArg &func, const RooArgSet *obs=0) ;
00014         SimpleCacheSentry(const SimpleCacheSentry &other, const char *newname = 0) ;
00015         RooSetProxy & deps() { return _deps; }
00016         const RooArgSet & deps() const { return _deps; }
00017         void addVar(const RooRealVar &var) { _deps.add(var); } 
00018         void addVars(const RooAbsCollection &vars) ; 
00019         void addFunc(const RooAbsArg &func, const RooArgSet *obs=0) ;
00020         bool good() const { return !isValueDirty(); } 
00021         bool empty() const { return _deps.getSize() == 0; }
00022         void reset() { clearValueDirty(); } 
00023         // base class methods to be implemented
00024         virtual TObject* clone(const char* newname) const { return new SimpleCacheSentry(*this, newname); }
00025         virtual RooAbsArg *createFundamental(const char* newname=0) const { return 0; }
00026         virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose=kFALSE) { return false; }
00027         virtual void writeToStream(ostream& os, Bool_t compact) const { }
00028         virtual Bool_t operator==(const RooAbsArg& other) { return this == &other; }
00029         virtual void syncCache(const RooArgSet* nset=0) {}
00030         virtual void copyCache(const RooAbsArg* source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE) {}
00031         virtual void attachToTree(TTree& t, Int_t bufSize=32000) {}
00032         virtual void attachToVStore(RooVectorDataStore& vstore) {}
00033         virtual void setTreeBranchStatus(TTree& t, Bool_t active) {}
00034         virtual void fillTreeBranch(TTree& t) {}
00035     private:
00036         RooSetProxy _deps;
00037         ClassDef(SimpleCacheSentry,1) 
00038 };
00039 
00040 #endif