69 <<
" generate the index category" << endl ;
89 if (anyServer && !allServers) {
91 <<
" generate all components of a derived index category" << endl ;
103 <<
" to calculate number of events per category" << endl ;
147 oocoutE(
_pdf,
Generation) <<
"RooSimSplitGenContext::RooSimSplitGenContext(" <<
GetName() <<
") Couldn't deep-clone index category, abort," << endl ;
148 throw std::string(
"RooSimSplitGenContext::RooSimSplitGenContext() Couldn't deep-clone index category, abort") ;
163 for (vector<RooAbsGenContext*>::iterator iter =
_gcList.begin() ; iter!=
_gcList.end() ; ++iter) {
181 for (vector<RooAbsGenContext*>::iterator iter =
_gcList.begin() ; iter!=
_gcList.end() ; ++iter) {
182 (*iter)->attach(args) ;
201 for (vector<RooAbsGenContext*>::iterator iter =
_gcList.begin() ; iter!=
_gcList.end() ; ++iter) {
202 (*iter)->initGenerator(theEvent) ;
224 << nEvents <<
" events" << endl;
235 vector<Double_t> nGen(
_numPdf) ;
263 while (nGenSoFar<nEvents) {
280 map<string,RooAbsData*> dataMap ;
287 dataMap[proxy->
GetName()] =
_gcList[icomp]->generate(nGen[icomp],skipInit,extendedMode) ;
305 for (vector<RooAbsGenContext*>::iterator iter=
_gcList.begin() ; iter!=
_gcList.end() ; ++iter) {
306 (*iter)->setExpectedData(flag) ;
348 os << indent <<
"--- RooSimSplitGenContext ---" << endl ;
349 os << indent <<
"Using PDF ";
virtual const char * GetName() const
Returns name of object.
virtual void printStream(std::ostream &os, Int_t contents, StyleOption style, TString indent="") const
Print description of object on ostream, printing contents set by contents integer, which is interpreted as an OR of 'enum ContentsOptions' values and in the style given by 'enum StyleOption'.
RooCategoryProxy _indexCat
virtual void generateEvent(RooArgSet &theEvent, Int_t remaining)
this method is empty because it is not used in this type of context
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
virtual void setExpectedData(Bool_t)
Forward to components.
virtual void SetName(const char *name)
Change (i.e.
RooCmdArg Link(const char *state, RooAbsData &data)
Iterator abstract base class.
RooDataSet * createDataSet(const char *name, const char *title, const RooArgSet &obs)
this method is empty because it is not used by this context
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void attach(const RooArgSet ¶ms)
Attach the index category clone to the given event buffer.
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Detailed printing interface.
virtual void initGenerator(const RooArgSet &theEvent)
Perform one-time initialization of generator context.
const RooAbsCategory & arg() const
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return expected number of events from this p.d.f for use in extended likelihood calculations.
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const
Return a list iterator.
virtual const char * name() const
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.
RooAbsArg * absArg() const
static void indent(ostringstream &buf, int indent_level)
const RooSimultaneous * _pdf
virtual RooAbsGenContext * autoGenContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE, Bool_t autoBinned=kTRUE, const char *binnedTag="") const
Bool_t canBeExtended() const
TIterator * serverIterator() const
RooCmdArg Index(RooCategory &icat)
static Double_t uniform(TRandom *generator=randomGenerator())
Return a number uniformly distributed from (0,1)
RooAbsArg * find(const char *name) const
Find object with given name in list.
std::vector< int > _gcIndex
virtual void setProtoDataOrder(Int_t *lut)
this method is empty because proto datasets are not supported by this context
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Interface for multi-line printing.
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
virtual Bool_t isDerived() const
virtual TObject * Next()=0
virtual ~RooSimSplitGenContext()
Destructor. Delete all owned subgenerator contexts.
RooAbsCategoryLValue * _idxCat
std::vector< RooAbsGenContext * > _gcList
virtual RooDataSet * generate(Double_t nEvents=0, Bool_t skipInit=kFALSE, Bool_t extendedMode=kFALSE)
Generate the specified number of events with nEvents>0 and and return a dataset containing the genera...
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
virtual Int_t GetSize() const
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
RooSimSplitGenContext(const RooSimultaneous &model, const RooArgSet &vars, Bool_t _verbose=kFALSE, Bool_t autoBinned=kTRUE, const char *binnedTag="")
Constructor of specialized generator context for RooSimultaneous p.d.f.s.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add element to non-owning set.