73 list<RooAbsStudy*>::const_iterator iter = other.
_studies.begin() ;
74 for (;iter!=other.
_studies.end() ; ++iter) {
75 _studies.push_back((*iter)->clone()) ;
106 for (list<RooAbsStudy*>::iterator iter=
_studies.begin() ; iter!=
_studies.end() ; iter++) {
107 (*iter)->attach(*
_ws) ;
108 (*iter)->initialize() ;
119 Int_t prescale = nExperiments>100 ?
Int_t(nExperiments/100) : 1 ;
120 for (Int_t i=0 ; i<nExperiments ; i++) {
122 coutP(
Generation) <<
"RooStudyPackage::run(" <<
GetName() <<
") processing experiment " << i <<
"/" << nExperiments << endl ;
134 for (list<RooAbsStudy*>::iterator iter=
_studies.begin() ; iter!=
_studies.end() ; iter++) {
147 for (list<RooAbsStudy*>::iterator iter=
_studies.begin() ; iter!=
_studies.end() ; iter++) {
148 (*iter)->finalize() ;
159 for (list<RooAbsStudy*>::iterator iter=
_studies.begin() ; iter!=
_studies.end() ; iter++) {
161 (*iter)->finalize() ;
163 RooDataSet* summaryData = (*iter)->summaryData() ;
166 cout <<
"registering summary dataset: " ; summaryData->
Print() ;
167 olist->
Add(summaryData) ;
171 if (detailedData && detailedData->
GetSize()>0) {
174 cout <<
"registering detailed dataset " << detailedData->IsA()->
GetName() <<
"::" 175 << detailedData->
GetName() <<
" with " << detailedData->
GetSize() <<
" elements" << endl ;
182 olist->
Add(detailedData) ;
183 (*iter)->releaseDetailData() ;
202 TString worknumber =
gEnv->
GetValue(
"ProofServ.Ordinal",
"undef");
204 if (worknumber !=
"undef")
205 iworker = int( worknumber.Atof()*10 + 0.1);
208 for (
int i = 0; i <= iworker; ++i )
225 string name_fin =
Form(
"study_data_%s.root",studyName) ;
226 TFile fin(name_fin.c_str()) ;
229 cout <<
"RooStudyPackage::processFile() ERROR input file " << name_fin <<
" does not contain a RooStudyPackage named 'studypack'" << endl ;
235 cout <<
"RooStudyPackage::processFile() Initial random seed for this run is " << seqno << endl ;
242 pkg->exportData(&res,seqno) ;
243 TFile fout(
Form(
"study_result_%s_%d.root",studyName,seqno),
"RECREATE") ;
RooStudyPackage is a utility class to manage studies that consist of repeated applications of generat...
virtual const char * GetName() const
Returns name of object.
void SetName(const char *name)
Change the name of this dataset into the given name.
const char * GetName() const
Returns name of object.
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)
Set the name of the TNamed.
void finalize()
Finalize all studies.
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.
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
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.
void exportData(TList *olist, Int_t seqno)
RooAbsStudy is an abstract base class for RooStudyManager modules.
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
void initialize()
Make iterator over copy of studies attached to workspace.
R__EXTERN TRandom * gRandom
RooDataSet is a container class to hold unbinned data.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
static void processFile(const char *infile, Int_t nexp)
Read in study package.
virtual void Add(TObject *obj)
TIterator * MakeIterator(Bool_t dir=kTRUE) const
Return an iterator over this list.
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.
The RooWorkspace is a persistable container for RooFit projects.