Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
RooAbsStudy.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id$
5  * Authors: *
6  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * *
9  * Copyright (c) 2000-2005, Regents of the University of California *
10  * and Stanford University. All rights reserved. *
11  * *
12  * Redistribution and use in source and binary forms, *
13  * with or without modification, are permitted according to the terms *
14  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15  *****************************************************************************/
16 #ifndef ROO_ABS_STUDY
17 #define ROO_ABS_STUDY
18 
19 #include "TNamed.h"
20 #include "RooLinkedList.h"
21 #include "RooArgSet.h"
22 
23 class RooAbsPdf;
24 class RooDataSet ;
25 class RooAbsData ;
26 class RooFitResult ;
27 class RooPlot ;
28 class RooRealVar ;
29 class RooWorkspace ;
30 class RooStudyManager ;
31 class RooStudyPackage ;
32 
33 class RooAbsStudy : public TNamed {
34 public:
35 
36  RooAbsStudy() : _storeDetails(kFALSE), _summaryData(0), _detailData(0), _ownDetailData(kTRUE) {} ;
37  RooAbsStudy(const char* name, const char* title) ;
38  RooAbsStudy(const RooAbsStudy& other) ;
39  virtual RooAbsStudy* clone(const char* newname="") const = 0 ;
40  TObject* Clone(const char* newname="") const { return clone(newname) ; }
41  virtual ~RooAbsStudy() ;
42 
43  virtual Bool_t attach(RooWorkspace& /*w*/) { return kFALSE ; } ;
44  virtual Bool_t initialize() { return kFALSE ; } ;
45  virtual Bool_t execute() { return kFALSE ; } ;
46  virtual Bool_t finalize() { return 0 ; } ;
47  void storeDetailedOutput(Bool_t flag) { _storeDetails = flag ; }
48 
49  RooDataSet* summaryData() { return _summaryData ; }
50  RooLinkedList* detailedData() { return _detailData ; }
51 
52  void releaseDetailData() { _ownDetailData = kFALSE ; }
53 
54  virtual void dump() {} ;
55 
56  protected:
57 
58  friend class RooStudyManager ;
59  friend class RooStudyPackage ;
60  void registerSummaryOutput(const RooArgSet& allVars, const RooArgSet& varsWithError=RooArgSet(), const RooArgSet& varsWithAsymError=RooArgSet()) ;
61  void storeSummaryOutput(const RooArgSet& vars) ;
62  void storeDetailedOutput(TNamed& object) ;
63  void aggregateSummaryOutput(TList* chunkList) ;
64 
65  private:
66 
67  Bool_t _storeDetails ;
68  RooDataSet* _summaryData ; //!
69  RooLinkedList* _detailData ; //!
70  Bool_t _ownDetailData ;
71 
72  ClassDef(RooAbsStudy,1) // Abstract base class for RooStudyManager modules
73 } ;
74 
75 
76 #endif
77