Logo ROOT   6.10/09
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
Basic string class.
Definition: TString.h:129
#define NULL
Definition: RtypesCore.h:88
This class is designed to aid in the construction of RooDataSets and RooArgSets, particularly those n...
#define ClassDef(name, id)
Definition: Rtypes.h:297
void CommitSet(double weight=1.0)
Commit to the result RooDataSet.
void AppendArgSet(const RooAbsCollection *aset, TString prefix="")
For each variable in aset, prepend prefix to its name and add to the internal store.
RooDataSet * GetAsDataSet(TString name, TString title)
Returns all detailed output as a dataset.
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:29
Namespace for the RooStats classes.
Definition: Asimov.h:20
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects...
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.
double result[121]