library: libRooFit #include "RooGenCategory.h"

# RooGenCategory

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

## class RooGenCategory : public RooAbsCategory

| Inheritance Chart:
`TObject`
| <- | `TNamed`
`RooPrintable`
| <- | `RooAbsArg`
| <- | `RooAbsCategory`
| <- | `RooGenCategory` |

        protected:

          virtual RooCatType evaluate() const
                     TString evalUserFunc(RooArgSet* vars)
                        void initialize()
                        void updateIndexList()

        public:

                           RooGenCategory()
                           RooGenCategory(const char* name, const char* title, void* userFunc, RooArgSet& catList)
                           RooGenCategory(const RooGenCategory& other, const char* name = "0")
                   virtual ~RooGenCategory()
            static TClass* Class()
          virtual TObject* clone(const char* newname) const
           virtual TClass* IsA() const
              virtual void printToStream(ostream& os, RooPrintable::PrintOption opt = Standard, TString indent = ) const
            virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose = kFALSE)
              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:

          RooSuperCategory _superCat       Super category of input categories
          RooCategoryProxy _superCatProxy  Proxy for super category
                    Int_t* _map            ! Super-index to generic-index map
                   TString _userFuncName
              TMethodCall* _userFunc       User function hook
                    Long_t _userArgs

## Class Description

RooGenCategory(const char *name, const char *title, void *userFunc, RooArgSet& catList) : RooAbsCategory(name, title), _superCat("superCat","Super Category",catList), _superCatProxy("superCatProxy","Super Category Proxy",this,_superCat), _map(0)

     Constructor with pointer to user mapping function and list of input categories

RooGenCategory(const RooGenCategory& other, const char *name) : RooAbsCategory(other,name), _superCat(other._superCat), _superCatProxy("superCatProxy","Super Category Proxy",this,_superCat), _map(0), _userFuncName(other._userFuncName)

     Copy constructor

void initialize()

     Initialization function

~RooGenCategory()

     Destructor

TString evalUserFunc(RooArgSet *vars)

     Utility function to evaluate (interpreted) user function

void updateIndexList()

     Update list of states and reevaluate input index code to output index code map

evaluate() const

     Calculate current value of object

void printToStream(ostream& os, PrintOption opt, TString indent) const

     Print info about this mapped category to the specified stream. In addition to the info
     from RooAbsCategory::printToStream() we add:

      Standard : input category
         Shape : default value
       Verbose : list of mapping rules

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

     Write object contents to given stream

### Inline Functions

            RooGenCategory RooGenCategory(const RooGenCategory& other, const char* name = "0")
                  TObject* clone(const char* newname) 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:12:43 2005
Copyright (c) 2000-2005, Regents of the University of California *