Logo ROOT  
Reference Guide
DetailedOutputAggregator.h
Go to the documentation of this file.
1 // @(#)root/roostats:$Id$
2 // Author: Sven Kreiss, Kyle Cranmer Nov 2010
3 /*************************************************************************
4  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 #ifndef ROOSTATS_DetailedOutputAggregator
12 #define ROOSTATS_DetailedOutputAggregator
13 
14 #include "TString.h"
15 
16 class RooAbsCollection;
17 class RooFitResult;
18 class RooDataSet;
19 class RooArgList;
20 class RooArgSet;
21 
22 namespace RooStats {
23 
25 
26  public:
27 
28  // Translate the given fit result to a RooArgSet in a generic way.
29  // Prefix is prepended to all variable names.
30  // Note that the returned set is managed by the user and the user must
31  // explicitly delete all the set content (the returned set does not own the content)
32  static RooArgSet *GetAsArgSet(RooFitResult *result, TString prefix="", bool withErrorsAndPulls=false);
33 
35  fResult = NULL;
36  fBuiltSet = NULL;
37  }
38 
39  // For each variable in aset, prepend prefix to its name and add
40  // to the internal store. Note this will not appear in the produced
41  // dataset unless CommitSet is called.
42  void AppendArgSet(const RooAbsCollection *aset, TString prefix="");
43 
44  const RooArgList* GetAsArgList() const {
45  // Returns this set of detailed output.
46  // Note that the ownership of the returned list is not transfered
47  // It is managed by the DetailedOutputAggregator class
48  return fBuiltSet;
49  }
50 
51  // Commit to the result RooDataSet.
52  void CommitSet(double weight=1.0);
53 
55 
56  virtual ~DetailedOutputAggregator();
57 
58  private:
59 
62 
63  protected:
65  };
66 }
67 
68 #endif
RooStats::DetailedOutputAggregator::CommitSet
void CommitSet(double weight=1.0)
Commit to the result RooDataSet.
Definition: DetailedOutputAggregator.cxx:129
RooStats::DetailedOutputAggregator::AppendArgSet
void AppendArgSet(const RooAbsCollection *aset, TString prefix="")
For each variable in aset, prepend prefix to its name and add to the internal store.
Definition: DetailedOutputAggregator.cxx:89
RooStats::DetailedOutputAggregator::GetAsArgSet
static RooArgSet * GetAsArgSet(RooFitResult *result, TString prefix="", bool withErrorsAndPulls=false)
static function to translate the given fit result to a RooArgSet in a generic way.
Definition: DetailedOutputAggregator.cxx:50
RooStats::DetailedOutputAggregator
Definition: DetailedOutputAggregator.h:24
RooArgList
Definition: RooArgList.h:21
TString
Definition: TString.h:136
TString.h
RooStats::DetailedOutputAggregator::DetailedOutputAggregator
DetailedOutputAggregator()
Definition: DetailedOutputAggregator.h:34
RooFitResult
Definition: RooFitResult.h:40
RooStats::DetailedOutputAggregator::GetAsDataSet
RooDataSet * GetAsDataSet(TString name, TString title)
Returns all detailed output as a dataset.
Definition: DetailedOutputAggregator.cxx:152
RooAbsCollection
Definition: RooAbsCollection.h:30
RooStats::DetailedOutputAggregator::~DetailedOutputAggregator
virtual ~DetailedOutputAggregator()
Definition: DetailedOutputAggregator.cxx:38
RooStats::DetailedOutputAggregator::fBuiltSet
RooArgList * fBuiltSet
Definition: DetailedOutputAggregator.h:61
RooStats
Definition: Asimov.h:19
RooStats::DetailedOutputAggregator::GetAsArgList
const RooArgList * GetAsArgList() const
Definition: DetailedOutputAggregator.h:44
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooStats::DetailedOutputAggregator::fResult
RooDataSet * fResult
Definition: DetailedOutputAggregator.h:60
name
char name[80]
Definition: TGX11.cxx:110
RooDataSet
Definition: RooDataSet.h:33
RooArgSet
Definition: RooArgSet.h:28