66 for (map<string,RooAbsDataStore*>::iterator iter=inputData.begin() ; iter!=inputData.end() ; ++iter) {
79 RooAbsDataStore(other,newname), _indexCat(other._indexCat), _curStore(other._curStore), _curIndex(other._curIndex), _ownComps(
kTRUE)
81 for (map<Int_t,RooAbsDataStore*>::const_iterator iter=other.
_dataMap.begin() ; iter!=other.
_dataMap.end() ; ++iter) {
93 RooAbsDataStore(other,vars,newname), _indexCat(other._indexCat), _curStore(other._curStore), _curIndex(other._curIndex), _ownComps(
kTRUE)
101 for (map<Int_t,RooAbsDataStore*>::const_iterator iter=other.
_dataMap.begin() ; iter!=other.
_dataMap.end() ; ++iter) {
117 map<int,RooAbsDataStore*>::const_iterator iter ;
119 delete iter->second ;
143 map<int,RooAbsDataStore*>::const_iterator iter ;
145 iter->second->recalculateCache(proj,firstEvent,lastEvent,stepSize,skipZeroWeights) ;
155 map<int,RooAbsDataStore*>::const_iterator iter ;
157 ret |= iter->second->hasFilledCache() ;
167 map<int,RooAbsDataStore*>::const_iterator iter ;
169 iter->second->forceCacheUpdate() ;
182 return subset->
fill() ;
194 map<int,RooAbsDataStore*>::const_iterator iter ;
196 sum+= iter->second->sumEntries() ;
211 map<int,RooAbsDataStore*>::const_iterator iter ;
213 if (idx>=(offset+iter->second->numEntries())) {
214 offset += iter->second->numEntries() ;
282 map<int,RooAbsDataStore*>::const_iterator iter ;
284 if (iter->second->isWeighted())
return kTRUE ;
294 throw(std::string(
"RooCompositeDataSore::loadValues() NOT IMPLEMENTED")) ;
310 coutE(
InputArguments) <<
"RooCompositeDataStore::changeObservableName(" <<
GetName() <<
" no observable " << from <<
" in this dataset" << endl ;
319 map<int,RooAbsDataStore*>::const_iterator iter ;
321 ret |= iter->second->changeObservableName(from,to) ;
336 map<int,RooAbsDataStore*>::const_iterator iter ;
338 ret = iter->second->addColumn(newVar,adjustRange) ;
355 map<int,RooAbsDataStore*>::const_iterator iter ;
357 ret = iter->second->addColumns(varList) ;
372 throw string(
"RooCompositeDataStore::merge() is not implemented yet") ;
384 for (
int i=0 ; i<nevt ; i++) {
397 map<int,RooAbsDataStore*>::const_iterator iter ;
399 n += iter->second->numEntries() ;
411 map<int,RooAbsDataStore*>::const_iterator iter ;
413 iter->second->reset() ;
423 map<int,RooAbsDataStore*>::const_iterator iter ;
425 iter->second->cacheArgs(owner,newVarSet,nset,skipZeroWeights) ;
435 map<int,RooAbsDataStore*>::const_iterator iter ;
438 iter->second->setArgStatus(*subset,active) ;
452 map<int,RooAbsDataStore*>::const_iterator iter ;
454 iter->second->attachCache(newOwner,inCachedVars) ;
465 map<int,RooAbsDataStore*>::const_iterator iter ;
467 iter->second->resetCache() ;
478 map<int,RooAbsDataStore*>::const_iterator iter ;
480 iter->second->attachBuffers(extObs);
491 map<int,RooAbsDataStore*>::const_iterator iter ;
493 iter->second->resetBuffers();
503 cout <<
"RooCompositeDataStore::dump()" << endl ;
504 map<int,RooAbsDataStore*>::const_iterator iter ;
506 cout <<
"state number " << iter->first <<
" has store " << iter->second->IsA()->GetName() <<
" with variables " << *iter->second->get() ;
507 if (iter->second->isWeighted()) cout <<
" and is weighted " ;
float type_of_call hi(const int &, const int &)
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
void SetName(const char *name)
Set the name of the TNamed.
const RooCatType * lookupType(Int_t index, Bool_t printError=kFALSE) const
Find our type corresponding to the specified index, or return 0 for no match.
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
RooAbsCollection & assignValueOnly(const RooAbsCollection &other, Bool_t oneSafe=kFALSE)
The assignment operator sets the value of any argument in our set that also appears in the other set.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsDataStore is the abstract base class for data collection that use a TTree as internal storage m...
virtual const RooArgSet * get(Int_t index) const =0
virtual Double_t weight() const =0
virtual Double_t weightError(RooAbsData::ErrorType etype=RooAbsData::Poisson) const =0
virtual RooAbsDataStore * clone(const char *newname=0) const =0
virtual Int_t numEntries() const =0
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
RooCategory represents a fundamental (non-derived) discrete value object.
virtual Int_t getIndex() const
Return index number of current state.
virtual Bool_t setIndex(Int_t index, Bool_t printError=kTRUE)
Set value by specifying the index code of the desired state.
RooCompositeDataStore combines several disjunct datasets into one.
virtual RooAbsArg * addColumn(RooAbsArg &var, Bool_t adjustRange=kTRUE)
WVE ownership issue here!! Caller (a RooAbsData) should take ownership of all arguments,...
virtual void resetCache()
Int_t _curIndex
Datastore associated with current event.
virtual Bool_t changeObservableName(const char *from, const char *to)
Change name of internal observable named 'from' into 'to'.
virtual Bool_t valid() const
Return true if currently loaded coordinate is considered valid within the current range definitions o...
std::map< Int_t, RooAbsDataStore * > _dataMap
virtual void attachBuffers(const RooArgSet &extObs)
void attachCache(const RooAbsArg *newOwner, const RooArgSet &cachedVars)
Initialize cache of dataset: attach variables of cache ArgSet to the corresponding TTree branches.
void loadValues(const RooAbsDataStore *tds, const RooFormulaVar *select=0, const char *rangeName=0, Int_t nStart=0, Int_t nStop=2000000000)
virtual Double_t weightError(RooAbsData::ErrorType etype=RooAbsData::Poisson) const
virtual void resetBuffers()
Bool_t _ownComps
Index associated with current event.
virtual Double_t sumEntries() const
Forward fill request to appropriate subset.
virtual void setArgStatus(const RooArgSet &set, Bool_t active)
virtual RooArgSet * addColumns(const RooArgList &varList)
WVE ownership issue here!! Caller (a RooAbsData) should take ownership of all arguments,...
virtual Int_t numEntries() const
virtual void append(RooAbsDataStore &other)
virtual Bool_t isWeighted() const
virtual Double_t weight() const
virtual void cacheArgs(const RooAbsArg *owner, RooArgSet &varSet, const RooArgSet *nset=0, Bool_t skipZeroWeights=kFALSE)
RooAbsDataStore * _curStore
virtual ~RooCompositeDataStore()
Destructor.
RooAbsDataStore * merge(const RooArgSet &allvars, std::list< RooAbsDataStore * > dstoreList)
virtual Bool_t hasFilledCache() const
virtual void recalculateCache(const RooArgSet *, Int_t, Int_t, Int_t, Bool_t)
Forward recalculate request to all subsets.
virtual void forceCacheUpdate()
virtual const RooArgSet * get() const
virtual Int_t fill()
Forward fill request to appropriate subset.
virtual const char * GetName() const
Returns name of object.
static long int sum(long int i)