Logo ROOT  
Reference Guide
RooBinningCategory.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id$
5  * Authors: *
6  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7  * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8  * *
9  * Copyright (c) 2000-2005, Regents of the University of California *
10  * and Stanford University. All rights reserved. *
11  * *
12  * Redistribution and use in source and binary forms, *
13  * with or without modification, are permitted according to the terms *
14  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15  *****************************************************************************/
16 #ifndef ROO_BINNING_CATEGORY
17 #define ROO_BINNING_CATEGORY
18 
19 #include "RooAbsCategory.h"
20 #include "RooTemplateProxy.h"
21 #include "TString.h"
22 
24 
25 public:
26  // Constructors etc.
27  inline RooBinningCategory() { }
28  RooBinningCategory(const char *name, const char *title, RooAbsRealLValue& inputVar, const char* binningName=0, const char* catTypeName=0);
29  RooBinningCategory(const RooBinningCategory& other, const char *name=0) ;
30  virtual TObject* clone(const char* newname) const { return new RooBinningCategory(*this, newname); }
31  virtual ~RooBinningCategory();
32 
33  // Printing interface (human readable)
34  virtual void printMultiline(std::ostream& os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
35 
36 protected:
37 
38  void initialize(const char* catTypeName=0) ;
39 
40  RooTemplateProxy<RooAbsRealLValue> _inputVar; // Input variable that is mapped
41  TString _bname ; // Name of the binning specification to be used to perform the mapping
42 
43  virtual value_type evaluate() const;
44  /// The shape of this category does not need to be recomputed, as it creates states on the fly.
45  void recomputeShape() { }
46 
47  ClassDef(RooBinningCategory,1) // RealVar-to-Category function defined by bin boundaries on input var
48 };
49 
50 #endif
indent
static void indent(ostringstream &buf, int indent_level)
Definition: TClingCallFunc.cxx:87
RooTemplateProxy.h
TString
Definition: TString.h:136
TString.h
bool
RooAbsCategory
Definition: RooAbsCategory.h:38
RooBinningCategory::RooBinningCategory
RooBinningCategory()
Definition: RooBinningCategory.h:41
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooBinningCategory
Definition: RooBinningCategory.h:23
RooTemplateProxy< RooAbsRealLValue >
RooAbsCategory.h
RooBinningCategory::evaluate
virtual value_type evaluate() const
Calculate and return the value of the mapping function.
Definition: RooBinningCategory.cxx:95
RooBinningCategory::initialize
void initialize(const char *catTypeName=0)
Iterator over all bins in input variable and define corresponding state labels.
Definition: RooBinningCategory.cxx:78
RooBinningCategory::_inputVar
RooTemplateProxy< RooAbsRealLValue > _inputVar
Definition: RooBinningCategory.h:54
RooBinningCategory::~RooBinningCategory
virtual ~RooBinningCategory()
Destructor.
Definition: RooBinningCategory.cxx:68
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
RooBinningCategory::clone
virtual TObject * clone(const char *newname) const
Definition: RooBinningCategory.h:44
genreflex::verbose
bool verbose
Definition: rootcling_impl.cxx:133
RooBinningCategory::printMultiline
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Print info about this threshold category to the specified stream.
Definition: RooBinningCategory.cxx:119
RooBinningCategory::_bname
TString _bname
Definition: RooBinningCategory.h:55
RooAbsRealLValue
Definition: RooAbsRealLValue.h:31
RooBinningCategory::recomputeShape
void recomputeShape()
The shape of this category does not need to be recomputed, as it creates states on the fly.
Definition: RooBinningCategory.h:59
int