72 list<RooAbsStudy*>::const_iterator
iter = other.
_studies.begin() ;
74 _studies.push_back((*iter)->clone()) ;
106 (*iter)->attach(*
_ws) ;
107 (*iter)->initialize() ;
118 Int_t prescale = nExperiments>100 ?
Int_t(nExperiments/100) : 1 ;
119 for (Int_t i=0 ; i<nExperiments ; i++) {
121 coutP(
Generation) <<
"RooStudyPackage::run(" <<
GetName() <<
") processing experiment " << i <<
"/" << nExperiments << endl ;
147 (*iter)->finalize() ;
160 (*iter)->finalize() ;
162 RooDataSet* summaryData = (*iter)->summaryData() ;
165 cout <<
"registering summary dataset: " ; summaryData->
Print() ;
166 olist->
Add(summaryData) ;
170 if (detailedData && detailedData->
GetSize()>0) {
173 cout <<
"registering detailed dataset " << detailedData->IsA()->
GetName() <<
"::"
174 << detailedData->
GetName() <<
" with " << detailedData->
GetSize() <<
" elements" << endl ;
181 olist->
Add(detailedData) ;
182 (*iter)->releaseDetailData() ;
203 if (worknumber !=
"undef")
204 iworker = int( worknumber.
Atof()*10 + 0.1);
207 for (
int i = 0; i <= iworker; ++i )
224 string name_fin =
Form(
"study_data_%s.root",studyName) ;
225 TFile fin(name_fin.c_str()) ;
228 cout <<
"RooStudyPackage::processFile() ERROR input file " << name_fin <<
" does not contain a RooStudyPackage named 'studypack'" << endl ;
233 Int_t seqno = pkg->initRandom() ;
234 cout <<
"RooStudyPackage::processFile() Initial random seed for this run is " << seqno << endl ;
241 pkg->exportData(&res,seqno) ;
242 TFile fout(
Form(
"study_result_%s_%d.root",studyName,seqno),
"RECREATE") ;
const char * GetName() const
Returns name of object.
void SetName(const char *name)
Change the name of this dataset into the given name.
void run(Int_t nExperiments)
Random number generator class based on the maximally quidistributed combined Tausworthe generator by ...
void addStudy(RooAbsStudy &study)
virtual void SetName(const char *name)
Change (i.e.
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
Double_t Atof() const
Return floating-point value contained in string.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
void finalize()
Finalize all studies.
virtual void SetSeed(UInt_t seed=0)
Set the random generator seed.
void SetName(const char *name)
Iterator abstract base class.
void driver(Int_t nExperiments)
The TNamed class is the base class for all named ROOT classes.
std::map< std::string, std::string >::const_iterator iter
virtual UInt_t Integer(UInt_t imax)
Returns a random integer on [ 0, imax-1 ].
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
TIterator * MakeIterator(Bool_t dir=kTRUE) const
Return an iterator over this list.
void exportData(TList *olist, Int_t seqno)
ClassImp(RooStudyPackage)
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
char * Form(const char *fmt,...)
std::list< RooAbsStudy * > _studies
virtual const char * GetName() const
Returns name of object.
void initialize()
Make iterator over copy of studies attached to workspace.
R__EXTERN TRandom * gRandom
static void processFile(const char *infile, Int_t nexp)
Read in study package.
virtual void Add(TObject *obj)
virtual TObject * Next()=0
Int_t initRandom()
Choose random seed for this process in case pass a definite seed to have it deterministic use also wo...
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write all objects in this collection.
virtual void Close(Option_t *option="")
Close a file.