73 for (std::map<TString,ExpensiveObject*>::iterator iter =
_map.begin() ; iter!=
_map.end() ; ++iter) {
180 for (std::map<TString,ExpensiveObject*>::iterator iter =
_map.begin() ; iter !=
_map.end() ; ++iter) {
181 if (iter->second->uid() == uid) {
182 return iter->second->payload() ;
196 for (std::map<TString,ExpensiveObject*>::iterator iter =
_map.begin() ; iter !=
_map.end() ; ++iter) {
197 if (iter->second->uid() == uid) {
198 _map.erase(iter->first) ;
213 for (std::map<TString,ExpensiveObject*>::iterator iter =
_map.begin() ; iter !=
_map.end() ; ++iter) {
214 if (iter->second->uid() == uid) {
215 iter->second->setPayload(obj) ;
244 _ownerName = inOwnerName;
246 _payload = &inPayload ;
259 oocoutW(&inPayload,
Caching) <<
"RooExpensiveObject::registerObject() WARNING: ignoring non-RooAbsReal/non-RooAbsCategory reference parameter " << arg->
GetName() << endl ;
272 _realRefParams(other._realRefParams),
273 _catRefParams(other._catRefParams),
274 _ownerName(other._ownerName)
333 map<TString,ExpensiveObject*>::const_iterator iter =
_map.begin() ;
335 while(iter!=
_map.end()) {
336 cout <<
"uid = " << iter->second->uid() <<
" key=" << iter->first <<
" value=" ;
337 iter->second->print() ;
350 cout <<
" parameters=( " ;
353 cout << iter->first <<
"=" << iter->second <<
" " ;
358 cout << iter2->first <<
"=" << iter2->second <<
" " ;
373 map<TString,ExpensiveObject*>::const_iterator iter = other.
_map.begin() ;
374 while(iter!=other.
_map.end()) {
375 if (
string(ownerName)==iter->second->ownerName()) {
378 oocoutI(iter->second->payload(),
Caching) <<
"RooExpensiveObjectCache::importCache() importing cache object " 379 << 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...