00001 /***************************************************************************** 00002 * Project: RooFit * 00003 * Package: RooFitCore * 00004 * File: $Id: RooAbsStudy.h 30333 2009-09-21 15:39:17Z wouter $ 00005 * Authors: * 00006 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * 00007 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu * 00008 * * 00009 * Copyright (c) 2000-2005, Regents of the University of California * 00010 * and Stanford University. All rights reserved. * 00011 * * 00012 * Redistribution and use in source and binary forms, * 00013 * with or without modification, are permitted according to the terms * 00014 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * 00015 *****************************************************************************/ 00016 #ifndef ROO_ABS_STUDY 00017 #define ROO_ABS_STUDY 00018 00019 #include "TNamed.h" 00020 #include "RooLinkedList.h" 00021 #include "RooArgSet.h" 00022 00023 class RooAbsPdf; 00024 class RooDataSet ; 00025 class RooAbsData ; 00026 class RooFitResult ; 00027 class RooPlot ; 00028 class RooRealVar ; 00029 class RooWorkspace ; 00030 class RooStudyManager ; 00031 class RooStudyPackage ; 00032 00033 class RooAbsStudy : public TNamed { 00034 public: 00035 00036 RooAbsStudy() : _storeDetails(kFALSE), _summaryData(0), _detailData(0), _ownDetailData(kTRUE) {} ; 00037 RooAbsStudy(const char* name, const char* title) ; 00038 RooAbsStudy(const RooAbsStudy& other) ; 00039 virtual ~RooAbsStudy() ; 00040 00041 virtual Bool_t attach(RooWorkspace& /*w*/) { return kFALSE ; } ; 00042 virtual Bool_t initialize() { return kFALSE ; } ; 00043 virtual Bool_t execute() { return kFALSE ; } ; 00044 virtual Bool_t finalize() { return 0 ; } ; 00045 void storeDetailedOutput(Bool_t flag) { _storeDetails = flag ; } 00046 00047 RooDataSet* summaryData() { return _summaryData ; } 00048 RooLinkedList* detailedData() { return _detailData ; } 00049 00050 void releaseDetailData() { _ownDetailData = kFALSE ; } 00051 00052 protected: 00053 00054 friend class RooStudyManager ; 00055 friend class RooStudyPackage ; 00056 void registerSummaryOutput(const RooArgSet& allVars, const RooArgSet& varsWithError=RooArgSet(), const RooArgSet& varsWithAsymError=RooArgSet()) ; 00057 void storeSummaryOutput(const RooArgSet& vars) ; 00058 void storeDetailedOutput(TNamed& object) ; 00059 void aggregateSummaryOutput(TList* chunkList) ; 00060 00061 private: 00062 00063 Bool_t _storeDetails ; 00064 RooDataSet* _summaryData ; //! 00065 RooLinkedList* _detailData ; //! 00066 Bool_t _ownDetailData ; 00067 00068 ClassDef(RooAbsStudy,1) // Abstract base class for RooStudyManager modules 00069 } ; 00070 00071 00072 #endif 00073