Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:29:44

0001 // @(#)root/roostats:$Id$
0002 // Author: Sven Kreiss, Kyle Cranmer   Nov 2010
0003 /*************************************************************************
0004  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
0005  * All rights reserved.                                                  *
0006  *                                                                       *
0007  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0008  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0009  *************************************************************************/
0010 
0011 #ifndef ROOSTATS_DetailedOutputAggregator
0012 #define ROOSTATS_DetailedOutputAggregator
0013 
0014 #include "TString.h"
0015 
0016 class RooAbsCollection;
0017 class RooFitResult;
0018 class RooDataSet;
0019 class RooArgList;
0020 class RooArgSet;
0021 
0022 namespace RooStats {
0023 
0024    class DetailedOutputAggregator {
0025 
0026    public:
0027 
0028       /// Translate the given fit result to a RooArgSet in a generic way.
0029       /// Prefix is prepended to all variable names.
0030       /// Note that the returned set is managed by the user and the user must
0031       /// explicitly delete all the set content (the returned set does not own the content)
0032       static RooArgSet *GetAsArgSet(RooFitResult *result, TString prefix="", bool withErrorsAndPulls=false);
0033 
0034       /// For each variable in aset, prepend prefix to its name and add
0035       /// to the internal store. Note this will not appear in the produced
0036       /// dataset unless CommitSet is called.
0037       void AppendArgSet(const RooAbsCollection *aset, TString prefix="");
0038 
0039       const RooArgList* GetAsArgList() const {
0040          // Returns this set of detailed output.
0041          // Note that the ownership of the returned list is not transferred
0042          // It is managed by the DetailedOutputAggregator class
0043          return fBuiltSet;
0044       }
0045 
0046       /// Commit to the result RooDataSet.
0047       void CommitSet(double weight=1.0);
0048 
0049       RooDataSet *GetAsDataSet(TString name, TString title);
0050 
0051       virtual ~DetailedOutputAggregator();
0052 
0053    private:
0054 
0055       RooDataSet *fResult = nullptr;
0056       RooArgList *fBuiltSet = nullptr;
0057 
0058       ClassDef(DetailedOutputAggregator,1)
0059    };
0060 }
0061 
0062 #endif