Logo ROOT   6.16/01
Reference Guide
RooThresholdCategory.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooThresholdCategory.h,v 1.8 2007/05/11 09:11:30 verkerke Exp $
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_THRESHOLD_CATEGORY
17#define ROO_THRESHOLD_CATEGORY
18
19#include "TSortedList.h"
20#include "RooAbsCategory.h"
21#include "RooRealProxy.h"
22#include "RooCatType.h"
23
25
26public:
27 // Constructors etc.
29 RooThresholdCategory(const char *name, const char *title, RooAbsReal& inputVar, const char* defCatName="Default", Int_t defCatIdx=0);
30 RooThresholdCategory(const RooThresholdCategory& other, const char *name=0) ;
31 virtual TObject* clone(const char* newname) const { return new RooThresholdCategory(*this, newname); }
32 virtual ~RooThresholdCategory();
33
34 // Mapping function
35 Bool_t addThreshold(Double_t upperLimit, const char* catName, Int_t catIdx=-99999) ;
36
37 // Printing interface (human readable)
38 virtual void printMultiline(std::ostream& os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
39
40 void writeToStream(std::ostream& os, Bool_t compact) const ;
41
42protected:
43
47 TIterator* _threshIter ; //! do not persist
48
49 virtual RooCatType evaluate() const ;
50
51 ClassDef(RooThresholdCategory,1) // Real-to-Category function defined by series of threshold
52};
53
54#endif
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
#define ClassDef(name, id)
Definition: Rtypes.h:324
RooAbsCategory is the common abstract base class for objects that represent a discrete value with a f...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:53
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state.
Definition: RooCatType.h:22
RooRealProxy is the concrete proxy for RooAbsReal objects A RooRealProxy is the general mechanism to ...
Definition: RooRealProxy.h:23
Class RooThresholdCategory provides a real-to-category mapping defined by a series of thresholds.
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.
void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to given stream.
Bool_t addThreshold(Double_t upperLimit, const char *catName, Int_t catIdx=-99999)
Insert threshold at value upperLimit.
virtual TObject * clone(const char *newname) const
virtual ~RooThresholdCategory()
Destructor.
virtual RooCatType evaluate() const
do not persist
Iterator abstract base class.
Definition: TIterator.h:30
Mother of all ROOT objects.
Definition: TObject.h:37
A sorted doubly linked list.
Definition: TSortedList.h:28
Basic string class.
Definition: TString.h:131