Logo ROOT   6.08/07
Reference Guide
RooMultiCategory.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooMultiCategory.h,v 1.9 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_MULTI_CATEGORY
17 #define ROO_MULTI_CATEGORY
18 
19 class TObject ;
20 #include "RooAbsCategoryLValue.h"
21 #include "RooCatType.h"
22 #include "RooArgSet.h"
23 #include "RooSetProxy.h"
24 
25 
27 public:
28  // Constructors etc.
29  inline RooMultiCategory() { }
30  RooMultiCategory(const char *name, const char *title, const RooArgSet& inputCatList);
31  RooMultiCategory(const RooMultiCategory& other, const char *name=0) ;
32  virtual TObject* clone(const char* newname) const { return new RooMultiCategory(*this,newname); }
33  virtual ~RooMultiCategory();
34 
35  // Printing interface (human readable)
36  virtual void printMultiline(std::ostream& os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
37 
38  // I/O streaming interface (machine readable)
39  virtual Bool_t readFromStream(std::istream& is, Bool_t compact, Bool_t verbose=kFALSE) ;
40  virtual void writeToStream(std::ostream& os, Bool_t compact) const ;
41 
42  const RooArgSet& inputCatList() const { return _catSet ; }
43 
44 protected:
45 
46  void updateIndexList() ;
47  TString currentLabel() const ;
48 
49  RooSetProxy _catSet ; // Set of input category
50 
51  virtual RooCatType evaluate() const ;
52 
53  ClassDef(RooMultiCategory,1) // Product operator for categories
54 };
55 
56 #endif
const RooArgSet & inputCatList() const
virtual ~RooMultiCategory()
Destructor.
RooSetProxy _catSet
virtual RooCatType evaluate() const
Calculate the current value.
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
void updateIndexList()
Update the list of super-category states.
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to given stream.
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state...
Definition: RooCatType.h:23
TString currentLabel() const
Return the name of the current state, constructed from the state names of the input categories...
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Print the state of this object to the specified output stream.
bool verbose
static void indent(ostringstream &buf, int indent_level)
RooMultiCategory consolidates several RooAbsCategory objects into a single category.
Mother of all ROOT objects.
Definition: TObject.h:37
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)
Read object contents from given stream.
virtual TObject * clone(const char *newname) const
RooAbsCategory is the common abstract base class for objects that represent a discrete value with a f...
RooSetProxy is the concrete proxy for RooArgSet objects.
Definition: RooSetProxy.h:25
char name[80]
Definition: TGX11.cxx:109