74 for (std::map<TString,ExpensiveObject*>::iterator iter =
_map.begin() ; iter!=
_map.end() ; ++iter) {
181 for (std::map<TString,ExpensiveObject*>::iterator iter =
_map.begin() ; iter !=
_map.end() ; iter++) {
182 if (iter->second->uid() == uid) {
183 return iter->second->payload() ;
197 for (std::map<TString,ExpensiveObject*>::iterator iter =
_map.begin() ; iter !=
_map.end() ; iter++) {
198 if (iter->second->uid() == uid) {
199 _map.erase(iter->first) ;
214 for (std::map<TString,ExpensiveObject*>::iterator iter =
_map.begin() ; iter !=
_map.end() ; iter++) {
215 if (iter->second->uid() == uid) {
216 iter->second->setPayload(obj) ;
245 _ownerName = inOwnerName;
247 _payload = &inPayload ;
260 oocoutW(&inPayload,
Caching) <<
"RooExpensiveObject::registerObject() WARNING: ignoring non-RooAbsReal/non-RooAbsCategory reference parameter " << arg->
GetName() << endl ;
273 _realRefParams(other._realRefParams),
274 _catRefParams(other._catRefParams),
275 _ownerName(other._ownerName)
334 map<TString,ExpensiveObject*>::const_iterator iter =
_map.begin() ;
336 while(iter!=
_map.end()) {
337 cout <<
"uid = " << iter->second->uid() <<
" key=" << iter->first <<
" value=" ;
338 iter->second->print() ;
351 cout <<
" parameters=( " ;
354 cout << iter->first <<
"=" << iter->second <<
" " ;
359 cout << iter2->first <<
"=" << iter2->second <<
" " ;
374 map<TString,ExpensiveObject*>::const_iterator iter = other.
_map.begin() ;
375 while(iter!=other.
_map.end()) {
376 if (
string(ownerName)==iter->second->ownerName()) {
379 oocoutI(iter->second->payload(),
Caching) <<
"RooExpensiveObjectCache::importCache() importing cache object " 380 << iter->first <<
" associated with object " << iter->second->ownerName() << endl ;
virtual const char * GetName() const
Returns name of object.
void clearAll()
Clear all cache elements.
TIterator * createIterator(Bool_t dir=kIterForward) const
static RooExpensiveObjectCache * _instance
virtual ~ExpensiveObject()
Bool_t clearObj(Int_t uniqueID)
Clear cache element with given unique ID Retrieve payload object of cache element with given unique I...
static void cleanup()
Static function called by RooSentinel atexit() handler to cleanup at end of program.
Bool_t matches(TClass *tc, const RooArgSet ¶ms)
Check object type ;.
RooExpensiveObjectCache is a singleton class that serves as repository for objects that are expensive...
Double_t getVal(const RooArgSet *set=0) const
std::map< TString, Int_t > _catRefParams
std::map< TString, ExpensiveObject * > _map
virtual Int_t getIndex() const
Return index number of current state.
virtual ~RooExpensiveObjectCache()
Destructor.
const TObject * retrieveObject(const char *name, TClass *tclass, const RooArgSet ¶ms)
Retrieve object from cache that was registered under given name with given parameters, if current parameter values match those that were stored in the registry for this object.
Iterator abstract base class.
const TObject * payload() const
void importCacheObjects(RooExpensiveObjectCache &other, const char *ownerName, Bool_t verbose=kFALSE)
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
std::map< TString, Double_t > _realRefParams
const char * ownerName() const
The ROOT global object gROOT contains a list of all defined classes.
RooExpensiveObjectCache()
Constructor.
Bool_t setObj(Int_t uniqueID, TObject *obj)
Place new payload object in cache element with given unique ID.
static RooExpensiveObjectCache & instance()
Return reference to singleton instance.
static void activate()
Install atexit handler that calls CleanupRooFitAtExit() on program termination.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Mother of all ROOT objects.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
virtual TObject * Next()=0
RooAbsCategory is the common abstract base class for objects that represent a discrete value with a f...
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
virtual const char * GetName() const
Returns name of object.
const TObject * getObj(Int_t uniqueID)
Retrieve payload object of cache element with given unique ID.
Bool_t registerObject(const char *ownerName, const char *objectName, TObject &cacheObject, TIterator *paramIter)
Register object associated with given name and given associated parameters with given values in cache...