CMS 3D CMS Logo

Public Member Functions | Private Attributes

SimpleCacheSentry Class Reference

#include <SimpleCacheSentry.h>

List of all members.

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 (const RooRealVar &var)
 SimpleCacheSentry ()
 SimpleCacheSentry (const SimpleCacheSentry &other, const char *newname=0)
 SimpleCacheSentry (const RooAbsCollection &vars)
 SimpleCacheSentry (const RooAbsArg &func, const RooArgSet *obs=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().

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

Definition at line 5 of file SimpleCacheSentry.cc.

References addVar().

                                                          :
    _deps("deps","deps",this)   
{
    addVar(var);
}
SimpleCacheSentry::SimpleCacheSentry ( const RooAbsCollection &  vars)

Definition at line 11 of file SimpleCacheSentry.cc.

References addVars().

                                                                 :
    _deps("deps","deps",this)   
{
    addVars(vars);
}
SimpleCacheSentry::SimpleCacheSentry ( const RooAbsArg &  func,
const RooArgSet *  obs = 0 
)

Definition at line 18 of file SimpleCacheSentry.cc.

References addFunc().

                                                                                :
    _deps("deps","deps",this)   
{
    addFunc(func,obs);
}
SimpleCacheSentry::SimpleCacheSentry ( const SimpleCacheSentry other,
const char *  newname = 0 
)

Definition at line 24 of file SimpleCacheSentry.cc.

                                                                                        :
    _deps("deps",this,other._deps)   
{
}

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().

{
    RooArgSet *deps = func.getParameters(obs,false);
    addVars(*deps);
    delete deps;
}
void SimpleCacheSentry::addVar ( const RooRealVar &  var) [inline]

Definition at line 17 of file SimpleCacheSentry.h.

References _deps.

Referenced by SimpleCacheSentry().

{ _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().

{
    TIterator *iter = vars.createIterator();
    for (RooAbsArg *a = (RooAbsArg *) iter->Next(); a != 0; a = (RooAbsArg *) iter->Next()) {
        if (_deps.containsInstance(*a)) continue;
        if (a->isDerived()) addFunc(*a);
        else _deps.add(*a);
    }
    delete iter;
}
virtual void SimpleCacheSentry::attachToTree ( TTree &  t,
Int_t  bufSize = 32000 
) [inline, virtual]

Definition at line 31 of file SimpleCacheSentry.h.

{}
virtual void SimpleCacheSentry::attachToVStore ( RooVectorDataStore &  vstore) [inline, virtual]

Definition at line 32 of file SimpleCacheSentry.h.

{}
virtual TObject* SimpleCacheSentry::clone ( const char *  newname) const [inline, virtual]

Definition at line 24 of file SimpleCacheSentry.h.

References SimpleCacheSentry().

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

Definition at line 30 of file SimpleCacheSentry.h.

{}
virtual RooAbsArg* SimpleCacheSentry::createFundamental ( const char *  newname = 0) const [inline, virtual]

Definition at line 25 of file SimpleCacheSentry.h.

{ return 0; }
const RooArgSet& SimpleCacheSentry::deps ( ) const [inline]

Definition at line 16 of file SimpleCacheSentry.h.

References _deps.

{ return _deps; }
RooSetProxy& SimpleCacheSentry::deps ( ) [inline]

Definition at line 15 of file SimpleCacheSentry.h.

References _deps.

Referenced by addFunc().

{ 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().

{ return _deps.getSize() == 0; }
virtual void SimpleCacheSentry::fillTreeBranch ( TTree &  t) [inline, virtual]

Definition at line 34 of file SimpleCacheSentry.h.

{}
bool SimpleCacheSentry::good ( ) const [inline]
virtual Bool_t SimpleCacheSentry::operator== ( const RooAbsArg &  other) [inline, virtual]

Definition at line 28 of file SimpleCacheSentry.h.

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

Definition at line 26 of file SimpleCacheSentry.h.

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

Definition at line 22 of file SimpleCacheSentry.h.

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

{ clearValueDirty(); } 
virtual void SimpleCacheSentry::setTreeBranchStatus ( TTree &  t,
Bool_t  active 
) [inline, virtual]

Definition at line 33 of file SimpleCacheSentry.h.

{}
virtual void SimpleCacheSentry::syncCache ( const RooArgSet *  nset = 0) [inline, virtual]

Definition at line 29 of file SimpleCacheSentry.h.

{}
virtual void SimpleCacheSentry::writeToStream ( ostream &  os,
Bool_t  compact 
) const [inline, virtual]

Definition at line 27 of file SimpleCacheSentry.h.

{ }

Member Data Documentation

RooSetProxy SimpleCacheSentry::_deps [private]

Definition at line 36 of file SimpleCacheSentry.h.

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