CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SimpleCacheSentry Class Reference

#include <SimpleCacheSentry.h>

Inheritance diagram for SimpleCacheSentry:

Public Member Functions

void addFunc (const RooAbsArg &func, const RooArgSet *obs=0)
 
void addVar (const RooRealVar &var)
 
void addVars (const RooAbsCollection &vars)
 
virtual void attachToTree (TTree &t, Int_t bufSize=32000)
 
virtual void attachToVStore (RooVectorDataStore &vstore)
 
virtual TObject * clone (const char *newname) const
 
virtual void copyCache (const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)
 
virtual RooAbsArg * createFundamental (const char *newname=0) const
 
RooSetProxy & deps ()
 
const RooArgSet & deps () const
 
bool empty () const
 
virtual void fillTreeBranch (TTree &t)
 
bool good () const
 
virtual Bool_t operator== (const RooAbsArg &other)
 
virtual Bool_t readFromStream (istream &is, Bool_t compact, Bool_t verbose=kFALSE)
 
void reset ()
 
virtual void setTreeBranchStatus (TTree &t, Bool_t active)
 
 SimpleCacheSentry ()
 
 SimpleCacheSentry (const RooRealVar &var)
 
 SimpleCacheSentry (const RooAbsCollection &vars)
 
 SimpleCacheSentry (const RooAbsArg &func, const RooArgSet *obs=0)
 
 SimpleCacheSentry (const SimpleCacheSentry &other, const char *newname=0)
 
virtual void syncCache (const RooArgSet *nset=0)
 
virtual void writeToStream (ostream &os, Bool_t compact) const
 

Private Attributes

RooSetProxy _deps
 

Detailed Description

Definition at line 8 of file SimpleCacheSentry.h.

Constructor & Destructor Documentation

SimpleCacheSentry::SimpleCacheSentry ( )

Definition at line 3 of file SimpleCacheSentry.cc.

Referenced by clone().

3 : _deps("deps","deps",this) {}
SimpleCacheSentry::SimpleCacheSentry ( const RooRealVar &  var)

Definition at line 5 of file SimpleCacheSentry.cc.

References addVar().

5  :
6  _deps("deps","deps",this)
7 {
8  addVar(var);
9 }
void addVar(const RooRealVar &var)
SimpleCacheSentry::SimpleCacheSentry ( const RooAbsCollection &  vars)

Definition at line 11 of file SimpleCacheSentry.cc.

References addVars().

11  :
12  _deps("deps","deps",this)
13 {
14  addVars(vars);
15 }
void addVars(const RooAbsCollection &vars)
SimpleCacheSentry::SimpleCacheSentry ( const RooAbsArg &  func,
const RooArgSet *  obs = 0 
)

Definition at line 18 of file SimpleCacheSentry.cc.

References addFunc().

18  :
19  _deps("deps","deps",this)
20 {
21  addFunc(func,obs);
22 }
void addFunc(const RooAbsArg &func, const RooArgSet *obs=0)
SimpleCacheSentry::SimpleCacheSentry ( const SimpleCacheSentry other,
const char *  newname = 0 
)

Definition at line 24 of file SimpleCacheSentry.cc.

24  :
25  _deps("deps",this,other._deps)
26 {
27 }

Member Function Documentation

void SimpleCacheSentry::addFunc ( const RooAbsArg &  func,
const RooArgSet *  obs = 0 
)

Definition at line 40 of file SimpleCacheSentry.cc.

References addVars(), and deps().

Referenced by addVars(), and SimpleCacheSentry().

41 {
42  RooArgSet *deps = func.getParameters(obs,false);
43  addVars(*deps);
44  delete deps;
45 }
void addVars(const RooAbsCollection &vars)
RooSetProxy & deps()
void SimpleCacheSentry::addVar ( const RooRealVar &  var)
inline

Definition at line 17 of file SimpleCacheSentry.h.

References _deps.

Referenced by SimpleCacheSentry().

17 { _deps.add(var); }
void SimpleCacheSentry::addVars ( const RooAbsCollection &  vars)

Definition at line 29 of file SimpleCacheSentry.cc.

References _deps, a, and addFunc().

Referenced by addFunc(), FastVerticalInterpHistPdfBase::FastVerticalInterpHistPdfBase(), FastVerticalInterpHistPdf::setupCaches(), FastVerticalInterpHistPdf2D::setupCaches(), and SimpleCacheSentry().

30 {
31  TIterator *iter = vars.createIterator();
32  for (RooAbsArg *a = (RooAbsArg *) iter->Next(); a != 0; a = (RooAbsArg *) iter->Next()) {
33  if (_deps.containsInstance(*a)) continue;
34  if (a->isDerived()) addFunc(*a);
35  else _deps.add(*a);
36  }
37  delete iter;
38 }
double a
Definition: hdecay.h:121
void addFunc(const RooAbsArg &func, const RooArgSet *obs=0)
virtual void SimpleCacheSentry::attachToTree ( TTree &  t,
Int_t  bufSize = 32000 
)
inlinevirtual

Definition at line 31 of file SimpleCacheSentry.h.

31 {}
virtual void SimpleCacheSentry::attachToVStore ( RooVectorDataStore &  vstore)
inlinevirtual

Definition at line 32 of file SimpleCacheSentry.h.

32 {}
virtual TObject* SimpleCacheSentry::clone ( const char *  newname) const
inlinevirtual

Definition at line 24 of file SimpleCacheSentry.h.

References SimpleCacheSentry().

24 { return new SimpleCacheSentry(*this, newname); }
virtual void SimpleCacheSentry::copyCache ( const RooAbsArg *  source,
Bool_t  valueOnly = kFALSE,
Bool_t  setValDirty = kTRUE 
)
inlinevirtual

Definition at line 30 of file SimpleCacheSentry.h.

30 {}
virtual RooAbsArg* SimpleCacheSentry::createFundamental ( const char *  newname = 0) const
inlinevirtual

Definition at line 25 of file SimpleCacheSentry.h.

25 { return 0; }
RooSetProxy& SimpleCacheSentry::deps ( )
inline

Definition at line 15 of file SimpleCacheSentry.h.

References _deps.

Referenced by addFunc().

15 { return _deps; }
const RooArgSet& SimpleCacheSentry::deps ( ) const
inline

Definition at line 16 of file SimpleCacheSentry.h.

References _deps.

16 { return _deps; }
bool SimpleCacheSentry::empty ( void  ) const
inline

Definition at line 21 of file SimpleCacheSentry.h.

References _deps.

Referenced by FastVerticalInterpHistPdf::setupCaches(), and FastVerticalInterpHistPdf2D::setupCaches().

21 { return _deps.getSize() == 0; }
virtual void SimpleCacheSentry::fillTreeBranch ( TTree &  t)
inlinevirtual

Definition at line 34 of file SimpleCacheSentry.h.

34 {}
bool SimpleCacheSentry::good ( ) const
inline

Definition at line 20 of file SimpleCacheSentry.h.

Referenced by VerticalInterpHistPdf::evaluate(), FastVerticalInterpHistPdf::evaluate(), and FastVerticalInterpHistPdf2D::evaluate().

20 { return !isValueDirty(); }
virtual Bool_t SimpleCacheSentry::operator== ( const RooAbsArg &  other)
inlinevirtual

Definition at line 28 of file SimpleCacheSentry.h.

28 { return this == &other; }
virtual Bool_t SimpleCacheSentry::readFromStream ( istream &  is,
Bool_t  compact,
Bool_t  verbose = kFALSE 
)
inlinevirtual

Definition at line 26 of file SimpleCacheSentry.h.

26 { return false; }
void SimpleCacheSentry::reset ( void  )
inline

Definition at line 22 of file SimpleCacheSentry.h.

Referenced by VerticalInterpHistPdf::syncTotal(), and FastVerticalInterpHistPdfBase::syncTotal().

22 { clearValueDirty(); }
virtual void SimpleCacheSentry::setTreeBranchStatus ( TTree &  t,
Bool_t  active 
)
inlinevirtual

Definition at line 33 of file SimpleCacheSentry.h.

33 {}
virtual void SimpleCacheSentry::syncCache ( const RooArgSet *  nset = 0)
inlinevirtual

Definition at line 29 of file SimpleCacheSentry.h.

29 {}
virtual void SimpleCacheSentry::writeToStream ( ostream &  os,
Bool_t  compact 
) const
inlinevirtual

Definition at line 27 of file SimpleCacheSentry.h.

27 { }

Member Data Documentation

RooSetProxy SimpleCacheSentry::_deps
private

Definition at line 36 of file SimpleCacheSentry.h.

Referenced by addVar(), addVars(), deps(), and empty().