[root] / trunk / roofit / roofitcore / inc / RooAbsCache.h Repository:
ViewVC logotype

Log of /trunk/roofit/roofitcore/inc/RooAbsCache.h

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 44507 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 4 12:30:41 2012 UTC (2 years, 7 months ago) by axel
File length: 2063 byte(s)
Diff to previous 41862
Remove
  using namespace std;
from Riostream.h, which has huge consequences for all of ROOT.
Riostream.h is now a simple wrapper for fstream, iostream, iomanip for backward compatibility; Riosfwd.h simply wraps iosfwd.

Because of templates and their inline functions, Riostream.h needed to be included in headers, too (e.g. TParameter.h), which violated the assumption that Riostream.h is not exposing its using namespace std to headers.
ROOT now requires R__ANSISTREAM, R__SSTREAM, which does not change the set of supported compilers.

Without "using namespace std", several identifiers are now prefixed by std::; e.g. roofit/* source files now have a using namespace std to keep their coding style.
TFile::MakeProject() now generates "using namespace std" to convert the CINT-style class names into C++ ones.

Revision 41862 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 10 09:44:32 2011 UTC (3 years, 2 months ago) by wouter
File length: 2058 byte(s)
Diff to previous 24247
   o PiecewiseInterpolation, RooAbsCachedReal, RooAbsCachedPdf

     - Follow adjustment in RooCacheManager


   o RooConvCoefVar, RooEffProd, RooResolutionModel, RooErrorVar, RooProjectedPdf, RooAbsHiddenReal

     - Migrate to getValV


   o RooProdPdf

     - Follow adjustment in RooCacheManager     
     - Migrate to getValV


   o RooVectorDataStore

     - Various small fixes

     - Allow storage of non-constant 'track-and-change' cache entries.
       These are cached PDF nodes that are not constant, but need
       to be recalculated when selected parameters change. A 
       RooChangeTracker data member is added to the vectors to
       do this dependency checking, and recalculation (as needed)
       is performed in method recalculateCache() to be called from
       the test stat before looping of the data.
       

   o RooAbsReal

     - Introduce new non-virtual inline getVal() methods that handles
       clean-cache state cases and delegates all other cases to a 
       virtual method getValV() that corresponds to the original
       getVal() method


     - Add 'ignore' more to eval error logging protocal


   o RooAddPdf

     - Follow adjustment in RooCacheManager 
     - Optimize control structure in evaluate() to be more efficient
       (move conditional outside loop)

   o RooAbsTestStatistic

     - Add extra argument to constOptimizeTestStatistic to control
       activation of track-and-change optimization

   o RooRealMPFE

     - Migrate to getValV()

     - Add support for new track-and-change option argument in 
       transmission of const optimization request to servers
       

   o RooRealVar

     - Exploit new _fast flag of RooAbsReal to choose non-virtual
       handling of getVal()

     - Migrate to getValV() [ but still dummy ]

     - Small fix in attachToVStore()


   o RooNLLVar

      - Add data member tracking first use

      - After first use, trigger wiring of all caches in RooCacheManagers
        to speed up trivial cache selection decisions (i.e those where
        only a single cache entry exists)

      - Add call to RooAbsDataStore::recalculateCache() to implement
        track-and-change update prior to likelihood loop


   o RooConstVar

      - Migrate to getValV()


   o RooAbsArg

     - Eliminate flipACLean() protocol since no longer used

     - Simplify method opermode() now that flipAClean is abandoned.

     - In findConstantNodes() add support for change tracking
       and include nodes with "ChangeTracking" atttribute in
       list of constants. Mark all truly constant expressions
       with attribute "ConstantExpression"

     - Add extra argument to constOptimizeTestStatistic to control
       activation of track-and-change optimization  

     - In printCompactTree() also print valueDirty state when in Auto mode


     - Add method wireAllCaches() which propagates cache wiring request
       to all registered cache nodes on all branches nodes

     - Add transient data member with namereg pointer to string with
       current object name. Overload SetName() and SetName() and title
       to clear pointer whenever name changes.


   o RooAbsPdf

     - Migrate to getValV(). Eliminate handling of clean-cache cases
       as this is now done in RooAbsReal::getVal()

     - Disable use of RooAbsPdf::raiseEvalError() protocol as this
       is now communicated through RooAbsReal::logEvalError()


   o RooRealIntegral

     - Migrate to getValV()

     - Use setInhibitDirty() instead of flipAClean() in evaluate()
       when performing numeric integrations


   o RooTreeDataStore

     - In cachArgs() add code to select only cache items with
       label "ConstantExpression" as tree store is unable to
       cache track-and-change items

   o RooAbsCategory

     - When printing also show index associated to label


   o RooAbsOptTestStatistic

     - Add extra argument to constOptimizeTestStatistic to control
       activation of track-and-change optimization

     - In optimizeConstantTerms() when trackChanges option is active
       request change tracking for all component nodes of RooAddPdf
       and RooRealSumPdf, unless these components are RooProdPdf/RooProducts
       respectively in which case the components of these products are tracked
       
   o RooRealProxy

     - Use _fast attribute of RooAbsArg to directly return value cache
       of RooAbsReals if that is allowed


   o RooAbsCache

     - Add virtual method wireCache()


   o RooCacheManager

     - Add new method getObj() that takes isetRangeName as 'const char*'
       instead of 'const TNamed *' to be able to eliminate the conversion
       when in wired mode

     - Implement cache wiring - If at moment of the request only a single
       cached entry exists - always return that one from here one.


   o RooAbsDataStore

     - Implement virtual method calculateCache()

Revision 24247 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 12 14:54:32 2008 UTC (6 years, 7 months ago) by wouter
File length: 2024 byte(s)
Diff to previous 23134
   o RooAbsSelfCachedPdf RooAbsCacheElement RooAbsProxy RooAbsSelfCachedReal RooAbsRealLValue 
     RooAbsCachedReal RooAbsGenContext RooAbsCategoryLValue RooAbsAnaConvPdf RooAbsReal 
     RooAbsCollection RooAICRegistry RooAbsCachedPdf RooAbsTestStatistic RooAbsData RooAbsLValue 
     RooAbsFunc RooAbsPdf RooAbsArg RooAbsBinning Roo1DTable RooEffProd RooAbsRootFinder RooAbsHiddenReal 
     RooAbsString RooAbsIntegrator RooMinuit RooAbsCache RooAbsCategory RooAbsOptTestStatistic RooAbsMCStudyModule

     - Upgrade inline documention: make sure that every member function has some descriptive comments, every
       data member has a descriptive comment, make sure that each class has a description.

     - Fix class description header so that it is correctly identified by THtml

     - Remove a couple of obsolete member function

Revision 23134 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 11 07:53:39 2008 UTC (6 years, 9 months ago) by rdm
File length: 1993 byte(s)
Diff to previous 21379
move the following directories to "roofit":

roofitcore, roofit

Revision 21379 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 14 15:12:29 2007 UTC (7 years, 1 month ago) by wouter
Original Path: trunk/roofitcore/inc/RooAbsCache.h
File length: 1993 byte(s)
Diff to previous 20879
  o (Large number of classes)

    - Systematically use Riosfwd.h in header files instead
      of <iostream> or Riostream.h

    - Include "Riostream.h" in implementations where necessary

    - Convert remaining <iostream> to "Riostream" in implementations

    - Outline all inline functions using cout or endl to facilitate
      use of fwd declaration of iostreams in all classes

    - Elimination of some duplicate headers

    - Match use of 'using namespace std' in implementation files
      to classes that actually use STL classes

Revision 20879 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 19 11:22:56 2007 UTC (7 years, 2 months ago) by rdm
Original Path: trunk/roofitcore/inc/RooAbsCache.h
File length: 1999 byte(s)
Diff to previous 20161
Set property svn:eol-style LF on all source and Makefiles. This should avoid
problems with Win32 line endings ending up in the repository. All MS tools
support LF eols fine.

Revision 20161 - (view) (download) (as text) (annotate) - [select for diffs]
Added Mon Oct 1 16:28:25 2007 UTC (7 years, 3 months ago) by wouter
Original Path: trunk/roofitcore/inc/RooAbsCache.h
File length: 1999 byte(s)
   o RooAbsCache

    - New abstract base class for cache objects associated with RooAbsArgs.
      Caches register themselves with the owning RooAbsArg and propagate
      all necessary state changes and meta information to objects in the cache


   o RooCacheManager

    - Concrete template implementation of RooAbsCache with an interface
      and functionality styled after RooNormListManager. The template class
      provide no special handling for cache contents that includes RooAbsArg
      objects and does not forward hook calls. It is thus mostly intended
      to cache basic types indexed on a normalization/integration configuration


   o RooObjCacheManager

    - Class derived from RooCacheManager<RooAbsCacheElement> that implements
      all proper call forwarding and handling of state and other meta information
      to RooAbsArg objects embedded in the cache elements. To facilitate this
      functionality the RooAbsCacheElement defines a pure virtual method
      containedArgs() that must be implemented to expose its contents to
      the cache manager. The default behavior on a serverRedirect hook is
      to sterilize the cache. OperMode changes are not forwarded by default
      to the cache contents as cached objects do not necessarily have the
      same operation mode (e.g. if the cache contains an integral of its owner).
      Any calls to optimizeCacheMode(), printCompactTreeHook(), and findConstantNodes()
      are forwarded. Moreover, optimizeCacheMode() calls are remembered and
      any objects inserted in the cache after such a call was received will be
      optimized upon insertion in the cache

   o RooAbsCacheElement

    - Abstract base class for objects to be managed by RooObjCacheManager. Each
      object must in addition to its payload implement the containedArgs()
      member function that exposes the RooAbsArg object content to the manager
      for processing. The argument passed to containedArgs() indicates the use
      case for the returned list of objects, allowing the cache payload to
      return different lists depending upon use. This is for most applications
      not required.


   o RooAbsCachedPdf

    - Abstract base class derived from RooAbsPdf for p.d.f.s that implement 
      value caching in a grid over the entire domain of the observables. 
      The base class implements the overall caching logistics and manages
      the RooDataHists and RooHistPdfs that respresent the cached contents.
      Derived classes must inputBaseName() defined a unique name prefix for
      all cache objects, actualObservales() and actualParameters() to
      determined the actual observables and parameters given a set of 
      available observables and fillCacheObject() which should fill the
      RooDataHist cache for a given obs/params configuration with the
      p.d.fs values.


   o RooAbsSelfCachedPdf

    - Abstract base class derived from RooAbsCachedPdf that implements
      all of the required logistics in RooCachedPdf and only require
      derived classes from RooAbsSelfCachedPdf to implement evaluate().
      Any class derived from RooAbsPdf can thus be trivially switched
      to derived from RooAbsSelfCachedPdf and gain the caching functionality.
      

   o RooCachedPdf

    - Concrete class derived from RooAbsCachedPdf that implements
      the caching of an externally provided p.d.f in the constructor.


   o RooFFTConvPdf

    - Concrete class derived from RooAbsCachedPdf that implement generic
      numeric convolution of two input p.d.f.s using FFT technique
      and convolution theorem. Actual FFTs are calculated by FFTW
      through TVirtualFFT interface in ROOT. Present implementation only supports 
      convolution in one dimension, but this will be extended later
      as there are no fundamental limitations in RooAbsCachedPdf nor FFTW.
 

   o RooHistPdf

    - Moved from RooFit to RooFitCore because it is used by caching classes


   o RooProdPdf

     - Use new RooObjCacheManager to store partial objects

     - Fix memory leak (already patched in 15.0.14h)


   o RooDataHist

     - Use new RooCacheManager template to cache partial bin volumes

     - Add new set(),setAllWeights() method to update current weight and all weights
       respectively, for use in cached p.d.f.s

     - Add sliceIterator() that iterates over all bins in a lower dimensional 
       slice of the dataset


   o RooDataHistSliceIter

    - Class derived from TIterator that implements the iteration
      over a slice in a reduced number of dimensions in a RooDataHist


   o RooMsgService

     - Speed up processing of debug streams in cases where no debug streams are active

     - add macros series oocoutX and oocxcoutX that allow to associate message with
       a different object than *this

   o RooRealBinding

     - Interface new setValue method that allows value to be set outside default
       domain, but inside given alternate named range. For use in numeric integrator
       bindings


   o RooAbsRealLValue

     - Add new inRange() method with range name specifier to check against chosen
       range instead of default range


   o RooCmdConfig

     - Fix dangling return pointer problem in decodeStringOnTheFly() method


   o RooNameSet

     - Fix bug in refoll()


   o RooChi2Var, RooNLLVar

     - Add processing of AddCoefRange() named argument


   o RooConvCoefVar

     - Hold p.d.f in proxy without value/shape state propagation to obtain
       correct dependency of RooConvCoefVar through separate set proxy
       with parameters that do have state propagation

     - In getAnalyticalIntegral() ask for integration coefficient specific
       to coefficient (following interface change in RooAbsAnaConv)


   o RooEfficiency

     - Follow interface change in RooCategoryProxy


   o RooAbsAnaConvPdf

    - Use new RooObjCacheManager to hold normalization and coefficient representations

    - Extend getCoefAnalyticalIntegral() interface so that each coefficient
      can have a separate integration configuration

    - Modify makeCoefVars() such that it constructs the RooConvCoefVars with
      actual dependents for each coefficients, rather than inserting dependencies
      of any of the coefficients in each coefficient. This logic requires support
      from the implementation class that is interface through a new member function
      coefVars()


   o RooAbsReal 

    - Add Boolean data member treeVar that indicates is value buffer is also
      branch buffer of a tree. This information is already present in the RooAbsReal
      but is relatively expensive to retrieve and is always needed in the inner
      loop of data set operations. This extra member significantly speeds up operations

    - Remove superfluous _norm[] token in name returned by integralNameSuffix() if 
      no normalization set is supplied.

    - Add a fillDataHist() method that fills a given RooDataHist with a sampling
      of the given function. Added for support of caching p.d.f.s


    - Downgrading warning on non-dependent projection variables in plotOn() to
      a debug level message

    - Remove function optimizeDirty(),doConstOpt(),undoConstOpt(),findCacheableBranches()
      findUnusedDatasetVariables() and findRedundantCacheServers() as part of reorganization
      of optimization functionality.


   o RooAbsCollection

    - Use iterator semantics instead of vector semantics to process RooLinkedList
      contents in assignment operator

    - Add utility function contentsString() returning stl string with names
      of contents


   o RooAddPdf

    - Rewrite cache management using new RooObjCacheManager that holds projection
      integrals, range integrals and supplemental normalization lists


   o RooAbsOptGoodnessOfFit

    - Improve handling of normalization ranges and reference ranges for test statistics
      containing RooAddPdfs. New named argument in fitTo() and RooNllVar::ctor() pass
      reference range for fractions in RooAddPdf components that do not have an explicit
      fixed definition already. Name all normalization ranges explicitly after the
      subrange to which the're applied to avoid name clashes and conflicts if multiple
      normalization ranges are involved.

    - Rewrite informational messages through RooMsgService

    - Implement new constOptimizeTestStatistic() function that signals all test statistic
      components of a RooAbsArg expression tree to perform their constant term optimization

    - Implement new optimizeCaching() driver function that changes default lazy-evaluation-with-caching
      scheme to test statistic scheme where only parameters objects propagate state changes and
      where all components that depend directly or indirectly on observables have lazy evaluation
      disabled. Changes to p.d.f objects are delegated to RooAbsPdf::optimizeCacheMode(). Changes
      to dataset are delegated to RooAbsData::optimizeReadingWithCaching()

    - Implement new optimizeConstantTerms() function that is back end for constOptimizeTestStatistic
      implementation. 


  o RooAICRegistry, RooNormSetCache

    - Remove tracking of allocation cycles of RooArgSets as this scheme is superseded by
      memory pool mechanism for RooArgSet allocation


  o RooMappedCategory

    - Follow interface change in RooCategoryProxy.


  o RooRealMPFE

    - Follow reorganization of optimization functionality: implement new constOptimizeTestStatistic
      function for forwarding to slave processes.


  o RooRealVar

    - Add new setVal() function with range name to facilite setting of values that are outside
      default range, but inside specified alternate range. Needed for numeric integration and
      certain RooAddPdf coefficient projection.


  o RooAbsArg

    - Make state management functions public [is/set][Value/ShapeDirty](), setOperMode90
  
    - Add static _flipAClean boolean to support setACleanAdirty() static method.

    - Implement mechanism for registration of cache objects with base class RooAbsCache.
      Forward all calls to operModeHook(), redirectServersHook(), optimizeCacheMode()
      and printCompactTreeHook() to all caches for further processing
   
    - Define constOptimize() function and provide default implementation that forwards
      to all servers 

    - Implement optimizeCacheMode() function that puts expression tree in optimized
      caching for test-statistics operations (only cache/lazy evaluate nodes that
      do not (indirectly) depend on observables

    - Implement findConstantNodes() function that identifies all nodes that depend
      exclusively on constant observables and >0 observables that are eligible
      for precalculation and caching in test statistics operations by 
      RooAbsOptTestStatistic::optimizeConstantTerms()

    - Define constOptimizeTestStatistics that signal an expression tree that any
      embedded test statistic objects should perform their constant term optimization.
      Default implementation in RooAbsArg forwards call to all servers.


  o RooAbsPdf

    - Use new RooObjCacheManager to manage normalization integrals cache.

    - Process new SumCoefRange() option in fitTo() that sets the coeffient
      interpretation range for all embedded RooAddPdf objects of which
      the interpretation range was not explicitly set

    - Extend interface of fixAddCoefNormalizationSet(): add extra argument
      that controls if AddCoef normalization set are forcibly overruled
      for objects that already have an explicit range setting.

  
   o RooRealIntegral 

    - Add some informational messaging through RooMsgService, rewrite existing ones

    - Speed up numeric summations by precreating the involved RooSuperCategory
      in the ctor rather than in evaluate().

    - Fix bug in dependency insertion: explicitly require servers to be value
      server to avoid pulling in fake dependents.
    
    - Remove obsolete data members

    - Implement new setACleanADirty() function that atomically flips state of
      all AClean objects to ADirty for the duration of the integration step.
      Replaces the much more expensive prepareACleanFunc() that did this
      only for the objects involved.

    - Process factorizing terms in integral only if the list is not empty

    - Process Jacobian terms in integral only if the list is not empty


  o RooAddGenContext

   - Adapt to cache management chanches in RooAddPdf


  o RooNumIntFactory

   - Use STL classes for internal memory management


  o RooSetProxyy

   - Implement operator new() and operator() delete as required because
     RooArgSet implements them 


  o RooAbsGoodnessOfFit

   - Store and forward AddCoefRange information for embedded RooAddPdf objects

   - Implement constOptimizeTestStatistic() and forward to components


  o RooErrorVar

   - Follow inRange() interface change in RooAbsRealLValue


  o RooConvGenContext

    - Adapt code to make it work with both RooAbsAnaConv objects and
      the newly introduced RooFFTConvPdf


  o RooMinuit

    - Follow reorganization of optimization functionality


  o RooProjectedPdf

    - Store projection using new RooObjCacheManager


  o RooGlobalFunc

    - Add RooFit::SumCoefRange() named argument for RooAbsPdf::fitTo() 
      and RooNLLVar::ctor() and RooChi2Var::ctor()


  o RooClassFactory

    - Extend existing makePdf(),makeFunction and makeClass() functions
      to also accept RooAbsCategory arguments, to accept an optional string
      inserted as the return value expression inserted in the 
      evaluate() method of the class created, as well as as option string
      specifying one or more analytical integrations of the given function
      expression that will be advertised in the generated getAnalyticalIntegral()
      code and implemented in the generated analyticalIntegral() code

    - Add makeAndCompileFunction() and makeAndCompilePdf methods that
      generate the code and immediate compile it through ROOTs ACliC interface.
      These functions have a simpler interface because the list of arguments
      of the function to be created can be specified as a const RooArgSet&
      rather than a string with a list of names, thus making it easier
      for on-the-fly definition of compiled objects.

    - Add defineFunction() and definePdf() methods define and compile
      a function/pdf using the above functions and immediately instantiate
      an object of the given type passing the specified RooArgSet arguments
      to the constructor of the object. These functions make a compiled
      equivalent of RooFormulaVar based on the TFormula interpreter, i.e.

           RooAbsReal* f = new RooFormulaVar("f","D(1-2w)",RooArgSet(D,w)) ;

      becomes
       
           RooAbsReal* f = RooClassFactory::defineFunction("f","D(1-2w)",RooArgSet(D,w)) ;

   
  o RooAbsCategory

   - Add Boolean data member treeVar that indicates is value buffer is also
     branch buffer of a tree. This information is already present in the RooAbsReal
     but is relatively expensive to retrieve and is always needed in the inner
     loop of data set operations. This extra member significantly speeds up operations

   - Construct explit clean name for TBranch name if node is cached, equivalent
     to what is done in RooAbsReal. Needed because new constOptimizer can also
     cache RooAbsCategory objects


  o RooArgSet

   - Implement operator new() and operator delete() to implement memory pool scheme
     for RooArgSets. The goal of this implementation is to insure that two RooArgSet
     pointers are _never_ the same. This allows to RooNormSet cache manager to safely
     and quickly index integration and normalization configurations by evaluating
     the contents of a RooArgSet only the first time it sees it.


  o RooSimultaneous

   - Implement caching of partial integrals using new RooObjCacheManager

   - Following interface change in RooCategoryProxy ;


  o RooAbsData

   - Defined pure virtual methods optimizeReadingWithCache() and allClientsCached()


  o RooTreeData

   - Implement optimizeReadingWithCache() which determines given a p.d.f to be
     evaluated and a list of the nodes that are cached for it, which observables
     in the dataset are no longer required because they are either not an observable
     of the p.d.f, or they exclusively feed nodes that are cached. Reading of these
     observables is disabled through SetBranchStatus().
  
   - Move allClientsCached() utility function here from RooAbsReal.


  o RooCategoryProxy

   - Remove const char*() conversion operator in favor of a const char* label() method
     to remove possibly ambiguities in C++ math expressions involving category proxies.


  o LinkDef3.h

   - Add newly defined classes

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9