CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CombDataSetFactory.h
Go to the documentation of this file.
1 #ifndef HiggsAnalysis_CombinedLimit_CombDataSetFactory_h
2 #define HiggsAnalysis_CombinedLimit_CombDataSetFactory_h
3 
4 #include <RooCategory.h>
5 #include <RooArgSet.h>
6 #include <RooDataHist.h>
7 #include <RooDataSet.h>
8 #include <RooRealVar.h>
9 #include <map>
10 #include <string>
11 
12 
13 //_________________________________________________
14 /*
15 BEGIN_HTML
16 CombDataSetFactory is helper class for creating combined datasets since PyROOT can't call some constructors of RooDataHist
17 END_HTML
18 */
19 //
20 class CombDataSetFactory : public TObject {
21 
22  public:
24  CombDataSetFactory(const RooArgSet &vars, RooCategory &cat) ;
26 
27  void addSetBin(const char *label, RooDataHist *set);
28  void addSetAny(const char *label, RooDataSet *set);
29  void addSetAny(const char *label, RooDataHist *set);
30 
31  RooDataHist *done(const char *name, const char *title) ;
32  RooDataSet *doneUnbinned(const char *name, const char *title) ;
33 
34  ClassDef(CombDataSetFactory,1) // Make RooDataHist
35 
36  private:
37  RooArgSet vars_;
38  RooCategory *cat_;
39  RooRealVar *weight_;
40  std::map<std::string, RooDataHist *> map_;
41  std::map<std::string, RooDataSet *> mapUB_;
42 };
43 
44 #endif
std::map< std::string, RooDataHist * > map_
std::map< std::string, RooDataSet * > mapUB_
void addSetBin(const char *label, RooDataHist *set)
ClassDef(CombDataSetFactory, 1) private RooCategory * cat_
RooDataSet * doneUnbinned(const char *name, const char *title)
#define private
Definition: FWFileEntry.h:18
void addSetAny(const char *label, RooDataSet *set)
RooDataHist * done(const char *name, const char *title)
void set(const std::string &name, int value)
set the flag, with a run-time name