#ifndef ROO_ABS_CATEGORY
#define ROO_ABS_CATEGORY
#include "Riostream.h"
#include "TObjArray.h"
#include "RooAbsArg.h"
#include "RooCatType.h"
class TTree ;
class RooArgSet ;
class RooDataSet ;
class Roo1DTable ;
class RooAbsCategory : public RooAbsArg {
public:
RooAbsCategory() { _typeIter = _types.MakeIterator() ; } ;
RooAbsCategory(const char *name, const char *title);
RooAbsCategory(const RooAbsCategory& other, const char* name=0) ;
virtual ~RooAbsCategory();
virtual Int_t getIndex() const ;
virtual const char* getLabel() const ;
Bool_t operator==(Int_t index) const ;
Bool_t operator!=(Int_t index) { return !operator==(index);}
Bool_t operator==(const char* label) const ;
Bool_t operator!=(const char* label) { return !operator==(label);}
virtual Bool_t operator==(const RooAbsArg& other) ;
Bool_t operator!=(const RooAbsArg& other) { return !operator==(other);}
Bool_t isValidIndex(Int_t index) const ;
Bool_t isValidLabel(const char* label) const ;
const RooCatType* lookupType(Int_t index, Bool_t printError=kFALSE) const ;
const RooCatType* lookupType(const char* label, Bool_t printError=kFALSE) const ;
const RooCatType* lookupType(const RooCatType& type, Bool_t printError=kFALSE) const ;
TIterator* typeIterator() const ;
Int_t numTypes() const { return _types.GetEntries() ; }
Bool_t isSignType(Bool_t mustHaveZero=kFALSE) const ;
Roo1DTable *createTable(const char *label) const ;
virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose=kFALSE) ;
virtual void writeToStream(ostream& os, Bool_t compact) const ;
virtual void printToStream(ostream& os, PrintOption opt=Standard, TString indent= "") const ;
virtual Bool_t isIntegrationSafeLValue(const RooArgSet* ) const { return kTRUE ; }
RooAbsArg *createFundamental(const char* newname=0) const;
protected:
RooCatType traceEval() const ;
virtual Bool_t traceEvalHook(RooCatType ) const { return kFALSE ;}
virtual RooCatType evaluate() const = 0 ;
const RooCatType* defineType(const char* label) ;
const RooCatType* defineType(const char* label, Int_t index) ;
const RooCatType* defineTypeUnchecked(const char* label, Int_t index) ;
const RooCatType* getOrdinal(UInt_t n) const;
void clearTypes() ;
virtual Bool_t isValid() const ;
virtual Bool_t isValid(RooCatType value) const ;
virtual void syncCache(const RooArgSet* set=0) ;
virtual void copyCache(const RooAbsArg* source) ;
virtual void attachToTree(TTree& t, Int_t bufSize=32000) ;
virtual void setTreeBranchStatus(TTree& t, Bool_t active) ;
virtual void fillTreeBranch(TTree& t) ;
mutable RooCatType _value ;
TObjArray _types ;
TIterator* _typeIter ;
ClassDef(RooAbsCategory,1)
};
#endif
ROOT page - Class index - Class Hierarchy - Top of the page
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.