library: libRooFit #include "RooCategory.h"

# RooCategory

class description - source file - inheritance tree (.pdf)

## class RooCategory : public RooAbsCategoryLValue

| Inheritance Chart:
`TObject`
| <- | `TNamed`
`RooPrintable`
| <- | `RooAbsArg`
| <- | `RooAbsCategory`
`RooAbsLValue`
| <- | `RooAbsCategoryLValue`
| <- | `RooCategory` |

        protected:

          virtual RooCatType evaluate() const

        public:

                              RooCategory()
                              RooCategory(const char* name, const char* title)
                              RooCategory(const RooCategory& other, const char* name = "0")
                      virtual ~RooCategory()
                         void addToRange(const char* rangeName, const char* stateNameList)
               static TClass* Class()
                         void clearRange(const char* name, Bool_t silent)
                         void clearTypes()
             virtual TObject* clone(const char* newname) const
                       Bool_t defineType(const char* label)
                       Bool_t defineType(const char* label, Int_t index)
                virtual Int_t getIndex() const
          virtual const char* getLabel() const
               virtual Bool_t hasRange(const char* rangeName) const
               virtual Bool_t inRange(const char* rangeName) const
              virtual TClass* IsA() const
               virtual Bool_t isFundamental() const
                       Bool_t isStateInRange(const char* rangeName, const char* stateName) const
               virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose = kFALSE)
               virtual Bool_t setIndex(Int_t index, Bool_t printError = kTRUE)
               virtual Bool_t setLabel(const char* label, Bool_t printError = kTRUE)
                         void setRange(const char* rangeName, const char* stateNameList)
                 virtual void ShowMembers(TMemberInspector& insp, char* parent)
                 virtual void Streamer(TBuffer& b)
                         void StreamerNVirtual(TBuffer& b)
                 virtual void writeToStream(ostream& os, Bool_t compact) const

### Data Members

        protected:

          RooLinkedList _altRanges  ! alternative range definitions for categories ;

## Class Description

RooCategory(const char *name, const char *title) : RooAbsCategoryLValue(name,title)

     Constructor. Types must be defined using defineType() before variable can be used

RooCategory(const RooCategory& other, const char* name) : RooAbsCategoryLValue(other, name)

     Copy constructor

~RooCategory()

     Destructor

Bool_t setIndex(Int_t index, Bool_t printError)

     Set value by specifying the index code of the desired state.
     If printError is set, a message will be printed if
     the specified index does not represent a valid state.

Bool_t setLabel(const char* label, Bool_t printError)

     Set value by specifying the name of the desired state
     If printError is set, a message will be printed if
     the specified label does not represent a valid state.

Bool_t defineType(const char* label)

     Define a state with given name, the lowest available
     positive integer is assigned as index. Category
     state labels may not contain semicolons.
     Error status is return if state with given name
     is already defined

Bool_t defineType(const char* label, Int_t index)

     Define a state with given name and index. Category
     state labels may not contain semicolons
     Error status is return if state with given name
     or index is already defined

Bool_t readFromStream(istream& is, Bool_t /*compact*/, Bool_t verbose)

     Read object contents from given stream

void writeToStream(ostream& os, Bool_t compact) const

     compact only at the moment

void clearRange(const char* name, Bool_t silent)

     Check that both input arguments are not null pointers

void setRange(const char* name, const char* stateNameList)

void addToRange(const char* name, const char* stateNameList)

     Check that both input arguments are not null pointers

Bool_t isStateInRange(const char* rangeName, const char* stateName) const

     Check that both input arguments are not null pointers

### Inline Functions

            RooCategory RooCategory(const RooCategory& other, const char* name = "0")
               TObject* clone(const char* newname) const
                  Int_t getIndex() const
            const char* getLabel() const
                 Bool_t isFundamental() const
                   void clearTypes()
                 Bool_t inRange(const char* rangeName) const
                 Bool_t hasRange(const char* rangeName) const
             RooCatType evaluate() const
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)

Last update: Tue Jun 28 18:11:17 2005
Copyright (c) 2000-2005, Regents of the University of California *