Logo ROOT   6.18/05
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
19class TObject ;
21#include "RooCatType.h"
22#include "RooArgSet.h"
23#include "RooSetProxy.h"
24
25
27public:
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
44protected:
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
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:326
static void indent(ostringstream &buf, int indent_level)
char name[80]
Definition: TGX11.cxx:109
RooAbsCategory is the common abstract base class for objects that represent a discrete value with a f...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state.
Definition: RooCatType.h:22
RooMultiCategory consolidates several RooAbsCategory objects into a single category.
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.
virtual RooCatType evaluate() const
Calculate the current value.
void updateIndexList()
Update the list of super-category states.
TString currentLabel() const
Return the name of the current state, constructed from the state names of the input categories.
virtual ~RooMultiCategory()
Destructor.
RooSetProxy _catSet
virtual TObject * clone(const char *newname) const
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)
Read object contents from given stream.
const RooArgSet & inputCatList() const
virtual void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to given stream.
RooSetProxy is the concrete proxy for RooArgSet objects.
Definition: RooSetProxy.h:24
Mother of all ROOT objects.
Definition: TObject.h:37
Basic string class.
Definition: TString.h:131