Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
25public:
26 RooBinningCategory() = default;
27 RooBinningCategory(const char *name, const char *title, RooAbsRealLValue& inputVar, const char* binningName=nullptr, const char* catTypeName=nullptr);
28 RooBinningCategory(const RooBinningCategory& other, const char *name=nullptr) ;
29 TObject* clone(const char* newname) const override { return new RooBinningCategory(*this, newname); }
30
31 /// Printing interface (human readable)
32 void printMultiline(std::ostream& os, Int_t content, bool verbose=false, TString indent="") const override ;
33
34protected:
35
36 void initialize(const char* catTypeName=nullptr) ;
37
38 RooTemplateProxy<RooAbsRealLValue> _inputVar; ///< Input variable that is mapped
39 TString _bname ; ///< Name of the binning specification to be used to perform the mapping
40
41 value_type evaluate() const override;
42 /// The shape of this category does not need to be recomputed, as it creates states on the fly.
43 void recomputeShape() override { }
44
45 ClassDefOverride(RooBinningCategory,1) // RealVar-to-Category function defined by bin boundaries on input var
46};
47
48#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
static void indent(ostringstream &buf, int indent_level)
char name[80]
Definition TGX11.cxx:110
A space to attach TBranches.
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
Provides a real-to-category mapping defined by a series of thresholds.
void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
Printing interface (human readable)
value_type evaluate() const override
Calculate and return the value of the mapping function.
TString _bname
Name of the binning specification to be used to perform the mapping.
RooTemplateProxy< RooAbsRealLValue > _inputVar
Input variable that is mapped.
void initialize(const char *catTypeName=nullptr)
Iterator over all bins in input variable and define corresponding state labels.
void recomputeShape() override
The shape of this category does not need to be recomputed, as it creates states on the fly.
TObject * clone(const char *newname) const override
RooBinningCategory()=default
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139