#ifndef ROO_CATEGORY
#define ROO_CATEGORY
#include "Riosfwd.h"
#include "RooAbsCategoryLValue.h"
#include "RooSharedPropertiesList.h"
#include "RooCategorySharedProperties.h"
class RooCategory : public RooAbsCategoryLValue {
public:
RooCategory() ;
RooCategory(const char *name, const char *title);
RooCategory(const RooCategory& other, const char* name=0) ;
virtual ~RooCategory();
virtual TObject* clone(const char* newname) const { return new RooCategory(*this,newname); }
virtual Int_t getIndex() const {
return _value.getVal() ;
}
virtual const char* getLabel() const {
return _value.GetName() ;
}
virtual Bool_t setIndex(Int_t index, Bool_t printError=kTRUE) ;
virtual Bool_t setLabel(const char* label, Bool_t printError=kTRUE) ;
virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose=kFALSE) ;
virtual void writeToStream(ostream& os, Bool_t compact) const ;
inline virtual Bool_t isFundamental() const {
return kTRUE;
}
Bool_t defineType(const char* label) ;
Bool_t defineType(const char* label, Int_t index) ;
void clearTypes() { RooAbsCategory::clearTypes() ; }
void clearRange(const char* name, Bool_t silent) ;
void setRange(const char* rangeName, const char* stateNameList) ;
void addToRange(const char* rangeName, const char* stateNameList) ;
Bool_t isStateInRange(const char* rangeName, const char* stateName) const ;
virtual Bool_t inRange(const char* rangeName) const {
return isStateInRange(rangeName,getLabel()) ;
}
virtual Bool_t hasRange(const char* rangeName) const {
return _sharedProp->_altRanges.FindObject(rangeName) ? kTRUE : kFALSE ;
}
protected:
static RooSharedPropertiesList _sharedPropList;
RooCategorySharedProperties* _sharedProp ;
virtual RooCatType evaluate() const {
return RooCatType() ;
}
ClassDef(RooCategory,1)
};
#endif
Last change: Thu Aug 28 09:04:02 2008
Last generated: 2008-08-28 09:04
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.