ROOT  6.06/09
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 
26 public:
27  // Constructors etc.
28  inline RooThresholdCategory() { }
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 
42 protected:
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
virtual ~RooThresholdCategory()
Destructor.
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
Iterator abstract base class.
Definition: TIterator.h:32
void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to given stream.
#define ClassDef(name, id)
Definition: Rtypes.h:254
A sorted doubly linked list.
Definition: TSortedList.h:30
virtual RooCatType evaluate() const
do not persist
Bool_t addThreshold(Double_t upperLimit, const char *catName, Int_t catIdx=-99999)
Insert threshold at value upperLimit.
bool verbose
static void indent(ostringstream &buf, int indent_level)
virtual TObject * clone(const char *newname) const
double Double_t
Definition: RtypesCore.h:55
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:53
#define name(a, b)
Definition: linkTestLib0.cpp:5
Mother of all ROOT objects.
Definition: TObject.h:58
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.